Native vs Hybrid App Development

Share this article

People enjoy using their smartphones because they can accomplish many things on the go such as reading e-mails, social networking, watching movies and plenty of other activities. We enjoy smartphones because they have many applications that make everyday activities easier.

If you are thinking of developing for the mobile application market, an important decision is to decide between developing a native application or a hybrid one.

It’s an age old question that refuses to go away, we thought it was time to revisit… Which is the best?

Native over Hybrid

Building native applications means using the native language of the platform, Objective-C on iOS, and Java on Android. The main advantage of native applications is their performance. Native apps are compiled into machine code (Dalvik byte code under Android), which gives the best performance you can get from the mobile phone.

Best performance includes fast and fluid animations as well as full access to phone hardware, multi touch support and the latest APIs.

Native development is far from easy. Despite the great number of resources that can be found, it may not be understandable to everyone. As code must be written specifically for each platform, the same code will have to largely be rewritten with little able to be shared. The logic may be the same, but the language, APIs and the development process is different. This process can be relatively long for complex applications.

Going Native

If you are new to mobile development and want to build performance-critical mobile apps and/or take advantage of native APIs, you would need a good resource on learning mobile native development.

Let’s take iOS for example. If you want to be a native iOS developer, firstly get yourself a Mac. You can write code anywhere, but a Mac is needed to build the code into an application as is an iOS Developer Account ($99 per year).

You can get a great intro to Objective-C by creating your own Flappy Bird game in your browser. A single online tutorial won’t quite do the trick though, Apple provides its own tutorial which is helpful for beginners and experienced developers. This tutorial introduces application design, structure and code implementation while building a ToDoList app (ToDo lists seem to be the ‘Hello, World!’ applications for mobile development).

As for Android development, I would recommend Learning Android, 2nd Edition by O’Reilly. It gives a good insight at of Android development while building a Twitter-like mobile client.

And of course, SitePoint has plenty of iOS and Android development articles for you to enjoy!

Hybrid over Native

Hybrid applications are web applications (or web pages) in the native browser, such as UIWebView in iOS and WebView in Android (not Safari or Chrome). Hybrid apps are developed using HTML, CSS and Javascript, and then wrapped in a native application using platforms like Cordova. This allows you to use any web-native framework you want, and there are plenty of these.

The application development is faster, simpler, more rapid and the application is easier to maintain. You can change platforms anytime you need, Cordova lets you build your application for more than one platform just by one adding line of code. As for the phone hardware such as the camera or Bluetooth, Cordova has a large repository of plugins you may use.

The main problem with hybrid apps is that they still depend on the native browser, which means they are not as fast as native apps.

Going Hybrid

If you decided to develop hybrid applications, then you should know that there are two main ‘competitors’ in this field. One is Cordova (and Cordova-based tools like PhoneGap) and the other is Appcelerator Titanium. They both target mobile platforms but work in very different ways.

Developing with Cordova is just like developing a webpage. You create HTML, CSS and JavaScript local files, test them in the browser and then wrap them in a native web view with Cordova (you’ll still need native SDKs and development tools for this step).

Using Titanium is a bit different, you don’t any HTML and CSS files, unless you want to create an application that uses both native and HTML-based User Interfaces. Titanium provides a very useful mobile tool set that helps you emulate (or simulate) your application on the real platform, not in the browser. When your app is run on the device, it doesn’t get wrapped into a web view, but gets interpreted by a Javascript engine (JavaScriptCore in iOS or Rhino in Android).

Appcelerator provides a good tutorial (surprisingly not a ToDo application).

There are also several other less known hybrid development options such as Xamarin, Rho, Corona and MoSync. All of these work in slightly different ways and may benefit you more depending on your current programming experience.

Conclusion

Both native and hybrid are ways to fulfill the different needs and preferences of users and developers, and none of them can be thought as a perfect solution. They have their strengths and weaknesses and it is up to you to decide which of them fits you better and which one you will use in your application.

What are your experiences and thoughts on Hybrid vs Native development?

Aldo ZiflajAldo Ziflaj
View Author

Aldo is a Code-Lover and a student of Computer Engineering from Albania. His short-term goal is that of becoming a full-stack developer, focusing on Android, Ruby technologies and DevOps techniques.

appceleratorchriswCordovahybridnativePhonegap
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week