This is the age of mobile devices which brings us large volume of choices. Different people interested in different devices based on cost,brand value,features etc. Somebody likes apple products like iphone,ipad with ios. At the same time some other People like android,blackberry,windows etc.. its all about their personal choice. Now every company wants to develop their own mobile application. Its rapid growth and wide adaptability pushes the companies to invest more on mobile application development.
For Developing an application a company needs to select which is the target mobile operating system. If company targets only on android devices then it loose large audience of iPhone users. So companies need to target different mobile devices.
Biggest headache for app developers was to learn different languages for different mobile platforms. IOS App developers need to learn objective C or swift while android developers need Java. Windows mobile application development require languages from their parent microsoft which are c# or VB . These are only some of them. There are plenty of other mobile operating systems available and they may require different languages to develop applications. In such a situation a developer must have a large codebase for developing applications for multiple platforms. also companies need to spend more time on developing applications. If it require 1 month to develop an app in a platform.Then multiply it with the number of platforms they require. They also need to maintain different teams for same app in different platforms which will increase the cost.
If it requires to do something beyond the scope of web application then......??
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.
You can find cordova here : https://cordova.apache.org/
to install cordova we require node package manager(npm) which will be found at https://nodejs.org/en/.
1. Install Cordova
npm install -g cordova.
It will install necessary dependencies and after that you can create your app with the command.
2. Create Application
cordova create NameOfApplication
3. Select Platform.
We can specify the targetted operating systems by
cordova platform add android
cordova platform add ios
4. Emulate on a virtual device
cordova emulate android.
5. Build and deploy the application
cordova build android
we can build the application (.apk for android and .ipa for ios or any other application package based on targeted operating system). For this purpose we need to install SDK(Software Development Kit) for its corresponding operating system. For android it is android SDK which can be downloaded from http://developer.android.com/sdk/index.html.
For building to other platfroms cordova provides a detailed documentation ( https://cordova.apache.org/docs/en/latest/guide/platforms/android/ )
For differenct native apis cordova have its own plugins. Here is the complete list of plugins in cordova. for example if we want to use camera then we just need to use "cordova-plugin-camera". We don't need to worry about how camera is accessed in ios or android.
navigator.camera.getPicture( cameraSuccess, cameraError, [ cameraOptions ] );
The User Interface
Most important thing for a mobile application is its interface. We are developing pages with HTML and CSS. It must look like a native application. Also for mobile devices an important concept is responsive design. The app must be adjustable to different screen resolutions. To create beautiful mobile like interfaces we have plenty of frameworks available. Ionic is one of them which will enable us to develop feature rich mobile interfaces which are exactly like native applications.Here is the link to ionic framework. http://ionicframework.com/docs/components/ There are plenty other frameworks available still ionic is my personal preference because of its rich features. Which also provide a way to create applications on cloud and developing interfaces with simple drag and drop features.
The screen above is an example of mobile UI developed with ionic. It simply uses HTML elements to create the interface. it also enables developers to create touch based interfaces. Thanks to HTML5 for touch , drag support.
Some drawbacks ( Which can be overridden over time )
Even though different plugins are available to interact with the native APIS still some of the APIs are not available as cordova plugins. Inorder to access those APIs we require native applications. Another thing is about the performance since the application was executing within the web view it will be bit slower than the native application. Also it require bit more time to interact with the native API because we are not invoking them directly.
Hybrid applications give developers a new scope in mobile application development. Companies are investing more so that new frameworks are developing. Now thousands of applications are using web technology for building apps.
An awesome interface similar to facebook
A draggable tab
Login Sample Application