SlideShare a Scribd company logo
1 of 36
Download to read offline
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Developing HTML5 Mobile Applications Using ColdFusion 11 (Splendor)
Ram Kulkarni
1
@ram_kulkarni
ramkulkarni.com
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Agenda
§  What is CFMobile
§  Typical workflow
§  ColdFusion & CFB Features for CFMobile
§  Tools required for testing and debugging
§  Demos
2
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
What is CFMobile
§  HTML5 Mobile application development framework using ColdFusion and ColdFusion Builder
§  Advantages
§  Leverage your knowledge of CFML to develop mobile applications
§  Simplifies coding of mobile applications
§  CFMobile debugger : on-device debugging
§  Inspect DOM and console messages
§  Easily package mobile applications
Supports complete workflow for mobile application development
3
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
What CFMobile is not
§  Develop native mobile application
§  Bunch of UI tags
§  Automatically converts your website to mobile application responsive design
4
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
CF 11 Mobile Development Workflow
Create a mobile
web project
Write code
Client and
Server
Test
Debug Package Publish
PG-A Weinre
On device
debugging PG-B
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
CFMobile Features
6
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
CFMobile : CFML Support
§  Enclose client side CFML in <cfclient> tag
§  CFML code in cfclient is translated to JavaScript
§  Transparently handles Sync->Async API conversion
§  Makes device API access easy
7
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Problems of Asynchronous Programming
§  Problems when using asynchronous programming
§  Asynchronous programming can quickly become complicated. Many of the standard JavaScript
APIs rely heavily on callbacks, which are often nested, making them difficult to debug. In
addition, the use of anonymous inline functions can make reading the call stack problematic.
Exceptions that are thrown from within a heavily nested set of callbacks might not be
propagated up to a function that initiated the chain. This makes it difficult to determine exactly
where a bug is hidden.
Source : Asynchronous programming in JavaScript (Windows Runtime apps using JavaScript and
HTML) - http://msdn.microsoft.com/en-us/library/windows/apps/hh700330.aspx
8
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Simple Use-case for Async code
§  Get file, given the path – using async function getFile
§  Copy it to a destination folder – using async function fileCopy
§  Do not overwrite file
§  If file with same name exist, create file name by incrementing index
§  Perform actions depending on if file-copy is successful
§  We will compare Async code and equivalent cfclient/sync code
§  It is pseudo-code
§  Not real device APIs for File access
9
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Problems of Asynchronous Programming
10
Note
•  File APIs, getFile, fileExists and fileCopy are async.
All are factitious functions but similar to PG File
APIs
•  fileExists and fileCopy are called in a loop
Such code will never work as expected
•  While loop will never give a chance to callback
functions to execute and set boolean flag
- because JavaScript is single-threaded
•  You will need to simulate loop using recursive
function calls
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Asynchronous programming made easy in cfclient
11
Note
•  File APIs, getFile, fileExists and fileCopy are async.
All are factitious functions but similar to PG File APIs
•  fileExists and fileCopy are called in a loop
This code in cfclient will work because
•  cfclient translates async loop to equivalent code
using recursive function
•  PG Async functions have corresponding wrapper
functions in cfclient
•  Translated code is still async, so application is not
blocked
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Async Vs. cfclient
12
Compare Async code on the left
side with cfclient-sync code on
the right
cfclient is easier to write, read
and maintain
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
CFMobile : CFML Support Continued …
§  CFML support on client side
§  All data structures and related functions – Struct, List, Array, Date, Query etc.
§  Tag and cfscript style code
§  All basic language tags e.g. cfif, cffunction, cfloop, cfquery etc.
§  Does not support server side tags like cfldap, cfexchange*, cfpresentation etc.
§  Does not support server side functions like getAuthUser, spreadsheet functions etc.
§  Only variables, this and super scopes supported
§  Does not support Application, Server, Client, Session and Arguments scope.
13
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
CFMobile : CFML Support Continued …
§  OOP using client side CFComponent
§  No CFInterface
§  Easy way to call server side CFCs from cfclient
§  Client side custom tags
§  Wrap client side CFML in <cfclient> and use that file as custom tag
§  Client side (in-browser) database
§  Use cfquery or queryExecute to execute client side SQL
§  Device APIs like Camera, Contacts, Audio etc. supported
§  Using PhoneGap
14
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
CFMobile : JS and CFML
§  Interoperability between JS and client side CFML
§  Call JS functions from cfclient
§  Call cfclient functions from JS
15
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Which functions are asynchronous in cfclient
§  All device APIs are asynchronous
§  cfclient.* , for example, cfclient.camera.getPicture()
§  Any UDF that calls device API is async
§  True for CFCs too
§  Any UDF that calls any other UDF that calls device API is asyc
§  To call async cfclient function from JavaScript, use invokeCFClientFunction
§  invokeCFClientFunction (“function_name”, args …, callback_function() {});
§  Last argument must be callback function. Pass null if callback is not required.
16
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Examples of async function
<cfclient>	
<cfscript>	
function func1()	
{	
	//normal CFML code. No device API called	
	//This is a synchornous function	
}	
	 		
