The Bring Your Own Device (BYOD) movement has clearly produced a lot of hype in 2013. Technology officers are finally seeing BYOD as an opportunity rather than a challenge. Just a few years back, exposing an enterprise application to unmanaged devices was hardly an option due to security, stability, and other reasons, mainly coming from loss of control.
The exponential rise of enterprise web applications makes HTML5 the hottest platform for BYOD app distribution. Sencha, one of the most prominent names in the industry, recently released their BYOD app deployment candidate – Sencha Space.
If I had to come up with a single-sentence textbook definition of Sencha Space it would sound something like: Centrally managed platform for secure deployment of device-agnostic mobile HTML5 applications. And it truly is all of that:
- Includes a remote central management console
- Deploys any HTML document to mobile devices through a custom mobile client
- Works on phones and tablets, cross-platform (iOS, Android, BlackBerry, Windows)
- Heavily invested in security
Three key components make up a Sencha Space BYOD-empowered application:
- Sencha Space mobile client, installed on device (free)
- Management console
- Your HTML application
Sencha Space’s Management Console alleviates the key concern over BYOD enterprise app distribution: managing unmanaged devices. The Console is a cross-platform web app (yes, it works on phones, tablets, and desktops) that focuses on managing:
- User groups
- ..and monitoring statistics
The mobile-friendly interface will help managers create distribution rules for their web apps, based on target users or user groups. All settings are conveniently propagated in an instant. For example, a user is promoted to a new user group and gains access to the apps associated with that group. Conversely, users or their privileges can be removed as quickly as they are added – immediately.
Particularly interesting is the availability of VPN settings.
Remote administration does not directly modify web applications. Instead, it controls the Space client, a shell that contains one or more web apps.
Space Client is the wrapper that provides users with applications based on settings defined in the management console. The client uses the WebView UI component to point it to the application URL. Multiple applications and organizations are supported through a single client instance. That’s right – consultants, for example, can use apps from more than one enterprise.
My favorite feature hands down is the Invoke API that adds cross-application communication abilities. This is a true gem that could influence multi-application environments greatly. Just imagine how elegant it would be to separate apps by features, permitted according to access control lists defined in the management console. Or sharing data cross-department without sending any packets over the network.
Sencha Space Client runs on iOS, Android, Windows, and BlackBerry phones and tablets.
After spending a few weeks with Sencha Space, the first thought that comes to my mind when I pronounce its name is security. Quite frankly, it brings a great deal of security to any ol’ web app or site. Here is what I mean:
- Sencha Client will not run on Jailbroken/Rooted devices
- Requires PIN to resume
- Applies changes set to management console immediately
- Does not expose WebView to remote inspectors (e.g. Safari or Chrome)
- Never exposes application source (URL) to users
- Adds Secure File and Secure Local Storage APIs
Developing Apps for Space
Virtually any valid HTML document can serve as a Sencha Space application. Sencha Touch, Ext JS or any other dependency are not required.
Your application can be hosted virtually anywhere:
- On a publicly available server
- On a remote server through VPN
- On a local (intranet) server
This particular capability is a phenomenal asset for your BYOD environment. Not only can this ability improve security of your data, but it also enhances debugging experience.
Sencha Space apps are web apps, but not the hybrid kind (at least to the extent we usually observe hybrid apps). As such, an app to be deployed to Sencha Space should be optimized for mobile delivery, since it consumes network connection to download the app.
Offline capabilities are available with standard caching techniques such as appcache. Space Client, on the other hand, will require occasional connectivity to ensure fresh security settings are available.
Sencha Touch developers planning to develop multiple apps for the Space environment will find Packages and Workspaces extremely useful. Hint: Sencha Cmd 5 will make the workflow even more efficient.
While Space apps are technically not hybrid, some of the device APIs are actually made available, such as access to camera(s), notification system, secure file system, and more.
Sencha Space API
Bundled in Sencha Space Client, APIs are exposed with help of the Space library. A major concept introduced in this library, and I surely expect to see it in future versions of Sencha Touch and Ext JS, is Promises.
Promises provide with a very convenient way of handling asynchronous calls and their success and failure callbacks. The vast majority of calls to Space APIs will in fact be asynchronous, using Promises.
An interesting example of this approach resides in the SecureLocalStorage API. As the name implies, your LocalStorage data can be saved securely encrypted. Instead of HTML5’s LocalStorage, it uses SQLite coupled with encryption algorithm. As such, SecureLocalStorage enables a few key advantages:
– Data encryption
– Multiple storage instances
– Far greater capacity (also improving speed with great amounts of data)
– Asynchronous operation
Take special note of the last point: Asynchronous operation. If you want to migrate existing LocalStorage-powered code to SecureLocalStorage, you may have to restructure the app’s behavior since LocalStorage is synchronous, unlike SecureLocalStorage. Additionally, SecureLocalStorage makes use of Promises, which will certainly add to the smoothness of transition.
If have a Sencha Touch or Ext JS application to deploy though Space, note that SecureLocalStorage Proxy is currently unavailable.
SecureFiles is another welcome API and it works on similar premises as SecureLocalStorage.
All apps deployed in the Sencha Space ecosystem can access device cameras and even embed them right in the web application. That means that camera view can be included inside an HTML element, or even an Ext.Component, and not merely as a full screen view. Of course, pictures taken can be securely saved using the SecureFile API. In case you are wondering about barcode scanning, that feature is unavailable at the moment.
Space Client vs Cordova
It’s not uncommon to see Sencha Space compared to Cordova. Truth be told, they’re apples and oranges. Both will help deploy web applications to mobile devices, but the means of doing so are completely different.
The main difference is: execution. Cordova is a wrapper that embeds the entire web application into an installable application. End users are not aware of Cordova’s existence.
Sencha Space is, well, a browser on steroids. It’s an ecosystem that contains an app which points to a web server in order to download and execute the presentation layer of an app.
Presentation below illustrates the differences to a much greater extent.
After presenting on this topic on a couple of meetups and discussing Space with the community, a noticed a few questions being repeated:
Can we white-label Sencha Space client app? Not at the moment. Sencha is working on a solution for that, but whether they will make the client app “themeable”, customizable, or packageable for custom distribution, we can’t be sure yet.
How much traffic is going through Sencha’s servers? NONE! The management console communicates with the client app but does not interact with web applications in any way
How can my organization reuse existing authentication protocols? Space makes use of SAML for those purposes.
Who is Sencha Space for? Space is targeted to the enterprise systems that either have or plan to have web apps for internal purposes. Due to it’s complexity, it’s probably more suitable for mid size enterprises, up to smaller-sized large companies. The lack of white-labeling makes it somewhat less appealing to larger players.
See my SlideShare presentation below for more tips and tricks.
Sencha Space is a wonderful ecosystem with bright future ahead. It enables enterprises with the ultimate freedom to automatically deploy multiple web applications to their users, hassle-free.
If you are a developer, this is a great time for early adopters. Sencha is working very hard on perfecting Space, and they are open (and responsive) to any questions, comments, and suggestions.
Do you have experience with Space that you want to share? How about working with similar systems? Your feedback is much appreciated.