Vague memories, nothing but memories

A technology blog by Mícheál Ó Foghlú, CTO FeedHenry, learner, researcher, teacher, thinker, tinkerer, and gadget lover.

Developing and Managing Mobile Enterprise Apps Using Cloud Foundry and FeedHenry

| Comments

Dr Mícheál Ó Foghlú (CTO, FeedHenry) and Anthony Rizk (Lead Mobile Developer, VMware)


Mobile apps are the way that users interact with services on their smartphones. The main challenges with enterprise mobile apps are:

  • the fragmented nature of the smartphone market – there are several significant and mutually incompatible platforms: iOS, Android, RIM, WP7, …
  • access to enterprise back-end systems from mobile devices securely in a way that is appropriate for mobile data.

HTML5/CSS/JavaScript hybrid apps provide a good solution for the platform fragmentation problem, and a cloud-based MEAP (Mobile Enterprise Application Platform) running Node.js is a good solution for back-end access. Using the FeedHenry enterprise mobility solution and Cloud Foundry, VMware was able to successfully deliver the My VMware mobile app to both Android and iOS phones and tablets.

Key Takeaways

  1. HTML5/CSS/JavaScript hybrid apps are a good way to address the need for enterprise mobile apps across multiple smartphone and tablet platforms; libraries and packaging tools exist and are rapidly maturing that make it possible to deliver native quality apps with these technologies
  2. A MEAP (mobile enterprise application platform) is a necessary component of an enterprise mobility strategy, to enable secure back-end connectivity; using a cloud based Node.js solution works very well, especially paired with HTML5/CSS/JavaScript hybrid apps.
  3. Cloud Foundry and FeedHenry provide a secure, easy to set up solution for developing and managing enterprise mobile apps; VMware has successfully developed and released a widely used mobile app – My VMware for iOS and Android – on this technology stack Outline

Table of Contents

  1. Introduction – the Mobile App market, challenges and opportunities for enterprises.
  2. Solving Mobile Platform fragmentation with HTML5 hybrid apps.
  3. Mobilizing enterprise data systems with a MEAP.
  4. Cloud Foundry and FeedHenry – cloud-based, cross-platform mobile apps.
  5. Case Study: My VMware mobile app
  6. Conclusion

Introduction – the Mobile App market, challenges and opportunities for enterprises

It was the introduction of the iPhone in 2007 that really created the new market for mobile services packaged as apps. The iPhone did build upon the huge developments in mobile data, mobile services and mobile web that earlier smartphones had established, particularly using the J2ME software development paradigm, but the iPhone made the user experience closer to the desktop one, and pioneered intuitive touch interfaces for mobile devices. The pace of innovation quickened even further with the launch of the iPad in 2010. Since the iPhone launch Google’s Android platform, that can be used on both smartphones and pads, has gained significant traction, offering the only alternative with significant market traction to date. RIM’s BlackBerry and Microsoft’s Windows Phone do have some penetration, the former especially in enterprises.

The iPhone and iPad are primarily consumer devices, but riding a general trend of consumerization of the enterprise, these devices are increasing being deployed within enterprises either under a BYOD (Bring Your Own Device), or under a traditional managed device for employees by a central IT department.

Perhaps the best statistical summary of how Internet services are impacting on consumers and on enterprises is arguably the annual slide deck “Internet Trends” presented by Mary Meeker (formerly Morgan Stanley now KPCB) at the Web 2.0 Summit each year [1a], and other event [1b]. Over the past few years the rise of the mobile devices, of the app ecosystem that supports them, and of the growing numbers of users of services delivered via this ecosystem, has been the main theme. Her slides show that the iPad and iPhone have been the most successful consumer devices ever launched, and the Android has had a very significant market impact.

This paper addresses the challenges faced by enterprises trying to formulate a mobile strategy to address the rising importance of this new services ecosystem. It looks at the client-side issues relating to an integrated strategy for developing mobile services using cross-platform HTML5/CSS/JavaScript to maximize cross-platform re-use of client-side code. It looks at the server-side issues relating to middleware to protect enterprise end-points from being globally exposed, and to leverage a more mature N-Tier solutions architecture rather than putting everything onto the client-side (the proposed strategy leverages VMware’s Cloud Foundry Node.js JavaScript and Redis caching on the server-side). It presents a case study of the My VMware app, integrating with complex back-end systems, developed in flexible JavaScript server-side and client-side, and available on the Google Play marketplace for Android tablets and phones, and on Apple’s App Store for iOS iPads and iPhones.

Solving Mobile Platform fragmentation with HTML5 Hybrid apps

There is no single dominant smartphone platform – both Android and iOS have significant marketshare. With the rising trend of BYOD, both are widely used inside enterprises. BlackBerry is still a significant presence in some areas, and Windows Phone may yet achieve greater market penetration. The opening up of the tablet market has made this problem worse. Certainly iPad is dominant, but Android tablets are gaining share and other entries such as Windows 8 are on the horizon. These platforms generally have entirely incompatible developer tool stacks (i.e. Java with Android’s SDK on Eclipse or another editor vs. Objective-C and XCode for iOS). Enterprise developers therefore must support at least two mutually incompatible platforms, and in some cases three or more. This obviously significantly increases development and maintenance costs.

It makes sense to evaluate the cross-platform options available. One option is to avoid the app ecosystem entirely, and to develop a mobile web page that provides a service. The main disadvantages of this approach are that web pages have very limited permissions on the device, and so cannot integrate easily with the device features that make them so compelling (e.g. camera, accelerometer, GPS positioning, contacts DB). In addition most users currently look for solutions within the app ecosystem, rather than on the web, and so potentially users will not find these solutions.

The compromise is often referred to as a Hybrid App, that combines the best of a mobile web site with the local device features. This is achieved by bundling an app, typically coded using a User Interface (UI) in HTML5/CSS/JavaScript, accessing native device functionality via an abstracted JavaScript API that can be mapped into the different local implementations on each different device type, and complied into a native binary that can be distributed via the app ecosystem.

The runaway market leader in this approach is the open source PhoneGap project, recently re-branded as the Apache Cordova[2] project. PhoneGap provides both a ‘wrapper’ to bundle HTML5/CSS/JavaScript into a native app, and a native JavaScript API.

In addition developers usually use a third party JavaScript UI library to help build these apps. The two leaders are Sencha Touch[3] and JQuery Mobile[4]. These libraries both allow developers to create an experience that looks and feels like a native app, and both do a good job with iOS and Android, and have varying degrees of support for the other smartphone platforms.

Interestingly, hybrid apps may use web technologies, but they do not by default use a web server. The HTML5, CSS and JavaScript files are bundled into the application binary that is installed on the device, and thus they are loaded from the local file-system on the device, and not downloaded via an external web server.

Thus there is a strong economic argument for embracing cross-platform hybrid apps as part of an enterprise mobile strategy: 1. apps are developed once for mobile platforms. 2. apps are maintained in a single codebase for future updates. 3. developers need to learn one tool set to target all devices. 4. the tool set is an evolution of the standard web development tool set (HTML/CSS/JavaScript). 5. in general, web development expertise, even mobile app focused, is a cheaper resource than a native development resource.

There may be specific use cases where native development is a good option, for example when native UI performance is a requirement (e.g. optimized game UI), or when an enterprise controls devices and they are all the same (e.g. deploying an iPad only solution to a specif set of employees). However, in general, the cross-platform hybrid approach is likely to make traction over the next few years, and certainly for most enterprise class apps, HTML5/CSS/JavaScript provides a more than adequate solution already. In addition, for cases where native development may be needed – e.g. for performance reasons – PhoneGap can be extended to provide that functionality through custom JavaScript APIs which wrap native code. In fact, this was done with the My VMware mobile app project discussed below.

As a footnote to this section, anyone who doubts the ability of HTML5/CSS/JavaScript to cope with UI challenges should see Microsoft’s Internet Explorer Team implementation of Cut The Rope in these technologies[5]. Mobilizing enterprise systems with a MEAP Looking at the client-side only is to miss one of the critical elements of a mobile solutions strategy. There is a very good case to adopt a strategy involving a specialized piece of middleware called a Mobile Enterprise Access Platform (MEAP).

