Living on the Edge of Mobile Development
Overview and experience with Sencha Touch, YUI Test and PhoneGap
By: Mike Jacobs
Mar. 17, 2011 03:00 PM
Which mobile device should I target for my application? That's one of the first questions you need to answer as a mobile developer. You might select the device based on personal preference or what looks cool today. The problem is that mobile technology choices are diverse and evolving quickly. The tools and languages used to develop native applications vary wildly and you probably cannot afford to learn them all. Chances are you want to find a way to replicate your application across multiple devices while minimizing your investment. How can that be done?
Hybrid Is More than a Green Decision
Figure 1 - This diagram depicts the major differences between mulitple native and hybrid application development
Sencha Touch Is My Cup of Tea
Figure 2 - Example Sencha Touch application running on Apple iPhones
My First Sips of Sencha
I found it quite easy to define enities and storage objects with the data integration features. The storage objects were extensible enough to add custom search features. The user interface elements often took some experimentation and reverse engineering to fill in the gaps of light documentation. I had to become familiar with the inspection and debugging features of Chrome and Safari to ultimately answer many questions. There are still a few inconsistencies in how user interface element templates are used but overall, the library is quite complete. One of the most powerful user interface features is the branding support.
The branding support in Sencha uses Syntactically Awesome Stylesheets (SASS). SASS is a scripting language that describes how to generate cascading stylesheets. Need to change your corporate color across all user interface elements? Change it in one place and regenerate your native look-and-feel stylesheet. Sencha Touch ships with a full library of SASS scripts that you can easily extend to meet your branding needs. This approach also encodes images into the stylesheet to reduce the number of files to deploy. I was able to extend the SASS to specify branding color selections, omit unused user interface elements and specify the needed icons.
Figure 3 - You can also write applications for the Apple iPad
This is Only a Test
Figure 4 - A unit testing console for displaying progress and results
PhoneGap also provides console integration with desktop debuggers, support for six platforms and integrated development environment (IDE) project templates. You must have your target platform SDK installed to use PhoneGap. Since my project is targeting Apple iOS, that means a Mac running the Xcode IDE and the iOS SDK. After downloading and installing the IDE, SDK and PhoneGap, a new project template was available. I created a new PhoneGap project and the template created all the native programs, build targets and default properties and images for me. I copied the application build results into the Xcode project, pressed Build and Run and the application was running in the phone simulator. It was that simple. No Objective-C to learn or write with less than a day from install to running.
Gaps with PhoneGap
Live Long and Provision
There are bound to be changes in the available libraries and supported devices in the coming months. Sencha Touch and PhoneGap is a powerful and easy to use combination that is ready now.
Latest Cloud Developer Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
SYS-CON Featured Whitepapers
Most Read This Week