|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/
If you’re responsible for an application that depends on the data or functionality of various IoT endpoints – either sensors or devices – your brand reputation depends on the security, reliability, and compliance of its many integrated parts. If your application fails to deliver the expected business results, your customers and partners won't care if that failure stems from the code you developed or from a component that you integrated. What can you do to ensure that the endpoints work as expect...
Oct. 1, 2016 04:30 AM EDT Reads: 1,796
Just over a week ago I received a long and loud sustained applause for a presentation I delivered at this year’s Cloud Expo in Santa Clara. I was extremely pleased with the turnout and had some very good conversations with many of the attendees. Over the next few days I had many more meaningful conversations and was not only happy with the results but also learned a few new things. Here is everything I learned in those three days distilled into three short points.
Oct. 1, 2016 04:00 AM EDT Reads: 5,471
WebRTC adoption has generated a wave of creative uses of communications and collaboration through websites, sales apps, customer care and business applications. As WebRTC has become more mainstream it has evolved to use cases beyond the original peer-to-peer case, which has led to a repeating requirement for interoperability with existing infrastructures. In his session at @ThingsExpo, Graham Holt, Executive Vice President of Daitan Group, will cover implementation examples that have enabled ea...
Oct. 1, 2016 04:00 AM EDT Reads: 1,653
SYS-CON Events announced today that ReadyTalk, a leading provider of online conferencing and webinar services, has been named Vendor Presentation Sponsor at the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. ReadyTalk delivers audio and web conferencing services that inspire collaboration and enable the Future of Work for today’s increasingly digital and mobile workforce. By combining intuitive, innovative tec...
Oct. 1, 2016 04:00 AM EDT Reads: 3,122
There is growing need for data-driven applications and the need for digital platforms to build these apps. In his session at 19th Cloud Expo, Muddu Sudhakar, VP and GM of Security & IoT at Splunk, will cover different PaaS solutions and Big Data platforms that are available to build applications. In addition, AI and machine learning are creating new requirements that developers need in the building of next-gen apps. The next-generation digital platforms have some of the past platform needs a...
Oct. 1, 2016 03:00 AM EDT Reads: 1,970
Fifty billion connected devices and still no winning protocols standards. HTTP, WebSockets, MQTT, and CoAP seem to be leading in the IoT protocol race at the moment but many more protocols are getting introduced on a regular basis. Each protocol has its pros and cons depending on the nature of the communications. Does there really need to be only one protocol to rule them all? Of course not. In his session at @ThingsExpo, Chris Matthieu, co-founder and CTO of Octoblu, walk you through how Oct...
Oct. 1, 2016 03:00 AM EDT Reads: 2,447
Smart Cities are here to stay, but for their promise to be delivered, the data they produce must not be put in new siloes. In his session at @ThingsExpo, Mathias Herberts, Co-founder and CTO of Cityzen Data, will deep dive into best practices that will ensure a successful smart city journey.
Oct. 1, 2016 02:30 AM EDT Reads: 2,715
Businesses are struggling to manage the information flow and interactions between all of these new devices and things jumping on their network, and the apps and IT systems they control. The data businesses gather is only helpful if they can do something with it. In his session at @ThingsExpo, Chris Witeck, Principal Technology Strategist at Citrix, will discuss how different the impact of IoT will be for large businesses, expanding how IoT will allow large organizations to make their legacy ap...
Oct. 1, 2016 02:30 AM EDT Reads: 658
Adobe is changing the world though digital experiences. Adobe helps customers develop and deliver high-impact experiences that differentiate brands, build loyalty, and drive revenue across every screen, including smartphones, computers, tablets and TVs. Adobe content solutions are used daily by millions of companies worldwide-from publishers and broadcasters, to enterprises, marketing agencies and household-name brands. Building on its established design leadership, Adobe enables customers not o...
Oct. 1, 2016 02:30 AM EDT Reads: 550
Major trends and emerging technologies – from virtual reality and IoT, to Big Data and algorithms – are helping organizations innovate in the digital era. However, to create real business value, IT must think beyond the ‘what’ of digital transformation to the ‘how’ to harness emerging trends, innovation and disruption. Architecture is the key that underpins and ties all these efforts together. In the digital age, it’s important to invest in architecture, extend the enterprise footprint to the cl...
Oct. 1, 2016 02:15 AM EDT Reads: 759
SYS-CON Events announced today that Numerex Corp, a leading provider of managed enterprise solutions enabling the Internet of Things (IoT), will exhibit at the 19th International Cloud Expo | @ThingsExpo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Numerex Corp. (NASDAQ:NMRX) is a leading provider of managed enterprise solutions enabling the Internet of Things (IoT). The Company's solutions produce new revenue streams or create operating...
Oct. 1, 2016 02:15 AM EDT Reads: 2,139
24Notion is full-service global creative digital marketing, technology and lifestyle agency that combines strategic ideas with customized tactical execution. With a broad understand of the art of traditional marketing, new media, communications and social influence, 24Notion uniquely understands how to connect your brand strategy with the right consumer. 24Notion ranked #12 on Corporate Social Responsibility - Book of List.
Oct. 1, 2016 02:15 AM EDT Reads: 522
Why do your mobile transformations need to happen today? Mobile is the strategy that enterprise transformation centers on to drive customer engagement. In his general session at @ThingsExpo, Roger Woods, Director, Mobile Product & Strategy – Adobe Marketing Cloud, covered key IoT and mobile trends that are forcing mobile transformation, key components of a solid mobile strategy and explored how brands are effectively driving mobile change throughout the enterprise.
Oct. 1, 2016 01:45 AM EDT Reads: 523
As ridesharing competitors and enhanced services increase, notable changes are occurring in the transportation model. Despite the cost-effective means and flexibility of ridesharing, both drivers and users will need to be aware of the connected environment and how it will impact the ridesharing experience. In his session at @ThingsExpo, Timothy Evavold, Executive Director Automotive at Covisint, will discuss key challenges and solutions to powering a ride sharing and/or multimodal model in the a...
Oct. 1, 2016 01:15 AM EDT Reads: 728
In his general session at 18th Cloud Expo, Lee Atchison, Principal Cloud Architect and Advocate at New Relic, discussed cloud as a ‘better data center’ and how it adds new capacity (faster) and improves application availability (redundancy). The cloud is a ‘Dynamic Tool for Dynamic Apps’ and resource allocation is an integral part of your application architecture, so use only the resources you need and allocate /de-allocate resources on the fly.
Oct. 1, 2016 01:15 AM EDT Reads: 3,049
In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lea...
Sep. 30, 2016 11:30 PM EDT Reads: 784
SYS-CON Events announced today that Roundee / LinearHub will exhibit at the WebRTC Summit at @ThingsExpo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. LinearHub provides Roundee Service, a smart platform for enterprise video conferencing with enhanced features such as automatic recording and transcription service. Slack users can integrate Roundee to their team via Slack’s App Directory, and '/roundee' command lets your video conference ...
Sep. 30, 2016 10:45 PM EDT Reads: 1,543
Web Real-Time Communication APIs have quickly revolutionized what browsers are capable of. In addition to video and audio streams, we can now bi-directionally send arbitrary data over WebRTC's PeerConnection Data Channels. With the advent of Progressive Web Apps and new hardware APIs such as WebBluetooh and WebUSB, we can finally enable users to stitch together the Internet of Things directly from their browsers while communicating privately and securely in a decentralized way.
Sep. 30, 2016 10:00 PM EDT Reads: 1,266
"My role is working with customers, helping them go through this digital transformation. I spend a lot of time talking to banks, big industries, manufacturers working through how they are integrating and transforming their IT platforms and moving them forward," explained William Morrish, General Manager Product Sales at Interoute, in this SYS-CON.tv interview at 18th Cloud Expo, held June 7-9, 2016, at the Javits Center in New York City, NY.
Sep. 30, 2016 09:30 PM EDT Reads: 4,137
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...
Sep. 30, 2016 09:00 PM EDT Reads: 4,066