120 likes | 257 Vues
Explore the world of Short Message Service (SMS) in ColdFusion with insights from Kevin Schmidt. Discover the secure and reliable nature of SMS, its global statistics, and common applications such as alerts and contests. Understand the key benefits including accessibility and built-in security, while also noting limitations like character count constraints and setup costs. Learn how to implement SMS gateways for sending and receiving messages, and test applications using ColdFusion's SMS test server capabilities. Elevate your ColdFusion projects with effective SMS integration.
E N D
ColdFusion and SMS Kevin Schmidt
What is SMS? • Short Message Service (SMS) • Secure, reliable, virtually everywhere and basically works the same regardless of handset or carrier • 160 character limit (140 bytes) • Binary content capable (ringtones,logos, etc) • Typical uses – txt-ing, news alerts, financial information, contests, etc) www.cfunited.com
SMS Usage Statistics • SMS usage is extensive worldwide and increasing pervasive in US: • China: 550 Billion SMS messages in 2004, 1.4 Trillion by 2006 • UK: 23-25 Billion SMS messages for 2004 (MDA) • Used by over 70% of mobile phone users worldwide • Messages delivered in <10 seconds www.cfunited.com
Benefits and Limitations • Benefits: • Fully mobile - available anywhere, anytime • Secure - authentication and encryption built-in • Push or Pull • Limitations: • Limited message length - usually 160 chars • Device keypad interfaces make typing lengthy messages cumbersome • Expensive setup (short code, service provider) • Response time can vary and can impact app usability and design www.cfunited.com
ColdFusion Test Server • A SMSC test server is included with ColdFusion • Simulates the phone company or 3rd part aggregator’s SMSC Server • Started in the Administrator • Off by default on start • ColdFusion appears to be just another SMS subscriber • SMS Gateway conforms to SMPP 3.4 (currently most commonly deployed) www.cfunited.com
Sample Application • An SMS gateway (a test instance) is predefined • Pre-configured to talk to SMSC Test Server • Not running by default • Pre-configured to point to sample gateway menuing application • SMS Gateway instances are associated with configuration files • Default starting CFG files in {cfusion}\gateway\config\*.cfg www.cfunited.com
Testing Your Applications • Testing SMS applications requires an SMS device (or virtual device) • Invoked using {cfusion}/bin/SMSClient.bat • Java applet simulates basic cell phone with SMS “chat” mode • Pre-configured to talk to the SMSC Test Server www.cfunited.com
SMS Gateway - Sending • ColdFusion applications can initiate and send messages (“push”) to SMS-enabled devices with the sendGatewayMessage() function • To use sendGatewayMessage(), specify: • Destination mobile device telephone number • SMS Gateway instance ID • Message www.cfunited.com
SMS Gateway – Receiving • Mobile devices send messages to a ColdFusion listener CFC by using SMS Gateway instance’s telephone number or Short Code • Incoming messages include the originating device’s phone number, so listener CFCs can respond to messages sent by mobile devices • Calls onIncomingMessage() www.cfunited.com
Some Assumptions • Assumptions: • Application framework is fully supported • No HTTP means no cookies • Application, Session, Client scopes supported • Event Gateway system uses originatorID • Sessions are as secure as the event mechanism www.cfunited.com
Getting Hand On… • Sample Stock Market Applicaition • Create CFC’s for WebService and Gateway • Create Gateway config file • Setup Gateway • Test sending and receiving messages www.cfunited.com
Questions… • Email: schmidt@hungrycow.com • Feel free to email anytime • Website: http://www.flexinabox.com • Code and .ppt will be posted here www.cfunited.com