Enterprises are going through an era of Digital Transformation where consumers are demanding immersive mobile applications that offer a much richer experience than just a mobile web portal. With smartphones, tablets, programmable watches as well as a plethora of sensors avialable today, enterprise mobile apps need to be architected in a way that benefits from these new producers (sensors, location, accelerometer, RFID tags, beacon advertising) and consumers (phones, tablets, watches, etc.)
As of today, HSC works in multiple Enterprise segments such as Health-care, IoT, Hospitality and Retail to name a few. This post talks about common trends while developing such new age immersive applications for the Enterprise Market.
presence in Enterprise verticals
Given our presence in many diverse enterprise application development areas, we get asked a lot of questions that are common to all of them. The rest of the post will touch upon some of these key questions, and how we tackle them.
Enterprise applications are different from, say, core communication applications or gaming applications. A typical enterprise application is characterized by the following general traits:
Given these primary requirements, our observation has been that most of our enterprise customers prefer that we find a mechanism to develop Hybrid applications as opposed to Native applications. There are a variety of reasons for this, which we have covered in a previous blog post, the short of which is there are many frameworks available today that integrate key native performance components with hybrid apps blurring the difference between web views and native views.
So that being said, let’s look at the best practices and trends we have observed while developing Hybrid frameworks for this vertical. But before we go ahead, which hybrid framework should we talk about? Well, at HSC we love Ionic which is based on Angular. So the rest of this article will talk about Ionic. You may love Meteor or ReactJS or Kendo and that’s great. I’m sure a lot of the things we point out below would still be relevant to you.
As some of our readers would know, there was a recent change in the Angular community moving from Angular 1.x to 2.x which depending on your point of view is either brilliant or disastrous as a lot of things have changed including the programming model. At HSC, we believe its for the better and change is inevitable. Better to evolve than to be stuck to and old way. That being said, we still love Ionic Angular 1.x – its still supported and a lot of our apps are still on 1.x. The move to 2.x will be gradual and we will do both. As of today, most of our new projects are still on 1.x. Our recommendation here is to wait till the dust settles. As of May 2016, a lot of plugins don’t work with Angular2/Ionic2 as well.
One of the common lines of questions we get asked is “Cordova apps look bad. Is ionic prettier than Cordova?”
So our recommendation here is to use a good UI framework on top of Cordova.
The next question we get asked is “is ionic as fast as native?”
Well, for enterprise applications, we always say yes. That’s because when it comes to performance for enterprise apps, you are mostly talking about the performance of:
To be clear, this is a yes because we are taking into account the typical needs of an enterprise app. If we were writing an openGL gaming application or implementing a full-fledged protocol stack for a device management client that needs to intercept and audit every request, sure, go native.
So let’s talk a little bit more about performance and best practices:
With respect to view transitions, we highly recommend the native-transitions plugin. It makes a big difference to view transitions and you get the same performance as a native app for view transitions (ios and android only).
With respect to graph visualizations, most of the libraries we have used are CSS hardware accelerated and performance is excellent. We have never seen any performance issues here. This brings us to:
There are many. There is obviously D3 (and its angular variants) that does a lot. We like it, but there are simpler and lighter alternatives as well, you can use (and which we have used with great success)
Then there is Chartist, Google Charts and some others we have used in the past, but truth be told, between ChartJS and VisJS and the occasional use of D3, all our charting needs have been met.
All of the above have a great performance – with ChartJS leading the pack.
(source)
So here are the plugins we use a lot across many of our projects:
So our key advice here is don’t re-invent the wheel! There are many good plugins ready to be used. Search, look at the license, see if its license compatible and use away. ( You will find many angular and cordova plugins to be permissively licensed under MIT or Apache 2 license )
Push Notifications – to any developer, push notifications always seem to throw a wrench till you get it right. There are several convoluted steps to set up your own, including generating SSL certificates, figuring out that there is a difference between developer and deployment certificates (Apple), and various other things.
Simply put its a pain if you want to do it yourself. Specifically, its more painful to handle APNS than GCM. But there are options:
We covered a part of this earlier, but payments are key to enterprise apps. You will need to integrate with payment gateways and well as NFC payment mechanisms. There are plugins for that
And for those of us playing in the personal fitness market, there are options out there that offer easy wrappers to Health Kit and Google Fit. This is an evolving market space though and we’ve often had to add to the code depending on needs. But these are good starting points:
Now, this is a crowded space. We are only going to talk about how to write apps for Apple Watch because that is mostly what our customers want. For example, when we develop an IoT app for video streaming, customers ask us to extend the app so they can watch a feed on their watch. Or for fleet management apps, they want the customer to be notified of fleet diversion issues directly on their watch with a pin and a map. Well, we have the Telerik apple watch plugin that most of us use for that.
We could go on and on. There are so many enterprise categories such as maps, geofencing, barcode scanning all of which have excellent and mature plugins to do the job for us. But let’s finally get back to application development basics that are independent of plugins. Things you can do to improve your own code
Another trend we’ve observed in this vertical is the need to offer apps for mobiles as well as desktops. Obviously, since part of a hybrid apps is in HTML5/JS that will work on all platforms that offer a browser. But what about plugins? Well, while selecting plugins its always a good idea to select a plugin that has multi-platform support and when it comes to desktops potentially replace it with another functionality.
A good tip here is to handle platform variations in your code. As an example, if you want to port your app to the desktop, always check for cordova before you use it like this:
// check platform
var isWebView = ionic.Platform.isWebView();
var isIPad = ionic.Platform.isIPad();
var isIOS = ionic.Platform.isIOS();
var isAndroid = ionic.Platform.isAndroid();
var isWindowsPhone = ionic.Platform.isWindowsPhone();
var currentPlatform = ionic.Platform.platform();
var currentPlatformVersion = ionic.Platform.version();
// check plugin
if (window.cordova && window.cordova.plugins.Keyboard) {
Now how about porting a mobile app to desktop? How do we make it into an “app” ? There are many options. We love Electron by Atom. It does a great job of taking HTML/JS/CSS code and packaging it into an app with a chromium webview – and works very well with Ionic. If you want to know more, give us a shout and we’d love to tell you more.
Best practices for application development
If there is one area where hybrid apps are harder than native apps. its debugging. There are a few tools here that help greatly
Enterprise app development has entered a new era. It combines location, responsiveness, payments, transactions, sensor integrations and voice/video/messaging into a common platform. This is indeed an age of digital transformation for this vertical and HSC is very excited to be part of this transformation as we bring in our communications expertise along with mobile app development and help realize our customers’ vision!