Jul 25, 2016

Ionic (Cordova / PhoneGap) Development Overview And Setup



If you want to develop mobile applications but at same time wish use your already-known AngularJS skills, good news! the Ionic platform is for you! look here a quick overview about the Ionic platform as well as its environment setup.

Introduction

The Ionic platform have the MIT license, so you can develop and commercialize freely your apps made with it. Ionic uses bellow the hood the Cordova / PhoneGap platform, and focus on the front-end, which is the visual interface of your app, that's why it uses the AngularJS library.

Actually Ionic has two versions, the Ionic 1 (uses AngularJS 1.x) and Ionic 2 (uses AngularJS 2.x). As you should know, AngularJS 2 is actually in beta and is not stable enough to be adopted in your project, so if you are used to AngularJS already and aren't an adventurer, use the Ionic 1 version.

As you could see, Ionic concerns with the front-end, but then, what if you need access some specific mobile device resource, like camera, CPU info, IMEI number and so many others hardware / low-level features? that's when the Cordova plug-ins enter in action! Just to clear out the things, sometimes you will find Cordova reffered as PhoneGap and vice-versa, because as stated on wikipedia:

Apache Cordova (formerly PhoneGap) is a popular mobile application development framework originally created by Nitobi. Adobe Systems purchased Nitobi in 2011, rebranded it as PhoneGap, and later released an open source version of the software called Apache Cordova.
In short... Ionic uses AngularJS for the front-end and Cordova for the back-end (hardware and low-level access), and you can access the hardware through the existing Cordova plug-ins, but before everything, we need configure our environment, so let's do it!

Environment Setup

Here I'll show you how to configure your environment for the Android platform. In order to generate an Android app / APK file you'll need download and install:
After the SDK installation you will be able to run the Android SDK tool and download some Android API package as well as some system image that contains a live Android version, which will be used by the AVD to emulate an ARM/Atom/x86 Android phone, allowing then Ionic to deploy apps in it. After the NodeJS installation, open your system command line and Install Ionic 1 and Cordova:

npm install -g cordova ionic

That's all, now that you are able to run Ionic and NodeJS commands try the Hello World app !

About the used versions:
  • Windows 7 x64
  • NodeJS v6.3.1
  • android-sdk_r24.4.1

0 comentários :

Post a Comment