function func2()	
{	
	cfclient.camera.getPicture();	
	//Calls device API. This is an async function	
} 	 	



function func3()	
{	
	func2();	
	//Does not call device API, but calls func2	
	//which calls device API	
	//So this function is async	
}	
</cfscript>	
</cfclient>
17
<script>
func3();
callThisAfterFunc3();
</script>
<script>
invokeCFClientFunction(“func3”,function(){
callThisAfterFunc3();
});
</script>
✔
✗
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
CFMobile – Support in ColdFusion Builder
§  New Mobile project wizard
§  Complete editor support for client side CFML in cfclient
§  Code assist, Outline, Folding, Code hyperlink etc.
§  Client side CFML debugger
§  Debug code running in desktop browser or on mobile device
§  Breakpoints, Step operations, Variable inspection
§  Package mobile applications
§  Uses PhoneGap Build server
§  Can package application for DOM inspection (using Weinre)
18
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
HTML5 Mobile Application Deployment Options
19
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
HTML5 Mobile Application Deployment – Web App
07/01/13
•  Pages are loaded from server
No device API Access
•  Easy web update
Mobile Web Application
HTML/
JS/CSS
Mobile
Web Browser
Device APIs
(Camera, Contacts ..)
Local DB
✗
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
How cfclient is compiled in Web App
§  Web App – CFML file is loaded in browser from CF server
§  Before output is returned from CF server all <cfclient> blocks translated to <script> block
§  Can mix server side and cfclient code in the same file
§  Cannot use variables/functions declared in server side code in cfclient and vice versa
§  Client side CFCs and <cfinclude> are translated to .js files
21
index.cfm
<html>
<!--- server side code --->
<cffunction name=“server_side_func1”>
</cffunction>
<!--- client side code --->
<cfclient>
<!--- CFML Code --->
</cfclient>
</html>
Output to Browser
<html>
<!– HTML output -->
<script>
<!-- JS Code translated from cfclient -->
</script>
</html>
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
HTML5 Mobile Application Deployment – Standalone App
07/01/13
Mobile
Native Mobile
Application
Device APIs
(Camera, Contacts ..)
HTML,JS,CSS
Local DB
✔
u  Native app with WebView embedded
All assets loaded locally
u  Access to device APIs
Standalone App
PhoneGap
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
How cfclient is compiled in Standalone App
§  Standalone App – HTML5 code is loaded from device
§  All cfclient code is translated to JS. .cfm(l) files are renamed to .html
§  Can’t mix server side and cfclient code in the same file. Server side CFML is ignored
§  Client side CFCs and <cfinclude> are translated to .js files
23
index.cfm
<html>
<!--- HTML5 code ---
>
<cfclient>
<!--- CFML Code --->
</cfclient>
</html>
Index.html
<html>
<!– HTML output -->
<script>
<!-- JS Code
translated from
cfclient -->
</script>
</html>
CF 11
Translate
CFB 3
PGB
Server
PackageAPK / IPA
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Mobile
HTML5 Mobile Application Deployment – Hybrid App
07/01/13
Native Mobile
Application
Device APIs
(Camera, Contacts ..)
Local DB
•  Native app with WebView Embedded
•  Pages loaded from server
Access to device APIs
•  Easy web update
Hybrid Application
✔
HTML/
JS/CSS
PhoneGap
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Tools for CFMobile
25
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Tools for testing and debugging CFMobile Applications
§  Running CFMobile applications
§  Desktop browser if you are not using any device APIs
§  Client side database supported
§  ColdFusion (PhoneGap) Shell application
§  Supports all device APIs and client side database
§  What is ColdFusion (PhoneGap) Shell application
§  Native iOS or Android app with embedded WebKit browser and PhoneGap libraries
§  Supports all PhoneGap APIs
§  Can be installed on actual device or Simulator/Emulator
§  Need Xcode (IDE by Apple) if you want to install Shell app in iOS Simulator
§  Must <cfinclude template="/CFIDE/cfclient/useragent.cfm" >
§  Account with build.phonegap.com if you want to package app from CFB
§  Android/iOS Emulator/Simulator if you do not have physical device
§  Apple developer/distribution certificate if you want to install app on iOS device
26
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Typical workflow
§  Code CFMobile application in ColdFusion Builder
§  Can use any JS libraries like Jquery, Jquery Mobile, Bootstrap etc.
§  Run application
§  Desktop browser if no device APIs
§  Shell app
§  Debug
§  Launch from CFB
§  Run in desktop browser or Shell app
27
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Typical workflow - Continues …
§  Inspect
§  Run app in Shell app with ?inspect parameter added to URL
§  Go back to code and make necessary changes
§  Package Application from CFB
§  Install
§  Download APK (Android) and/or IPA (iOS) files from CFB
§  Install on mobile device
28
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Demo
29
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Resources
30
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Downloads
§  See http://blogs.coldfusion.com/post.cfm/slides-of-e-seminar-everything-about-mobile-application-development
converting pptx to PDF does not retain hyperlinks so please visit the link above.
§  ColdFusion 11 & ColdFusion Builder 3
http://www.adobe.com/go/trycoldfusion/

