Building Hybrid Mobile apps with Ionic 2 framework

Welcome to my Brand New Post on “Building Hybrid Mobile apps with Ionic 2 framework“. Ionic Team has come out with beta version of ionic 2, which is a major upgrade to ionic 1 framework for hybrid apps. In this post I will cover some of the basics on ionic 2 framework, technologies involved in hybrid app development using ionic 2, important resources around the framework. After reading and understanding this post you will have good sense of ionic framework for hybrid app development. So lets get started –

What are Hybrid Mobile Apps

A Hybrid Mobile App is build with web technologies like HTML, CSS and Javascript. Hybrid Mobile App runs in a native containers supported by various mobile platforms like Android, iOS and Windows. Through libraries like Apache Cordova, these Hybrid Mobile Apps are able to access the native functionality (like camera, sensors) of the native mobile platforms.There are now advanced frameworks and tools available to build Hybrid Mobile apps, notable ones are Apache Cordova, Phonegap, Angularjs, Sencha Touch and Ionic 2 Framework.

With Hybrid App Development platforms, Developers can use existing web technologies for mobile apps and are not required to learn native programming languages like objective-c and swift for iOS platform and Java for android Platform.

Cordova/PhoneGap – Native wrappers

Apache Cordova (the core engine that also powers Adobe PhoneGap) is the most comprehensive and popular native wrapper library used in Hybrid Mobile App development. Cordova engine wraps an app’s HTML, CSS and JavaScript code and loads that into a mobile web view for rendering on the mobile device.Cordova functionality is extended by Cordova Plugins for access to native functionality like Phone Book, Contacts, Messages, Camera and Sensors to name a few.

Ionic Framework (Ionic 2)

Ionic framework 2 is an open source SDK for building hybrid mobile apps. Ionic framework is build on top of AngularJS 2 (web app framework developed and supported by Google) and Apache Cordova (Maintained by Apache Foundation under Apache 2.0 License). The previous version of ionic called ionic 1 was built on top of angular 1.

Ionic 2 and Angular 2 have been buildentirely from scratch, and have lot of advantages over their previous versions. Its not important to know the previous versions to understand the new ones.

Ionic 2 – Should we use it now?

Ionic 2 is currently in beta version. You can track the beta releases on their Ionic Official Blog. Being in beta definitely means that things are not stable yet and there can be unexpected changes from beta to final production releases. But as per suggestions from ionic team in their blogs, if you plan to go into production may after six months from now, you should definitely try ionic 2.

If you have existing ionic 1 app, while migrating from ionic 1 to ionic 2, you are definitely going to face lots of breaking changes. Ionic forum is the best place to look for migration guidelines.

Ionic 2 supported platforms (Mid 2016)

Android

Android 4.1 and up

iOS

Ionic supports iOS 7 and up

Windows

Universal Windows Platform for building Windows 10 apps

BlackBerry

BlackBerry 10 apps

TypeScript and Code Editor / IDE

TypeScript is a free and open source programming language developed and maintained by Microsoft. It is a strict superset of JavaScript, and adds optional static typing and class-based object-oriented programming to the language. Both ionic 2 and angular 2 have been written in typescript. So typescript is one of the prerequisites for effectively working with ionic 2 development.

Typescript and ionic development is supported on many modern editors or Integrated Development Environments (IDEs) – including Sublime Text, Atom, Eclipse, WebStorm etc. Favorite among most people is Visual Studio Code, which is again developed by Microsoft in open source.

Why Hybrid Mobile Apps development with Ionic?

There are many advantages to go for Hybrid App Development with ionic instead of Native App Development:

Web Developers can utilize existing skills and get into Mobile App Development quickly.

With ionic it is possible to develop application for multiple platforms with the same code base in HTML, CSS and Javascript (TypeScript).

Support is being added for more platforms – Android, iOS, Windows, Blackberry and desktop browser apps in future.

Almost close to Native like performance. Web Views and mobile processing capabilities are getting better day by day.