Using Adobe ColdFusion (2016 release) and ColdFusion Builder (2016 release) (comprising the ColdFusion Mobile Platform), you can quickly build mobile applications targeting multiple platforms. You do not have to focus on the limitations and capabilities of various mobile platforms and their supporting web browsers. You can build your mobile applications completely using ColdFusion and can make it work equally well on desktop browsers, mobile browsers, and as installed HTML5-based native applications.
The ColdFusion Mobile Platform aims at providing a server and development infrastructure that facilitates rapid and robust mobile application development, debugging, packaging, and deployment. The platform comprises of the following key components:
- ColdFusion Builder: You can use ColdFusion Builder along with ColdFusion Server for quickly building, debugging, inspecting, and packaging mobile applications.
The following picture depicts the mobile application development workflow using the ColdFusion Mobile Platform:
Note: This version of the pre-release bundle supports debugging while building mobile applications using ColdFusion Builder.
Types of mobile applications
ColdFusion Mobile Platform allows you to create 3 types of mobile applications:
- Type 1 - HTML5-based standalone app that can be installed on the mobile device as a standalone application. ColdFusion Builder allows you to build platform-specific mobile applications using Adobe's PhoneGap build service.
- Type 2 - ColdFusion-deployed web app that can be rendered through the mobile device's web browser. There is no support for device's native functionalities.
- Type 3 – Hybrid/shell app that can run as a standalone mobile application. This type supports device's native functionalities.
You can decide on the type of application based on the application requirements.
Note: You can use the window.ispgbuild property to identify if an application is running as shell application or packaged application.
Setting up the ColdFusion server
Install ColdFusion Server by following the instructions provided in the installation guide. While installation, you do not need to configure the server to support mobile applications as the support is available by default.
Setting up ColdFusion Builder
Install ColdFusion Builder by following the instructions provided in the Installing Adobe ColdFusion Builder guide. Before you start reading this document, read the Using Adobe ColdFusion Builder guide.
Creating a mobile project
Note that ColdFusion Builder has introduced a new 'ColdFusion Mobile Project' type that will help you build and package mobile applications. However, you can convert your existing ColdFusion projects to a ColdFusion Mobile projects automatically. See Migrating existing projects.
To create a ColdFusion Mobile project, perform the following tasks:
- Click File > New > ColdFusion Mobile Project or Right-click on the Navigator area and click New > ColdFusion Mobile Project. You will be asked to select a mobile template. For more information on creating your own mobile template, read Mobile Templates. To import existing templates, click Import. Note that the mobile template must conform to the standards outlined in Mobile Templates.
- Click Next.
- In the Project Information section, enter the following details:
- Enter the name of your project.
- Select the CFML Dictionary Version as ColdFusion 2016.
- Click Next.
- In the Server Details screen, from the Servers dropdown box, and click Add Server.
- In the Server Settings screen, enter the server details. For more information, read the Using ColdFusion Builder guide. Click Next.
- In the Link Folders section, map the specific ColdFusion directories available under the Server's web root to your project:
- Click Finish.
You have successfully created a ColdFusion Mobile project. Now you can start building your mobile applications. Note that at this point, you do not need to configure the project with any PhoneGap settings.
While developing mobile applications using ColdFusion platform, ensure that the index.cfm and index.html files are in the root directory of the selected assets as part of the phonegap build from ColdFusion Builder.
Write some code
Now that you have a mobile project, write some code to capture an image from the device camera:
Migrating existing projects
You can automatically convert your existing ColdFusion projects to ColdFusion Mobile projects by applying the ColdFusion Mobile nature as shown in the following screen shot: