{"id":1122,"date":"2014-02-21T10:11:56","date_gmt":"2014-02-21T04:41:56","guid":{"rendered":"http:\/\/ramkulkarni.com\/blog\/?p=1122"},"modified":"2014-02-21T10:11:56","modified_gmt":"2014-02-21T04:41:56","slug":"simplify-mobile-application-development-using-coldfusion","status":"publish","type":"post","link":"http:\/\/ramkulkarni.com\/blog\/simplify-mobile-application-development-using-coldfusion\/","title":{"rendered":"Simplify Mobile Application Development Using ColdFusion"},"content":{"rendered":"<p>Public beta of next versions of ColdFusion Server (code named Splendor) and ColdFusion Builder (code named Thunder) were released yesterday on <a href=\"http:\/\/labs.adobe.com\/technologies\/coldfusion\/\" target=\"_blank\">Adobe\u00a0Labs<\/a>. I have been closely involved with implementation of some of the features in both Splendor and Thunder, specifically Mobile features in Splendor and editors in Thunder.<\/p>\n<p>Splendor and Thunder together provide a complete workflow to create HTML5 Mobile applications &#8211; you can easily develop, test, debug and package applications for mobile. I have created a short video to explain this workflow with a simple example, and this video is available on adobecoldfusion channel on YouTube.<!--more--><\/p>\n<p><span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"525\" height=\"296\" src=\"https:\/\/www.youtube.com\/embed\/Qyu6QbLEGqg?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span><\/p>\n<p>[On adobecoldfusion channel you might see two videos on mobile &#8211; 1. Getting Started with ColdFusion Mobile in Splendor 2. ColdFusion Mobile Workflow in ColdFusion Splendor. The first video is a subset of the second one and does not cover test and debug workflow.]<\/p>\n<p>When you create mobile application using ColdFusion, you write code in CFML. Now we have tow versions of CFML &#8211; 1. server side 2. client side. Client side CFML must be enclosed in &lt;cfclient&gt; tag. All the basic CFML language constructs and data types are supported in the client side CFML. Some of the very useful tags are also supported in cfclient &#8211; \u00a0like cfquery, cfoutput, cfsavecontent etc.<\/p>\n<p>Though client side CFML looks similar to server side CFML, it is processed differently. Server side CFML is translated to Java bytecode and runs in a Java Virtual Machine (JVM) on the server. Client side CFML is translated to JavaScript and run in a web browser. So once client side CFML is packaged as a mobile application, it does not need CF server to run &#8211; because it is all JavaScript.<\/p>\n<p>If you \u00a0want to quickly try out how all this works, download <a href=\"https:\/\/www.adobe.com\/cfusion\/entitlement\/index.cfm?e=labs_coldfusion11\" target=\"_blank\">ColdFusion Thunder<\/a> (IDE). You will need to sing-in with Adobe ID before you can download the build. Go to &#8216;ColdFusion Builder Project Thunder&#8217; section towards bottom of the page and download the build for your platform.<br \/>\nNote that ColdFusion Thunder now comes packaged with a default server, so you need not download ColdFusion Splendor separately.<\/p>\n<ol>\n<li>Download the <a href=\"http:\/\/ramkulkarni.com\/temp\/2014-02-21\/SimpleExpenseTracker.zip\" target=\"_blank\">SimpleExpenseTracker project<\/a> that I explained in the video and unzip it in the wwwroot folder of the detaultServer that is packaged with Thunder. Location of this folder is &lt;thunder_install_folder&gt;<span style=\"font-size: 16px;\">\/Applications\/CFBThunderBeta\/ColdFusion\/cfusion\/wwwroot<\/span><\/li>\n<li>In Thunder (CF Builder), go to File-&gt;Import menu and in the Import wizard, select ColdFusion-&gt;Import existing Projects<\/li>\n<li>Browse to the folder where you unzipped expense tracker project and select that folder e.g.\u00a0&lt;thunder_install_folder&gt;\/Applications\/CFBThunderBeta\/ColdFusion\/cfusion\/wwwroot\/SimpleExpenseTracker<\/li>\n<li>In the project list you will see expense tracker project selected. Click finish<\/li>\n<li><span style=\"font-size: 16px;\">Once you import the project, you need to associate CF server with it. Make sure &#8216;defaultLocal&#8217; server (in CF Servers view) is running. If not, click on the server and then click &#8216;Start Server&#8217; icon.<\/span><\/li>\n<li><span style=\"font-size: 16px;\">Right click the project in the Navigator view and select Properties from the pop-up menu.\u00a0<\/span><\/li>\n<li>Go to ColdFusion Server Settings and select &#8216;defaultLocal&#8217; from the servers drop down list and click OK.<\/li>\n<\/ol>\n<p>Because this project does not use any device APIs (like for Contacts, Camera etc.), you can run this application in Chrome\/Safari desktop browser. Note that this will not run in browsers that to not support SQLite, e,g, IE.<br \/>\nOpen Chrome and browse to SimpleTrackerFolder e.g. http:\/\/localhost:8500\/SimpleTracker<\/p>\n<p>Note that this example was created simply to get you started with mobile development with ColdFusion. The code in the example is not optimal &#8211; in real applications you would want to separate UI code from the remaining. I would post an example of the same app done with better coding practices later.<\/p>\n<p>If you want to follow debug and inspect workflow in the video, then you will need the Shell application. As I explained in the video, this application is a standalone Android\/iOS application with web browser embedded in it and created with PhoneGap libraries. So all the PhoneGap APIs would be available to pages opened in this app. It looks like this application is not yet uploaded on Adobe Labs, but you can download it from follow locations &#8211;<\/p>\n<ul>\n<li><a href=\"http:\/\/ramkulkarni.com\/temp\/2014-02-21\/PhoneGapShellApp.apk\" target=\"_blank\">PhoneGap Shell app for Android (.apk) <\/a>&#8211; 1.7 MB<\/li>\n<li><a href=\"http:\/\/ramkulkarni.com\/temp\/2014-02-21\/PhoneGapShellApp.zip\" target=\"_blank\">PhoneGap Shell app project for iOS<\/a> &#8211; 14 MB (zip)<\/li>\n<li><a href=\"http:\/\/ramkulkarni.com\/temp\/2014-02-21\/PGShellApp_readme.txt\" target=\"_blank\">readme.txt<\/a><\/li>\n<\/ul>\n<p>We cannot distribute packaged application for iOS because of licensing restrictions, so the entire Xcode project for this app is made available.<\/p>\n<p>Give this feature a try and you will find that mobile application\u00a0development\u00a0is made a lot more easier by ColdFusion. Both products are still in beta, so also tell us how we can improve them. Go to\u00a0https:\/\/bugbase.adobe.com\/ to log bugs or enhancements.<\/p>\n<p>-Ram Kulkarni<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Public beta of next versions of ColdFusion Server (code named Splendor) and ColdFusion Builder (code named Thunder) were released yesterday on Adobe\u00a0Labs. I have been closely involved with implementation of some of the features in both Splendor and Thunder, specifically Mobile features in Splendor and editors in Thunder. Splendor and Thunder together provide a complete &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/ramkulkarni.com\/blog\/simplify-mobile-application-development-using-coldfusion\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Simplify Mobile Application Development Using ColdFusion&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Simplify Mobile Application Development Using ColdFusion  http:\/\/wp.me\/p2g9O8-i6","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[32,23,78,17,1],"tags":[89,90,91,92],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2g9O8-i6","jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/posts\/1122"}],"collection":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/comments?post=1122"}],"version-history":[{"count":0,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/posts\/1122\/revisions"}],"wp:attachment":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/media?parent=1122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/categories?post=1122"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/tags?post=1122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}