http://www.adobe.com/go/trycoldfusionbuilder/
§  Shell apps
§  PhoneGap Shell app for Android (.apk) - 1.7 MB
§  PhoneGap Shell app project for iOS – 14 MB (zip)
§  readme.txt
§  Xcode - iOS Dev Center
§  Android SDK (if you want Android Emulator)
§  See http://blogs.coldfusion.com/post.cfm/slides-of-e-seminar-everything-about-mobile-application-development
31
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
ColdFusion Documentation
§  See
http://blogs.coldfusion.com/post.cfm/slides-of-e-seminar-everything-about-mobile-application-
development
converting pptx to PDF does not retain hyperlinks so please visit the link above.
§  Mobile Application Development
§  Using ColdFusion Builder
§  DevNet Articles
§  Build your first mobile app with ColdFusion 11 (http://www.adobe.com/devnet/coldfusion/
articles/build-your-first-mobile-app.html)
§  Overview: Mobile application development with ColdFusion 11 (http://www.adobe.com/
devnet/coldfusion/articles/mobile-application-development-overview.html)
32
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
CFMobile related Blogs
§  Simplify Mobile Application Development Using ColdFusion
§  Creating database mobile application with ColdFusion Splendor
§  CFMobile Example – Taking picture and uploading to ColdFusion server
§  CFMobile Example – Using Geolocation APIs in ColdFusion Splendor
§  CFClient – Understanding Battery Events
§  CFMobile Example – Record and playback audio using ColdFusion Splendor
§  Why does cfclient file upload API take callback functions?
§  CFMobile Example – Accessing remote data from mobile application
§  CFMobile - How to display CF query data returned from remote CFC
§  ColdFusion Splendor – When to use invokeCFClientFunction
§  New CF Mobile Project – Templates
§  ColdFusion Thunder – It’s all new IDE
33
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
CFMobile related Videos
§  See
http://blogs.coldfusion.com/post.cfm/slides-of-e-seminar-everything-about-mobile-application-
development
converting pptx to PDF does not retain hyperlinks so please visit the link above.
§  ColdFusion Mobile Workflow in ColdFusion Splendor
§  Getting Started with ColdFusion Mobile in Splendor
(shorter version of the first video – does not contain debug and inspect workflow)
34
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thank you
35
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

More Related Content

What's hot

Content server installation guide
Content server installation guideContent server installation guide
Content server installation guideNaveed Bashir
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding RESTNitin Pande
 
