|By Mike Jacobs||
|March 17, 2011 03:00 PM EDT||
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
The Sencha company logo is a green leaf, presumably because sencha is a Japanese whole leaf green tea. I am an ardent coffee drinker but I really like this tea. Sencha is perhaps best known for their Ext JS and Ext GWT libraries. Sencha Touch is their latest library released late in 2010. There are several similar libraries in various stages of development, but Sencha was one of the first to market and I am working on commercial products that depend on released libraries. The first release includes support for Android and Apple iOS devices. Reading the tea leaves promises future support for Blackberry 6 and Blackberry Torch. The library is open source and supports a dual license approach making it appropriate for commercial use. The library includes:
- Robust data integration including access to AJAX, JSONP, or YQL and local storage
- Large library of user interface elements many of which automatically bind to the data objects
- Advanced native look-and-feel styling, animation and branding capabilities
- Model, View, Controller (MVC) support to put it all together
Figure 2 - Example Sencha Touch application running on Apple iPhones
My First Sips of Sencha
I started using Sench Touch in the Summer of 2010 while it was in beta. I had the typical beta experience of incomplete documentation, a few bugs and changing API. Over the frequent updates, the documentation improved and examples were updated to align with the latest API. Throughout the beta and after the production release, I worked on my application. My application successfully used local storage, tree and carousal navigation, animated transitions, custom search features and selective user updates to content. The plan is to deploy on Apple iOS devices first with the need for possibly many different branding themes.
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
- Continuous integration
- Multiple browser testing
- Event testing
- Mock objects
- Organization of tests (e.g. suites)
- Code coverage reports
Figure 4 - A unit testing console for displaying progress and results
- Start the Selenium RC server
- Specify the regression test HTML files
- Specify the browsers to run the regression
- Run the tests
- Collect and report the success or failure of the tests
- Optionally create coverage reports
- Shutdown the Selenium RC server
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
Despite the trivial effort to get the application running on the simulator, there were three minor gaps to address:
- The default target is iPhones. This means the application would start up and run on an iPad with the dimensions of a phone (with the 2x option). Sencha Touch reported the platform as a phone even when running on the actual iPad device. Ideally, the default would be what Apple calls a Universal App that runs on all devices and adjusts itself when running. After some research, I found that the solution was few mouse clicks away within Xcode.
- Orientation changes did not work. A Sencha Touch application can change the way it looks based on the orientation of the device. PhoneGap always reported the device orientation as portrait (0 degrees) even though Sencha Touch correctly reported the current orientation. The solution was a minor hack to monitor for the window resize event and inform Sencha Touch to do the right thing.
- Certain text was rendered as a link. Clicking on the link offered to add or update a contact. What was that all about? It turns out the default web view component in the iOS SDK attempts to find phone number and e-mail addresses and automatically makes them links to the appropriate app like contacts. Pretty cool if you want that behavior but does 001-999.9 look like a phone number? The solution was to add one line of Objective-C code in the PhoneGap generated code to turn this behavior off.
Live Long and Provision
In order to get your application running on an actual device you must go through a complex process Apple calls provisioning. There is a nice step by step procedure to get you through it all available on the Apple developer site. Now that I have my Sencha Touch application running on an iPad I see that performance work is needed. Now that automated build and test process is going to pay off. It is clear to me that a robust development cycle with this technology is possible and practical.
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.
- Opinions expressed in this article are those solely of the author and do not reflect those of my employer.
- iPhone image Courtesy of Apple
- Sencha Touch application images used with permission
- The Android logo is reproduced from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.
- Sencha: http://www.sencha.com/
- SASS: http://sass-lang.com/
- YUI Test Standalone Library: http://yuilibrary.com/yuitest/
- Selenium Remote Control: http://seleniumhq.org/projects/remote-control/
- Apache Ant: http://ant.apache.org/
- LCOV: http://ltp.sourceforge.net/coverage/lcov.php
- PhoneGap: http://www.phonegap.com/
The IoTs will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform. In his session at @ThingsExpo, Craig Sproule, CEO of Metavine, will demonstrate how to move beyond today's coding paradigm and share the must-have mindsets for removing complexity from the development proc...
May. 30, 2016 06:00 AM EDT Reads: 2,000
SYS-CON Events announced today TechTarget has been named “Media Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. TechTarget is the Web’s leading destination for serious technology buyers researching and making enterprise technology decisions. Its extensive global networ...
May. 30, 2016 05:30 AM EDT Reads: 3,292
SYS-CON Events announced today that Commvault, a global leader in enterprise data protection and information management, has been named “Bronze Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Commvault is a leading provider of data protection and information management...
May. 30, 2016 04:45 AM EDT Reads: 3,298
The essence of data analysis involves setting up data pipelines that consist of several operations that are chained together – starting from data collection, data quality checks, data integration, data analysis and data visualization (including the setting up of interaction paths in that visualization). In our opinion, the challenges stem from the technology diversity at each stage of the data pipeline as well as the lack of process around the analysis.
May. 30, 2016 03:15 AM EDT Reads: 1,532
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, wh...
May. 30, 2016 03:00 AM EDT Reads: 2,083
Designing IoT applications is complex, but deploying them in a scalable fashion is even more complex. A scalable, API first IaaS cloud is a good start, but in order to understand the various components specific to deploying IoT applications, one needs to understand the architecture of these applications and figure out how to scale these components independently. In his session at @ThingsExpo, Nara Rajagopalan is CEO of Accelerite, will discuss the fundamental architecture of IoT applications, ...
May. 30, 2016 03:00 AM EDT Reads: 1,387
SYS-CON Events announced today that Tintri Inc., a leading producer of VM-aware storage (VAS) for virtualization and cloud environments, will exhibit at the 18th International CloudExpo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, New York, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA.
May. 30, 2016 02:45 AM EDT Reads: 2,522
SYS-CON Events announced today that MangoApps will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. MangoApps provides modern company intranets and team collaboration software, allowing workers to stay connected and productive from anywhere in the world and from any device. For more information, please visit https://www.mangoapps.com/.
May. 30, 2016 02:45 AM EDT Reads: 1,066
SYS-CON Events announced today that Alert Logic, Inc., the leading provider of Security-as-a-Service solutions for the cloud, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Alert Logic, Inc., provides Security-as-a-Service for on-premises, cloud, and hybrid infrastructures, delivering deep security insight and continuous protection for customers at a lower cost than traditional security solutions. Ful...
May. 30, 2016 02:15 AM EDT Reads: 3,003
In his session at 18th Cloud Expo, Bruce Swann, Senior Product Marketing Manager at Adobe, will discuss how the Adobe Marketing Cloud can help marketers embrace opportunities for personalized, relevant and real-time customer engagement across offline (direct mail, point of sale, call center) and digital (email, website, SMS, mobile apps, social networks, connected objects). Bruce Swann has more than 15 years of experience working with digital marketing disciplines like web analytics, social med...
May. 30, 2016 02:00 AM EDT Reads: 1,479
SYS-CON Events announced today Object Management Group® has been named “Media Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA.
May. 30, 2016 01:00 AM EDT Reads: 2,688
SYS-CON Events announced today that EastBanc Technologies will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. EastBanc Technologies has been working at the frontier of technology since 1999. Today, the firm provides full-lifecycle software development delivering flexible technology solutions that seamlessly integrate with existing systems – whether on premise or cloud. EastBanc Technologies partners with p...
May. 29, 2016 10:00 PM EDT Reads: 2,413
SYS-CON Events announced today that ContentMX, the marketing technology and services company with a singular mission to increase engagement and drive more conversations for enterprise, channel and SMB technology marketers, has been named “Sponsor & Exhibitor Lounge Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2016, at the Javits Center in New York City, New York. “CloudExpo is a great opportunity to start a conversation with new prospects, but what happens after the...
May. 29, 2016 04:45 PM EDT Reads: 1,344
WebRTC is bringing significant change to the communications landscape that will bridge the worlds of web and telephony, making the Internet the new standard for communications. Cloud9 took the road less traveled and used WebRTC to create a downloadable enterprise-grade communications platform that is changing the communication dynamic in the financial sector. In his session at @ThingsExpo, Leo Papadopoulos, CTO of Cloud9, will discuss the importance of WebRTC and how it enables companies to fo...
May. 29, 2016 04:15 PM EDT Reads: 2,615
The IoT is changing the way enterprises conduct business. In his session at @ThingsExpo, Eric Hoffman, Vice President at EastBanc Technologies, discuss how businesses can gain an edge over competitors by empowering consumers to take control through IoT. We'll cite examples such as a Washington, D.C.-based sports club that leveraged IoT and the cloud to develop a comprehensive booking system. He'll also highlight how IoT can revitalize and restore outdated business models, making them profitable...
May. 29, 2016 02:00 PM EDT Reads: 3,009
Customer experience has become a competitive differentiator for companies, and it’s imperative that brands seamlessly connect the customer journey across all platforms. With the continued explosion of IoT, join us for a look at how to build a winning digital foundation in the connected era – today and in the future. In his session at @ThingsExpo, Chris Nguyen, Group Product Marketing Manager at Adobe, will discuss how to successfully leverage mobile, rapidly deploy content, capture real-time d...
May. 29, 2016 12:45 PM EDT Reads: 1,704
What a difference a year makes. Organizations aren’t just talking about IoT possibilities, it is now baked into their core business strategy. With IoT, billions of devices generating data from different companies on different networks around the globe need to interact. From efficiency to better customer insights to completely new business models, IoT will turn traditional business models upside down. In the new customer-centric age, the key to success is delivering critical services and apps wit...
May. 29, 2016 10:30 AM EDT Reads: 1,313
Join us at Cloud Expo | @ThingsExpo 2016 – June 7-9 at the Javits Center in New York City and November 1-3 at the Santa Clara Convention Center in Santa Clara, CA – and deliver your unique message in a way that is striking and unforgettable by taking advantage of SYS-CON's unmatched high-impact, result-driven event / media packages.
May. 29, 2016 10:00 AM EDT Reads: 2,562
In his keynote at 18th Cloud Expo, Andrew Keys, Co-Founder of ConsenSys Enterprise, will provide an overview of the evolution of the Internet and the Database and the future of their combination – the Blockchain. Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life ...
May. 29, 2016 09:45 AM EDT Reads: 2,047
SYS-CON Events announced today that BMC Software has been named "Siver Sponsor" of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2015 at the Javits Center in New York, New York. BMC is a global leader in innovative software solutions that help businesses transform into digital enterprises for the ultimate competitive advantage. BMC Digital Enterprise Management is a set of innovative IT solutions designed to make digital business fast, seamless, and optimized from mainframe to mo...
May. 29, 2016 09:30 AM EDT Reads: 2,331