In this approach, one can develop an app once and reuse across multiple platforms.
Mobile apps are the need of the hour. No business can just have web applications and not support any mobile views and still continue to serve their customers. More users are on the Internet using their mobile phones than ever.
Applications on mobile phones are a slightly different ballgame than traditional development. It provides opportunity to use additional hardware -- camera, gyroscope, GPS and so on. At the same time, connectivity is a challenge. Mobile phones can move between online and offline frequently. The application should be able to handle the situation.
Hybrid mobile app development
For businesses and individual developers, one of the salient aspect is the ability to support multiple mobile phone platforms. iOS and Android are the top two platforms. Windows Phone is catching up fast. There are other lesser known but significant platforms like Blackberry and Fire OS. If you develop a mobile app, you would like it to cater to as many users as possible. Having an app only for one platform leaves out a lot of users and hence the opportunity is lost. Developing the same app on multiple platforms is costly, tedious and time-consuming.
Hybrid mobile development attempts to solve this problem. With this approach, one can develop once and reuse across multiple platforms. Following are some of the choices:
How PhoneGap works
PhoneGap takes an interesting approach compared to other hybrid variants. Developers are in general comfortable with HTML/JS and CSS development (especially web developers). Let’s explore how HTML/JS/CSS could be used instead of Objective C or C#? Consider following picture. It depicts Phone Gap’s design approach for Hybrid application development.
PhoneGap apps are installed on the phone. It creates a native app skeleton and renders a browser view on top.
HTML/CSS/JS is rendered on the browser view.
PhoneGap plug-ins are open source. If you need to take advantage of a phone hardware feature, chances are someone wrote the plugin already. If it’s not available, they you can write one yourself too. Following are the platforms PhoneGap supports.
Now, what are the downsides of PhoneGap?
It’s easy to develop apps using PhoneGap, as we are using HTML/CSS/JS apps look and feel like a HTML page. There is no native behaviour to it. Unless you are a very good designer and are really comfortable working with CSS, this is a problem. You might use CSS frameworks like bootstrap, but it still looks like a web page as opposed to a mobile app.
Look and feel and positioning of elements: People are used to a specific pattern of usage on mobile phones. Imagine you need to go back to the previous screen in an app. If you are an iOS user, you would look top left for a back button. On Android, you will look for a physical button (or a soft button) on bottom left. If you are developing on a browser, all of this changes.
If your users don’t feel good with your app the whole purpose is lost, isn’t it?
Ionic framework takes care of positioning controls based on mobile platform. Consider following picture. It’s a sample Ionic app browser emulation. You might guess that the iOS screen is on left and Android screen is on right. Look how tabs are alighted at the bottom for iOS and on top for Android. Even the look of toggle button is native to each platform. This is the closest you can get for native appearance and behaviour.
Ionic framework supports iOS and Android at this point. The product has a much bigger list of features and services. For example tools for rapid prototyping and push messaging service.
To conclude, hybrid app development is certain to take over mobile app development. PhoneGap and ionic framework are promising technologies. Only time will tell if there is a better piece of technology in hybrid compared to these.