So far I have posted CFMobile examples that were mostly standalone applications (except a photo application that uploaded image to server). However many mobile applications may need to interact with server, for example to show data from a remote database, to modify data or for many other purposes.
CFMobile features in ColdFusion Splendor make accessing remote CF server very easy. I will demonstrate this using a simple example – I will build a mobile app that displays employee records fetched from a remote CF server. The client side (cfclient) code calls a CFC on the server side which fetches data and returns result to the calling page. You will see that creating and accessing a server side CFC is as easy as it is in a completely server side CFML code – you don’t need to worry about writing code to make AJAX calls. cfclient does that for you transparently. I should mention here that this feature to call server CFCs from cfclient is not limited to mobile application, you can even use it for any web application.
Here is a screenshot of the application –
Continue reading “CFMobile Example – Accessing remote data from mobile application”
In this post I am going to show how easy it is to record audio and play it back in a mobile application using ColdFusion Splendor. If you haven’t already, you can download it from Adobe Labs.
I have tried to keep the application simple. There are two buttons, Record and Play. When you click Record button, the recording starts and the Stop button is displayed. Speak into the phone microphone to record your voice. When done, click Stop button. You can play back the audio by clicking Play button. You can also stop playback any time by clicking Stop button.
Here are the screen shots –
Continue reading “CFMobile Example – Record and playback audio using ColdFusion Splendor”
Though ColdFusion Thunder is the next version of ColdFusion Builder (the last version was 2.0.1), it is like a new IDE because it’s a major re-write. Past versions of ColdFusion Builder were built on top of Aptana. I had noted some of the challenges in implementing ColdFusion Builder a couple of years back, when CFB 2.0.1 was released.
The task was huge and we, in the ColdFusion team, had been working very hard during the past two years to – first build all (or most) the features of CFB 2.0.1 in Thunder, and then to add some more features. If you have used ColdFusion Builder in the past, then you will see great performance improvements in all the editors in Thunder. Specifically you should see difference when editing large files. The memory footprint is also improved.
Here are some of the new/improved features in Thunder – Continue reading “ColdFusion Thunder – It's all new IDE”
In this post I am going to show you how to create a mobile application using ColdFusion Splendor that can take a picture and upload the picture to CF server. This application uses Camera and File APIs.
The application is very simple – it has two buttons, one to take picture and the other one to set URL where pictures are to be uploaded. You can set URL of the server before taking a picture or after, just before it is to be uploaded. Once the URL is set, it is stored in the localStorage and will be remembered. There is a messages div where the application displays messages about different operations it is performing.
Continue reading “CFMobile Example – Taking picture and uploading to ColdFusion server”
I was going to cover a use-case of taking picture in a mobile app and uploading it to ColdFusion Server in this post, but I found some issues in packaging an app that used Geolocation APIs when helping someone and thought that I would cover geolocation first.
This sample application is very simple – it gets your current location and displays a marker at that location on the Goole Map APIs. Here is how the application looks – Continue reading “CFMobile Example – Using Geolocation APIs in ColdFusion Splendor”
In my previous post, Simplify Mobile Application Development Using ColdFusion, I posted a video that showed how easy it is to create mobile application with CFMobile features of ColdFusion Splendor (Server) and ColdFusion Thunder (IDE). In that video I created a simple app called ‘Simple Expense Tracker’. But the code was not optimal, because the main purpose of the video was to show you features of CFMoible. I also mentioned that I will post a better example of the same app.
So In this post I will show you how to create a database application, where user interface code is separated from the data access code. I will also use JQuery for DOM access and Bootstrap for UI. Continue reading “Creating database mobile application with ColdFusion Splendor”
Public beta of next versions of ColdFusion Server (code named Splendor) and ColdFusion Builder (code named Thunder) were released yesterday on Adobe Labs. 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 workflow to create HTML5 Mobile applications – 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. Continue reading “Simplify Mobile Application Development Using ColdFusion”
A reader of my blog post De/Serializing Recordings in Recordable HTML5 Canvas had asked me how to change stroke color and size when recording. I told him that this could be done by adding actions, like setColor and setStrokeSize. For more information about how the recordable canvas was implemented, see my blog post Record and Playback Drawing in HTML5 Canvas . I have updated the example with following new features –
- Setting stroke color and size – both for drawing and recording
- Pausing and resuming recording. You may want to pause recording if, for example, you do not want to record time delay when you select stroke color/size. Duration of time that the recording is paused is skipped when playing back the recording.
Here is the demo of how the new features work. Select a color by clicking on any color box on the right side of the canvas. Default selection is black. Currently selected color is displayed in a little bigger box with rounded corner. To select stroke size, I have added a few predefined circles of different sizes on the right side. Currently selected stroke size is displayed in black.
Continue reading “Record and Playback Drawing in HTML5 Canvas – Part II”
WordPress has created a nice summary of statistics of my blog for the year 2013. The report is available at http://jetpack.me/annual-report/33403624/2013/
Here are some of the highlights –
- I wrote 15 blog posts in 2013, taking the total posts to 47. So I wrote a lot less posts in 2013 compared to 2012, the year I started this blog.
- There were 83000 views of the blog in 2013
- Other than search engines, top two referring sites were stackoverflow.com and jquerymobile.com
- Visitors came from 168 countries. Most from USA, followed by India and Germany
Recently I was working on an application that required WebView to be embedded in the same View Controller along with other native iOS controls. I decided to use the above framework, but knew that my ViewController class will have to extend WebViewController class of the framework. Though I could have done that, I thought separating the functionality of UIWebViewDelegate from the WebViewController would be a better design. So I replaced WebViewController with WebViewDelegate which implements UIWebViewDelegate protocol. I also removed getInitialPageName method from WebViewInterface.h . So here are the files in the new framework – Continue reading “Framework for interacting with embedded WebView in iOS application”