OWASP Top 10 A4 – Insecure Direct Object Reference
OWASP Top 10 A4 – Insecure Direct Object ReferenceOWASP Top 10 A4 – Insecure Direct Object Reference
OWASP Top 10 A4 – Insecure Direct Object ReferenceNarudom Roongsiriwong, CISSP
 
Aem dispatcher – tips & tricks
Aem dispatcher – tips & tricksAem dispatcher – tips & tricks
Aem dispatcher – tips & tricksAshokkumar T A
 
Best practices for RESTful web service design
Best practices for RESTful web service designBest practices for RESTful web service design
Best practices for RESTful web service designRamin Orujov
 
Exposing Salesforce REST Services Using Swagger
Exposing Salesforce REST Services Using SwaggerExposing Salesforce REST Services Using Swagger
Exposing Salesforce REST Services Using SwaggerSalesforce Developers
 
People soft application-designer-practice-8.43
People soft application-designer-practice-8.43People soft application-designer-practice-8.43
People soft application-designer-practice-8.43cesarvii
 
Rest & RESTful WebServices
Rest & RESTful WebServicesRest & RESTful WebServices
Rest & RESTful WebServicesPrateek Tandon
 
Rest and the hypermedia constraint
Rest and the hypermedia constraintRest and the hypermedia constraint
Rest and the hypermedia constraintInviqa
 
EMC Documentum - xCP 2.x Troubleshooting
EMC Documentum - xCP 2.x TroubleshootingEMC Documentum - xCP 2.x Troubleshooting
EMC Documentum - xCP 2.x TroubleshootingHaytham Ghandour
 
Oracle Service Bus & Coherence Caching Strategies
Oracle Service Bus & Coherence Caching StrategiesOracle Service Bus & Coherence Caching Strategies
Oracle Service Bus & Coherence Caching StrategiesWilliam Markito Oliveira
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 

What's hot (20)

Tutorial su Java RMI
Tutorial su Java RMITutorial su Java RMI
Tutorial su Java RMI
 
Content server installation guide
Content server installation guideContent server installation guide
Content server installation guide
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding REST
 
OWASP Top 10 A4 – Insecure Direct Object Reference
OWASP Top 10 A4 – Insecure Direct Object ReferenceOWASP Top 10 A4 – Insecure Direct Object Reference
OWASP Top 10 A4 – Insecure Direct Object Reference
 
Aem dispatcher – tips & tricks
Aem dispatcher – tips & tricksAem dispatcher – tips & tricks
Aem dispatcher – tips & tricks
 
Best practices for RESTful web service design
Best practices for RESTful web service designBest practices for RESTful web service design
Best practices for RESTful web service design
 
Exposing Salesforce REST Services Using Swagger
Exposing Salesforce REST Services Using SwaggerExposing Salesforce REST Services Using Swagger
Exposing Salesforce REST Services Using Swagger
 
Spring Security
Spring SecuritySpring Security
Spring Security
 
People soft application-designer-practice-8.43
People soft application-designer-practice-8.43People soft application-designer-practice-8.43
People soft application-designer-practice-8.43
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Support distributed computing and caching avec hazelcast
Support distributed computing and caching avec hazelcastSupport distributed computing and caching avec hazelcast
Support distributed computing and caching avec hazelcast
 
Rest & RESTful WebServices
Rest & RESTful WebServicesRest & RESTful WebServices
Rest & RESTful WebServices
 
Rest and the hypermedia constraint
Rest and the hypermedia constraintRest and the hypermedia constraint
Rest and the hypermedia constraint
 
EMC Documentum - xCP 2.x Troubleshooting
EMC Documentum - xCP 2.x TroubleshootingEMC Documentum - xCP 2.x Troubleshooting
EMC Documentum - xCP 2.x Troubleshooting
 
What is REST?
What is REST?What is REST?
What is REST?
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
Oracle Service Bus & Coherence Caching Strategies
Oracle Service Bus & Coherence Caching StrategiesOracle Service Bus & Coherence Caching Strategies
Oracle Service Bus & Coherence Caching Strategies
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
Android Pentesting
Android PentestingAndroid Pentesting
Android Pentesting
 
Self Healing Capabilities of Domino 10
Self Healing Capabilities of Domino 10Self Healing Capabilities of Domino 10
Self Healing Capabilities of Domino 10
 

Similar to Developing html5 mobile applications using cold fusion 11

IBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platformIBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platformDaniela Zuppini
 
ColdFusion 11 Overview - CFSummit 2013
ColdFusion 11 Overview - CFSummit 2013ColdFusion 11 Overview - CFSummit 2013
ColdFusion 11 Overview - CFSummit 2013Rupesh Kumar
 
Introduction to Adobe Flex
Introduction to Adobe FlexIntroduction to Adobe Flex
Introduction to Adobe FlexAngelin R
 
Php Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerPhp Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerJackson F. de A. Mafra
 
Flash Builder for PHP and Mobile development
Flash Builder for PHP and Mobile developmentFlash Builder for PHP and Mobile development
Flash Builder for PHP and Mobile developmentMihai Corlan
 
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalHimanshu Mendiratta
 
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty GenovaScale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty GenovaCorley S.r.l.
 
FaSilET² full end-to-end testing solution presented at OW2con'19, June 12-13,...
FaSilET² full end-to-end testing solution presented at OW2con'19, June 12-13,...FaSilET² full end-to-end testing solution presented at OW2con'19, June 12-13,...
FaSilET² full end-to-end testing solution presented at OW2con'19, June 12-13,...OW2
 
Cfengine presentation at the RMLL
Cfengine presentation at the RMLLCfengine presentation at the RMLL
Cfengine presentation at the RMLLRUDDER
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netconline training
 
Max flash based code quality is there a canary in your coal mine-
Max  flash based code quality  is there a canary in your coal mine-Max  flash based code quality  is there a canary in your coal mine-
Max flash based code quality is there a canary in your coal mine-Xavier Agnetti
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsJim Jeffers
 
Flex for enterprise applications
Flex for enterprise applicationsFlex for enterprise applications
Flex for enterprise applicationsdarshanvartak
 
Coldfusion
ColdfusionColdfusion
ColdfusionRam
 

Similar to Developing html5 mobile applications using cold fusion 11 (20)

IBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platformIBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platform
 
ColdFusion 11 Overview - CFSummit 2013
ColdFusion 11 Overview - CFSummit 2013ColdFusion 11 Overview - CFSummit 2013
ColdFusion 11 Overview - CFSummit 2013
 
ColdFusion Internals
ColdFusion InternalsColdFusion Internals
ColdFusion Internals
 
Lamp Zend Security
Lamp Zend SecurityLamp Zend Security
Lamp Zend Security
 
Introduction to Adobe Flex
Introduction to Adobe FlexIntroduction to Adobe Flex
Introduction to Adobe Flex
 
Php Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerPhp Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant Killer
 
Flash Builder for PHP and Mobile development
Flash Builder for PHP and Mobile developmentFlash Builder for PHP and Mobile development
Flash Builder for PHP and Mobile development
 
2014 cf summit_clustering
2014 cf summit_clustering2014 cf summit_clustering
2014 cf summit_clustering
 
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere Portal
 
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty GenovaScale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
 
FaSilET² full end-to-end testing solution presented at OW2con'19, June 12-13,...
FaSilET² full end-to-end testing solution presented at OW2con'19, June 12-13,...FaSilET² full end-to-end testing solution presented at OW2con'19, June 12-13,...
FaSilET² full end-to-end testing solution presented at OW2con'19, June 12-13,...
 
Cfengine presentation at the RMLL
Cfengine presentation at the RMLLCfengine presentation at the RMLL
Cfengine presentation at the RMLL
 
Codename one
Codename oneCodename one
Codename one
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
 
Max flash based code quality is there a canary in your coal mine-
Max  flash based code quality  is there a canary in your coal mine-Max  flash based code quality  is there a canary in your coal mine-
Max flash based code quality is there a canary in your coal mine-
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
Cgi perl
Cgi  perlCgi  perl
Cgi perl
 
Flex for enterprise applications
Flex for enterprise applicationsFlex for enterprise applications
Flex for enterprise applications
 
Coldfusion
ColdfusionColdfusion
Coldfusion
 
An Overview of Angular 4
An Overview of Angular 4 An Overview of Angular 4
An Overview of Angular 4
 

More from ColdFusionConference

Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server DatabasesColdFusionConference
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsColdFusionConference
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectColdFusionConference
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerColdFusionConference
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISColdFusionConference
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016ColdFusionConference
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016ColdFusionConference
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusionConference
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMSColdFusionConference
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webColdFusionConference
 