There are two main categories of enterprise use case for mobile solutions: 1. Create mobile access to an existing solution 2. Create a new (mobile-only or mobile-first) solution

In most cases both of these scenarios will require integration with some existing back-end enterprise systems (e.g. authentication at the very least, even for ‘mobile-only’ solutions).

Given that hybrid apps do not use a web server by default – they are self contained on the device – this means that if the requirement is for mobile devices to access these internal enterprise systems there are two options:

  1. Open up the enterprise end points to the world, and harden them (e.g, via authentication) to prevent abuse; this would then allow mobile apps to directly call these end-points
  2. Introduce a middleware layer (in mobile solutions – a MEAP) to protect the end points acting as a gateway; this allows the end points to remain closed to world access, with various options for communication with the gateway such as locating it locally or putting it external with some from of VPN back to the end points being protected; the mobile apps just call the gateway which then calls the end points

The second option is preferable for a number of reasons:

End-point security is only the initial justification for the use of some form of middleware layer in any mobile enterprise solution. The case in general for N-Tier architectures has been made in Enterprise IT over the past 30 years. Specifically for a mobile app solution it makes sense to minimize the client-side updates as much as possible as it a relatively heavy process to require end-users to update the app on device (though in some scenarios a Mobile Device Management solution could enforce these updates). Instead, changes made on the server-side can be dynamically deployed with immediate effect for all users. Thus it makes sense to treat the client-side app as a highly flexible view component, and allow the middleware to deal with changes to the end points as much as possible.

There are any number of options for a tool-set to develop this middleware component. This paper proposes the use of the emerging Node.js server-side JavaScript environment. When paired with the hybrid app approach to cross-platform development outlined in the previous section, this makes the programming environment on both client and server the same: JavaScript. This makes it trivial to use the JSON (JavaScript Object Notation) format for exchanging data between the client and middleware, and allows the same development team to easily move between client and server code.

Using a cloud solution to host the middleware makes a good choice for mobile apps. It’s difficult to predict what downloads will be and almost impossible to predict usage for most apps, so having a solution that scales quickly to meet higher than expected demand is very desirable.

Cloud Foundry and FeedHenry – cloud-based, cross-platform mobile apps

Cloud Foundry provides a Node.js runtime environment, and Node.js apps are well supported by the Cloud Foundry deploy tools. FeedHenry is a cloud mobile application platform which targets Cloud Foundry for server-side deployment.

FeedHenry also provides an on-device runtime environment for HTML5/JavaScript hybrid apps that enhances PhoneGap with some additional JavaScript APIs, and integrates seamlessly with its Node.js cloud-based MEAP components. Packaging and deployment of mobile apps that are back-end connected is made very easy using either the web-based studio or the command line fhc tool.

With FeedHenry and CloudFoundry together, it’s possible to get a mobile app on multiple platforms with endpoint connectivity set up in minutes. FeedHenry is agnostic with respect to client JavaScript libraries, so its possible to develop apps using Sench Touch, jQuery Mobile, or any other framework – e.g. Enyo, or even forgo a framework entirely and develop with pure HTML and JavaScript.

It is free to register for a public Cloud Foundry account and FeedHenry account at[6], and this gives the ability to create new apps, or clone some existing template apps, build a cross platform client-side for supported platforms (iOS, Android, BlackBerry OS 6.0+, Windows Phone 7.0+ and Embedded Web).

For a full tutorial on building your first mobile app, server-side and client-side, on this platform see this post on the Cloud Foundry blog[7].

Case Study: MyVMware mobile app

In April 2012, VMware launched the My VMware mobile app which is publicly available via the Apple App Store[8] and via Google Play[9] for Android.

My VMware iPad Screenshot

Figure 1: Screenshot My VMware iPad app

The mobile app was one element of the larger My VMware project that required the development of new web service API wrapper for the back-end enterprise systems.

