With the inception of HTML5 and CSS3 and with the likes of PhoneGap, Appcelerator, RhoMobile, IBM Worklight coming up with cross platform mobile app frameworks the biggest question running in the minds of mobile app developers is regarding which mobile architecture to use .
Well after running around the internet and searching for answers myself I have tried to narrow down and summarize the problem with the help of the following questions :
What is Native? Hybrid ? Web apps ?
Native refers to building an app in a device’s native programming language. For iOS devices this means Objective-C, and for Android it’s Java. Native apps are typically fast, reliable, and can access all the the device’s hardware. These apps are usually built for high performance needs like mobile games. But the downside is that once built this app is tied down to the platform for which it is built. So an iOS app would not run on an Android device.
A hybrid app is built using web technologies, and then wrapped in a platform-specific shell that allows the it to be installed just like a native app. Thus it is sold/accessed through the device’s app store. PhoneGap is an example of a framework that allows you take a web app and turn it into a native app for iOS, Android, BlackBerry, Windows 7, WebOS, Symbian and more. The hybrid frameworks typically have APIs as well, that allow you to access the device’s hardware and features that are locked out from the browser.
A web app is a website that you access from your device’s browser, but the site is made to resemble an application rather than a traditional website. It’s purpose is also more functional – it offers a utility or service rather than a straight-up website which is often more informational. A web app can be accessed by any mobile device that has a browser. Though being browser-based, it’s typical that not all of the device’s hardware features can be tapped into. To produce a more engaging and interactive experience. HTML5, CSS3 and JavaScript are increasing being used to take advantage of the advanced features offered by this new specification.
1> Pre application build considerations. What kind of application is to be built ?
What architecture you use depends mostly upon the kind of application you want to built.
If you application require the use of native features like camera, bluetooth, accelerometer, database, microphone, speaker, GPS, PUSH etc, then you are better off with a native app. Native apps provide you seamless transitions and quick/flawless access to these device capabilities. Or maybe you want to develop a high end game which utilizes the device graphics and relies on offline storage capabilities, native is the way to go.
On the other hand suppose that your app will seldom utilize minimum device capabilities like camera, push notifications, then you can go for an hybrid app. These apps will infrequently use these capabilities but are not entirely dependent on them. Depending upon the API`s provided by different frameworks like PhoneGap, Rhomobile, Worklight etc you may choose one and start building the app. As the code written using these frameworks is interpreted by the browser and then compiled these apps are slower than the native apps.
The last case is if you want to create a web app wherein you just want to share some information with the users on a regular basis or provide some kindof notifications to the users or for eg. You want to provide a product catalog for the consumers online. In this case the application does not utilize any of the device capabilities like camera, bluetooth etc. Such applications can be built using the powerful yet simple emerging technologies like HTML5 and CSS3. These apps can be accessed from anywhere by anyone using any device as long as they have an internet connection. These apps are the simplest to develop and maintain.
2>Post Application Built Considerations. Cost for developing, testing, maintaining, versioning.
Going native is always going to be costly. Consider this, you may want to develop a game which is available for iOS, android, blackberry and windwos 8 platforms.
Not only do you need experts across different platforms to develop this game, but you now have to maintain 4 copies of the same game.
Going native would increase the cost for distribution, testing, maintenance, enhancements etc.. On the plus side however, these apps will provide you with all the functionality the device has to offer. The user experience would be the best and cannot be compared elsewhere.
The plus point with developing a hybrid application is that the cost of building the application is reduced drastically. You would only need to develop the code once and the framework will provide you with 4 working versions for as many different platforms.
Thus testing and maintenance of the app also reduces. But these apps are yet to showcase the seamlessness and user friendliness displayed by the native applications. One can only imagine with technologies like HTML5 and CSS3 developing that the gap between hybrid and native will be reduced.
The web applications are again the most simplest to develop. Once however needs to take care adjusting the web page resolution depending upon the screen size of the device. For example the same screen resolution used on a 4 inch iPhone will not look great when used on a 8-9 inch tablet. By careful design considerations and coding this however is not a huge task. Again these apps are the simplest and do not use any device capabilities.
Below are a few points which compare the advantages and disadvantages of each :
|
Native |
Hybrid |
Webapp |
|
|
|
|
Skills/tools needed for cross-platform apps |
- Objective-C
- Java
- C
- C++
- C#
- VB.net
|
- HTML
- CSS
- Javascript
- Mobile development framework (like PhoneGap)
|
|
|
|
|
|
Development Speed
|
Slow |
Moderate |
Fast |
|
|
|
|
Number of applications needed to reach major smartphone platforms |
4 |
1 |
1 |
|
|
|
|
Advantages |
Lets you create apps with rich user interfaces and/or heavy graphics. |
Combines the development speed of mobile web apps with the device access and app store distribution of native apps. |
Offers fast development, simple maintenance, and full application portability. One mobile web app works on any platform. |
|
|
|
|
Disadvantages |
- Development Time
- Development Cost
- Ongoing Maintenance
- No portability (apps cannot be used on other platforms)
|
- Can’t handle heavy graphics.
- Requires familiarity with a mobile framework
|
- Can’t handle heavy graphics.
- Can’t access camera or microphone.
|