More from ColdFusionConference (20)

Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
 
Cf ppt vsr
Cf ppt vsrCf ppt vsr
Cf ppt vsr
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
 
Don't just pdf, Smart PDF
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDF
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
 
ColdFusion in Transit action
ColdFusion in Transit actionColdFusion in Transit action
ColdFusion in Transit action
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
 
Securing applications
Securing applicationsSecuring applications
Securing applications
 
Testing automaton
Testing automatonTesting automaton
Testing automaton
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 

Developing html5 mobile applications using cold fusion 11

  • 1. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Developing HTML5 Mobile Applications Using ColdFusion 11 (Splendor) Ram Kulkarni 1 @ram_kulkarni ramkulkarni.com
  • 2. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Agenda §  What is CFMobile §  Typical workflow §  ColdFusion & CFB Features for CFMobile §  Tools required for testing and debugging §  Demos 2
  • 3. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. What is CFMobile §  HTML5 Mobile application development framework using ColdFusion and ColdFusion Builder §  Advantages §  Leverage your knowledge of CFML to develop mobile applications §  Simplifies coding of mobile applications §  CFMobile debugger : on-device debugging §  Inspect DOM and console messages §  Easily package mobile applications Supports complete workflow for mobile application development 3
  • 4. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. What CFMobile is not §  Develop native mobile application §  Bunch of UI tags §  Automatically converts your website to mobile application responsive design 4
  • 5. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CF 11 Mobile Development Workflow Create a mobile web project Write code Client and Server Test Debug Package Publish PG-A Weinre On device debugging PG-B
  • 6. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CFMobile Features 6
  • 7. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CFMobile : CFML Support §  Enclose client side CFML in <cfclient> tag §  CFML code in cfclient is translated to JavaScript §  Transparently handles Sync->Async API conversion §  Makes device API access easy 7
  • 8. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Problems of Asynchronous Programming §  Problems when using asynchronous programming §  Asynchronous programming can quickly become complicated. Many of the standard JavaScript APIs rely heavily on callbacks, which are often nested, making them difficult to debug. In addition, the use of anonymous inline functions can make reading the call stack problematic. Exceptions that are thrown from within a heavily nested set of callbacks might not be propagated up to a function that initiated the chain. This makes it difficult to determine exactly where a bug is hidden. Source : Asynchronous programming in JavaScript (Windows Runtime apps using JavaScript and HTML) - http://msdn.microsoft.com/en-us/library/windows/apps/hh700330.aspx 8
  • 9. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Simple Use-case for Async code §  Get file, given the path – using async function getFile §  Copy it to a destination folder – using async function fileCopy §  Do not overwrite file §  If file with same name exist, create file name by incrementing index §  Perform actions depending on if file-copy is successful §  We will compare Async code and equivalent cfclient/sync code §  It is pseudo-code §  Not real device APIs for File access 9
  • 10. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Problems of Asynchronous Programming 10 Note •  File APIs, getFile, fileExists and fileCopy are async. All are factitious functions but similar to PG File APIs •  fileExists and fileCopy are called in a loop Such code will never work as expected •  While loop will never give a chance to callback functions to execute and set boolean flag - because JavaScript is single-threaded •  You will need to simulate loop using recursive function calls
  • 11. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Asynchronous programming made easy in cfclient 11 Note •  File APIs, getFile, fileExists and fileCopy are async. All are factitious functions but similar to PG File APIs •  fileExists and fileCopy are called in a loop This code in cfclient will work because •  cfclient translates async loop to equivalent code using recursive function •  PG Async functions have corresponding wrapper functions in cfclient •  Translated code is still async, so application is not blocked
  • 12. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Async Vs. cfclient 12 Compare Async code on the left side with cfclient-sync code on the right cfclient is easier to write, read and maintain
  • 13. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CFMobile : CFML Support Continued … §  CFML support on client side §  All data structures and related functions – Struct, List, Array, Date, Query etc. §  Tag and cfscript style code §  All basic language tags e.g. cfif, cffunction, cfloop, cfquery etc. §  Does not support server side tags like cfldap, cfexchange*, cfpresentation etc. §  Does not support server side functions like getAuthUser, spreadsheet functions etc. §  Only variables, this and super scopes supported §  Does not support Application, Server, Client, Session and Arguments scope. 13
  • 14. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CFMobile : CFML Support Continued … §  OOP using client side CFComponent §  No CFInterface §  Easy way to call server side CFCs from cfclient §  Client side custom tags §  Wrap client side CFML in <cfclient> and use that file as custom tag §  Client side (in-browser) database §  Use cfquery or queryExecute to execute client side SQL §  Device APIs like Camera, Contacts, Audio etc. supported §  Using PhoneGap 14
  • 15. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CFMobile : JS and CFML §  Interoperability between JS and client side CFML §  Call JS functions from cfclient §  Call cfclient functions from JS 15
  • 16. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Which functions are asynchronous in cfclient §  All device APIs are asynchronous §  cfclient.* , for example, cfclient.camera.getPicture() §  Any UDF that calls device API is async §  True for CFCs too §  Any UDF that calls any other UDF that calls device API is asyc §  To call async cfclient function from JavaScript, use invokeCFClientFunction §  invokeCFClientFunction (“function_name”, args …, callback_function() {}); §  Last argument must be callback function. Pass null if callback is not required. 16
  • 17. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Examples of async function <cfclient> <cfscript> function func1() { //normal CFML code. No device API called //This is a synchornous function } function func2() { cfclient.camera.getPicture(); //Calls device API. This is an async function } 
 
 function func3() { func2(); //Does not call device API, but calls func2 //which calls device API //So this function is async } </cfscript> </cfclient> 17 <script> func3(); callThisAfterFunc3(); </script> <script> invokeCFClientFunction(“func3”,function(){ callThisAfterFunc3(); }); </script> ✔ ✗
  • 18. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CFMobile – Support in ColdFusion Builder §  New Mobile project wizard §  Complete editor support for client side CFML in cfclient §  Code assist, Outline, Folding, Code hyperlink etc. §  Client side CFML debugger §  Debug code running in desktop browser or on mobile device §  Breakpoints, Step operations, Variable inspection §  Package mobile applications §  Uses PhoneGap Build server §  Can package application for DOM inspection (using Weinre) 18
  • 19. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. HTML5 Mobile Application Deployment Options 19
  • 20. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. HTML5 Mobile Application Deployment – Web App 07/01/13 •  Pages are loaded from server No device API Access •  Easy web update Mobile Web Application HTML/ JS/CSS Mobile Web Browser Device APIs (Camera, Contacts ..) Local DB ✗
  • 21. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. How cfclient is compiled in Web App §  Web App – CFML file is loaded in browser from CF server §  Before output is returned from CF server all <cfclient> blocks translated to <script> block §  Can mix server side and cfclient code in the same file §  Cannot use variables/functions declared in server side code in cfclient and vice versa §  Client side CFCs and <cfinclude> are translated to .js files 21 index.cfm <html> <!--- server side code ---> <cffunction name=“server_side_func1”> </cffunction> <!--- client side code ---> <cfclient> <!--- CFML Code ---> </cfclient> </html> Output to Browser <html> <!– HTML output --> <script> <!-- JS Code translated from cfclient --> </script> </html>
  • 22. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. HTML5 Mobile Application Deployment – Standalone App 07/01/13 Mobile Native Mobile Application Device APIs (Camera, Contacts ..) HTML,JS,CSS Local DB ✔ u  Native app with WebView embedded All assets loaded locally u  Access to device APIs Standalone App PhoneGap
  • 23. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. How cfclient is compiled in Standalone App §  Standalone App – HTML5 code is loaded from device §  All cfclient code is translated to JS. .cfm(l) files are renamed to .html §  Can’t mix server side and cfclient code in the same file. Server side CFML is ignored §  Client side CFCs and <cfinclude> are translated to .js files 23 index.cfm <html> <!--- HTML5 code --- > <cfclient> <!--- CFML Code ---> </cfclient> </html> Index.html <html> <!– HTML output --> <script> <!-- JS Code translated from cfclient --> </script> </html> CF 11 Translate CFB 3 PGB Server PackageAPK / IPA
  • 24. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Mobile HTML5 Mobile Application Deployment – Hybrid App 07/01/13 Native Mobile Application Device APIs (Camera, Contacts ..) Local DB •  Native app with WebView Embedded •  Pages loaded from server Access to device APIs •  Easy web update Hybrid Application ✔ HTML/ JS/CSS PhoneGap
  • 25. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Tools for CFMobile 25
  • 26. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Tools for testing and debugging CFMobile Applications §  Running CFMobile applications §  Desktop browser if you are not using any device APIs §  Client side database supported §  ColdFusion (PhoneGap) Shell application §  Supports all device APIs and client side database §  What is ColdFusion (PhoneGap) Shell application §  Native iOS or Android app with embedded WebKit browser and PhoneGap libraries §  Supports all PhoneGap APIs §  Can be installed on actual device or Simulator/Emulator §  Need Xcode (IDE by Apple) if you want to install Shell app in iOS Simulator §  Must <cfinclude template="/CFIDE/cfclient/useragent.cfm" > §  Account with build.phonegap.com if you want to package app from CFB §  Android/iOS Emulator/Simulator if you do not have physical device §  Apple developer/distribution certificate if you want to install app on iOS device 26
  • 27. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Typical workflow §  Code CFMobile application in ColdFusion Builder §  Can use any JS libraries like Jquery, Jquery Mobile, Bootstrap etc. §  Run application §  Desktop browser if no device APIs §  Shell app §  Debug §  Launch from CFB §  Run in desktop browser or Shell app 27
  • 28. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Typical workflow - Continues … §  Inspect §  Run app in Shell app with ?inspect parameter added to URL §  Go back to code and make necessary changes §  Package Application from CFB §  Install §  Download APK (Android) and/or IPA (iOS) files from CFB §  Install on mobile device 28
  • 29. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Demo 29
  • 30. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Resources 30
  • 31. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Downloads §  See http://blogs.coldfusion.com/post.cfm/slides-of-e-seminar-everything-about-mobile-application-development converting pptx to PDF does not retain hyperlinks so please visit the link above. §  ColdFusion 11 & ColdFusion Builder 3 http://www.adobe.com/go/trycoldfusion/
 http://www.adobe.com/go/trycoldfusionbuilder/ §  Shell apps §  PhoneGap Shell app for Android (.apk) - 1.7 MB §  PhoneGap Shell app project for iOS – 14 MB (zip) §  readme.txt §  Xcode - iOS Dev Center §  Android SDK (if you want Android Emulator) §  See http://blogs.coldfusion.com/post.cfm/slides-of-e-seminar-everything-about-mobile-application-development 31
  • 32. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. ColdFusion Documentation §  See http://blogs.coldfusion.com/post.cfm/slides-of-e-seminar-everything-about-mobile-application- development converting pptx to PDF does not retain hyperlinks so please visit the link above. §  Mobile Application Development §  Using ColdFusion Builder §  DevNet Articles §  Build your first mobile app with ColdFusion 11 (http://www.adobe.com/devnet/coldfusion/ articles/build-your-first-mobile-app.html) §  Overview: Mobile application development with ColdFusion 11 (http://www.adobe.com/ devnet/coldfusion/articles/mobile-application-development-overview.html) 32
  • 33. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CFMobile related Blogs §  Simplify Mobile Application Development Using ColdFusion §  Creating database mobile application with ColdFusion Splendor §  CFMobile Example – Taking picture and uploading to ColdFusion server §  CFMobile Example – Using Geolocation APIs in ColdFusion Splendor §  CFClient – Understanding Battery Events §  CFMobile Example – Record and playback audio using ColdFusion Splendor §  Why does cfclient file upload API take callback functions? §  CFMobile Example – Accessing remote data from mobile application §  CFMobile - How to display CF query data returned from remote CFC §  ColdFusion Splendor – When to use invokeCFClientFunction §  New CF Mobile Project – Templates §  ColdFusion Thunder – It’s all new IDE 33
  • 34. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. CFMobile related Videos §  See http://blogs.coldfusion.com/post.cfm/slides-of-e-seminar-everything-about-mobile-application- development converting pptx to PDF does not retain hyperlinks so please visit the link above. §  ColdFusion Mobile Workflow in ColdFusion Splendor §  Getting Started with ColdFusion Mobile in Splendor (shorter version of the first video – does not contain debug and inspect workflow) 34
  • 35. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Thank you 35
  • 36. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.