The mobile experience
Mobile platforms have become the next disruptive technological force in the enterprise.
Devices such as smart phones and tablets are quickly emerging as dominant clients. It will soon be critical for enterprises to be able extend their infrastructure and SOA investments out to such devices. According to Gartner, mobile phones will overtake PCs as the most common Web access devices worldwide by 2013. It will be important also to enable multiple channels through which your customers can interact with your processes, because consumers often begin a process on a device like a phone with minimal information and then complete it on their computer at home.
In my previous Comment lines column on Web 2.0 maturity, I discussed how REST enablement is a key attribute to extending to Rich Internet Applications. REST enablement is also the key to extending your investments to the mobile world, so if you have matured in your Web 2.0 development and have begun creating the infrastructure around REST, then you are much closer to the mobile world then you realize, because mobile platforms can use REST APIs to access data.
Mobile users today expect high-fidelity access to the same information they have on the desktop, presented in an easy-to-learn, mobile-friendly (often touch-friendly) format. So in many ways, mobile presents new challenges:
- Mobile users require efficient and timely access to information.
- Interactions are short and focused and interruptions are common.
- Devices are often exclusively touch-based.
- User interfaces must be easy and obvious.
- Screen real estate is precious.
- Typing should be minimized.
- Applications must still be usable when out of wireless coverage.
- Timeliness of data must be communicated.
- Security is critical.
- Devices are often used for monitoring as opposed to active consumption.
- Social interactions are important.
- Mobile hardware and user interfaces evolve much faster than the typical enterprise software cycle.
Developing mobile applications
Mobile has brought the notion of the "app" to the forefront. While just a few years ago, mobile was about transcoding content to fit the device, the mobile experience has evolved into full-fledged platforms for hosting mobile applications. Users of iPhone , Blackberry, Android, and other smart devices have become adapted to surfing an app store or market to find applications that they need (or just want).
Smart devices come with their native platforms. Apple devices are built on the iOS platform and developers build applications using Objective-C and Cocoa. Android and Blackberry also have their own toolkits. As such, enterprises can choose to enable developers on multiple platforms or to target just one or two platforms. Another solution is to buy a MEAP platform that performs code generation of native applications.
Yet the Web is evolving very fast, and if your goal is to enable as many devices as possible at minimal cost, then HTML 5 is a serious choice. HTML 5-based technology is the common platform across many of these devices and toolkits.
You can look at four approaches to mobile application development. Figure 1 shows the spectrum.
Figure 1. Approaches to mobile platform development
- Pure Web applications have a play in the mobile space. Tablets, such as an iPad, enable you to view Web sites. You need to consider how your Web applications behave on tablets and consider how elements like touch are enabled.
- Of course you have native applications, for which you use the SDK of the device to develop the application. This provides the highest in application richness, but each device has its own programming model. Packaging the application, putting it in an app store, updating it as the various operating systems are released, and other activities are all part of the maintenance cost associated with this application.
- And then there’s the hybrid model, a form where Web technologies can be used, but additional support to leverage native APIs can be bridged.
Enterprises don’t need an all or nothing approach to developing mobile applications. Much like you do now for any Web application, it might be that you categorize your platform selection around certain requirements. You need to consider several factors:
- Requirements: This is universal to any application, but important nonetheless. How can you leverage mobile for your business?
- Consumers: Are you targeting employees behind the firewall (B2E)? Are you targeting consumers (B2C)?
- Skill set: What technologies do your developers know?
- Current infrastructure: Does your infrastructure facilitate SOA and REST?
- Data: Is your data consumable by various channels?
- Security: Is your data safe being stored on these devices? Do you have the ability to encrypt devices in a B2E scenario? Do you permit offline storage in a B2C scenario?
If you require the best graphics and a game-like experience, you might want to consider building native applications and target just a few devices. However, with HTML 5 and CSS 3, the graphical experience might be good enough for most business applications. Unless you are building games, or perhaps some very intense pie charts and graphs, the cost of enabling your staff for native apps might not be enough to justify the means and could limit your reach to a minimal set of devices.
The mobile Web space is evolving fast. Various technologies can help you approach native-like experience:
- Dojo mobile
The Dojo Toolkit is IBM’s strategic toolkit for Web 2.0 based development. The Dojo Toolkit contains a mobile package under dojox. Through CSS3 and custom styles, the dojox.mobile package provides interfaces that display and work well on mobile devices. With prebuilt themes targeting various devices, you can create mobile Web applications that have a similar appearance to native applications. Figure 2 shows examples.
Figure 2. Dojo mobile examples
You can examine some test cases by opening them on your device.
- HTML 5 and mobile experience
Some aspects of HTML 5 can help your mobile Web application approach a native experience:
- The Web SQL database API isn’t actually part of the HTML 5 specification, but it is part of the suite of specifications that enables you to build fully-fledged Web applications. Webkit (Safari, SafariMobile, Chrome) supports this spec and, as such, SafariMobile extends its reach to iPhone and iPads.
- The cache manifest is a text file that lists all application resources that need to be cached in order for the given application to work without an Internet connection. The files listed in the cache manifest get stored in the application cache, which is like the browser's standard disk cache but much more robust. Once a resource is stored in the application cache, the browser will not request it from the Web until the cached item is de-cached or the cache manifest is invalidated. You can take advantage of this for your mobile applications.
- Other HTML 5 APIs, like geo-location, start closing the gap on some native experiences.
- Hybrid toolkits
When HTML 5 services are not enough, there are toolkits that enable you to create hybrid-based applications. One example is PhoneGap, an HTML 5 app platform that enables you to author native applications with Web technologies and get access to APIs and app stores; in a word, building hybrid applications. PhoneGap provides APIs to access device-specific artifacts, such as the camera, recorder, contacts, notifications, and others to help you target as many devices as possible. You can build apps with your current skill set and deploy them in an app store. You could also have parts of the application served up from your server.
Extending to mobile is becoming a key requirement for the enterprise. Emerging standards like HTML 5 and frameworks like dojox.mobile can help address these needs at minimal cost without compromise of function.
Thanks to Greg Truty and Chris Mitchell for their contributions to this column.
- Offline Web Applications
- Dive Into HTML5: Let's Take This Offline
- Experimenting with HTML 5 Cache Manifest
- Web 2.0, Mobile, and Middleware
- IBM developerWorks WebSphere