The core functionality of the app is to provide read-only access to the licence entitlements of each customer. Thus a user can browser all of the licences and see who they have been assigned to within the organization. Once license info has been synced to the device, the app can work in situations without radio coverage so that e.g. an administrator can take their tablet or smartphone into a data centre to verify licenses.

The app was developed using the FeedHenry platform, with Sencha Touch (1.1) as the client JavaScript UI library. The software development team in India were trained up on the use of the Feedhenry platform to develop, deploy and manage the server-side and the client-side of the app.

Of the two leading JavaScript mobile UI frameworks, Sencha Touch was chosen over JQuery mobile for a couple of reasons: 1. Performance for complex UIs (memory and CPU usage) generally is better with Sencha Touch than JQuery mobile 2. The Sencha Touch programming model is more ‘app-like’ – the UI is entirely constructed using JavaScript – as opposed to JQuery mobile, which is more ‘web-like’ – web pages enhanced with JavaScript

The platform enabled rapid application development with working versions of the cloud (Node.js) and client-side (Sench Touch) code produced each iteration. Initial iterations were longer, with iterations towards the end of the project being 2-3 weeks in duration.

The revision control software used to manage the codebase was git, in this case hosted inside a hosted project management tool suite Unfuddle[10]. FeedHenry is integrated with git so that commits to the git repository are easily updated into the FeedHenry app, and a post-commit trigger can be enabled to auto-sync FeedHenry with the latest committed version of the software in the repository.

The data to drive these queries is provided via an Oracle Service Bus (OSB) using XML SOAP requests. The XML responses are consumed on the Node.js cloud component of the app, and any data required by the client-side is transformed into JSON (using a third party SOAP parsing module). In some cases, multiple SOAP requests are consolidated into one JSON payload for the client – this addresses the inherently higher latency of wireless network connectivity.

The cloud piece also handles caching and some session management on behalf of the client – caching is done with Redis, exposed through Node.js via FeedHenry’s platform. The Node.js middleware is connected securely to the OSB endpoints, and the client communicates with the Node.js middleware over HTTPS.

To support offline use cases, the app also caches data on the device using the FeedHenry JavaScript APIs to store data locally. An interesting bit of development occurred around encryption: Since the app stores customer data, there’s a security requirement to encrypt all data before storing it on device. The JavaScript based encryption algorithms proved too slow for the amount of data the app stored, so it was necessary to implement native encryption, and expose that through a JavaScript API via the FeedHenry client component. This was accomplished with a couple of developer days of work.

The app does also make use of the Sencha Touch model/store architecture but this is mostly done for purposes of easily populating data into the UI.

The app is optimized for tablet devices, particularly the iPad and Android tablets. An alternative workflow taking into account the more limited screen real estate of smartphones is also provided. This means it can be used on Android tablets and smartphones, and on Apple iPad, iPhone, and iPod Touch devices.

With several thousand downloads and a lot of daily use, there have been no service problems with the apps on either the iOS or Android platforms, and VMware is investing in further development of apps using the same platform.


This article has discussed the challenges faced by enterprises when planning a mobile applications strategy. It has proposed the adoption of combined solution linked client-side cross-platform hybrid apps using HTML5/CSS/JavaScript with server-side JavaScript using Node.js — this is available by using FeedHenry’s platform that staging its server-side execution environment to Cloud Foundry.


[1a] Mary Meeker, KPCB “Internet Trends 2011” Web 2.0 Summit 2011, 2011-10-18

[1b] Mary Meeker, KPCB “Internet Trends 2012” D10 Conference 2012, 2012-05-30

[2] Apache Cordova project

[3] Sencha Touch UI library

[4] JQuery Mobile UI library

[5] Microsoft, Cut The Rope using HTML5/CSS/JavaScript

[6] FeedHenry’s Cloud Foundry Platform

[7] Mícheál Ó Foghlú “FeedHenry Brings Mobile App Development to Cloud Foundry” 2012-03-06

[8] My VMware app in Apple App Store

[9] My VMware app in Google Play

[10] Unfuddle (hosted software project management including git repository hosting)