I'll put this into a series of blog posts shortly, but wanted to post a dramatic idea, that would make most devs life a lot easier IMHO.
...
Over the years I've floated various ideas in the ColdFusion community around messaging and updating how CF engines interact.
I'd love to see a 'Messaging Service' (abstracted messaging functionality) in Lucee that allows for various types of messages to be sent (and extensions to add more) in a uniform way, not unlike how mappings allow different file systems to be abstracted.
It should be irrelevant 'how' it does it, (aka gateway, or direct functions/tags,etc)
---------------------
The idea is:
Work toward removing/hiding email settings page and move all kinds of messages to a central 'messagesource' (aka like datasource, but for messages).
Messaging connectors could be written, not unlike the way cache works also.
--
So in stage one we could have:
- Email
- Standard Mail Servers (smartermail, exchange, etc)
- API Based Services (mandrill, mailrocket, etc)
- SMS
- Individual Messages
- Mass Messaging (batch sending)
- Push Messages
- Individual Messages
- Mass Messaging (batch sending)
- Social
- MessageBus (rabbitMq-like)
- Mailing Lists (eg: google groups)
- Post Messages
- Read Messages
- Custom Messaging API
- Roll your own extension to support your own random messaging system
this list is endless, however these are the main ones used all the time IMHO.
What is amounts to is a messaging set of functionality equivalent of a <cfmessage> tag or sendMessage() function which operates from a mailsource.
So you could have:
for email:
sendMessage(messagesource="mandrill2", subject="", message="", etc="");
for sms:
sendMessage(messagesource="clickatellftp" message="", recepients="");
Where the way a message is sent is abstracted away from the application in the same way mappings and datasources abstract away their respective complexity.
where you could sent an sms via clickatell via email to sms, ftp, smpp or other ways, but not have to care how that is done as it's a simple provider extension for messaging.
Likewise we could also roll the CFMAIL and CFIMAP into the same concept and abstract it to:
getMessages(messagesource="myimapserver", folder="Inbox") or getMessage(messagesource="clickatell2way") or getMessages(messagesource="facebook-work" or getMessages(type="twitter", user="@lucee", maxrows=10)
---
I know it's a massive concept, but I'd love to see more abstractions like this so that the language moving forward is consistant.
Perhaps if people are interested I could start a railo extension that adds a series of tags to the language if there is enough support for the general concept and people around to help flesh out the 'standards' of an approach as this could also be used for other extensionsin the future (aka payment gateways (paypal,stripe,eway,etc), invoice solutions (xero,myob,etc) and so many others. Would be great to have a standard way to have extensions for extensions (something wordpress is sorting ATM also in their community)
Am I understanding the direction of Lucee (which is where I always wanted CF to go) to be heading in this direction?
This is a bit of a brain dump right now, but as I'm excited to what Lucee could be in v5... this is something that is a step further than just "cfmailsource" which I already have tickets in the system for, and a step further in the right direction (as pluggable functionality).
Getting started on this concept this week (rebuild from the ground up) anyway with v14 of my Diimes CFML framework, so either way I'll be heading in this direction, even if the community doesn't find this useful.
Thoughts, suggestions, criticism welcome. as a reply or privately back to my gmail.
Cheers,
Chris Dawes