Multi-Platform Mobile Apps with PhoneGap
The Mobile App Development Challenge
If you have not been asleep for the last few years then you have been inundated with the “Smartphone Mobile Application” world.
The desktop computer is all but dead in most people’s mind as powerful mobile devices surface in the marketplace.
Developing application for traditionally desktop deployment is obsolete, in most businesses mindsets as the expense to manage the life cycle is extremely costly.
But with over 200 devices, in as many as seven platforms, development for a wide audience market is extremely costly and time-consuming.
Many times you are testing new ideas for consumer acceptance of a product or service and are not really sure if the market even exists to warrant the cost and time for full features Mobile Application.
Enter PhoneGap to the Rescue
PhoneGap offers a lowered cost and a faster time to market development solution.
By developing a single Web-based application, using modern Web technologies that can be packaged as numerous Mobile Applications, you “Develop Once” and “Use Many“.
Using HTML5, CSS3 and JavaScript you can create User experiences that can have fallback behavior to support older Browsers while designing for the future. You no longer have to choose older technologies in order to support older Browser Technologies
One Web application can be packaged to run on all of the required device platforms in a very short amount of time.
The cost is pennies on the dollar if the Mobile Apps were traditionally developed.
If the App is a Hit then Original Code Base
… Can be Repurposed to Platform Native Code
…… For Performance and Features if Required
PhoneGap will wrap the site in the Open Source Cordova API for access using the devices Native Platform API.
PhoneGap Build will deploy “One App” to the Big Three Stores: Apple, Android and Windows as targeted Mobile Applications for multiple device versions without any new deployment code that you have to write.
PhoneGap gives you power to offer your Customers:
-
Multiple Platform Delivery of a Common Application Look and Feel
-
Multiple Version Support per Platform
-
Access to over 200 Devices on as many as Seven Platforms
-
Easy Updates for Feature and Functionality Enhancements
-
Low Cost and Rapid Mobile Application Development and Deployment for Cross Market Viability Campaigns
Let’s see how PhoneGap fulfills these promises
Who is PhoneGap?
PhoneGap is a mobile development framework produced by Nitobi, purchased by Adobe Systems in 2011.
Apple Inc. has confirmed that the framework has its approval, even with the 4.0 developer license agreement changes.
Adobe officially announced the acquisition of Nitobi Software on October 4, 2011.
The code for PhoneGap was contributed to the Apache Software Foundation and started a new project called Apache Cordova.
The project original name, Apache Callback, was viewed as too generic, and renamed to Cordova.
The PhoneGap Developer
… Makes calls to the Native Device
…… Using the Cordova API
PhoneGap appears in Adobe Systems as Adobe PhoneGap and as Adobe PhoneGap Build.
PhoneGap Build the tool is used to publish the applications in the various platform stores for public consumption.
Apache Cordova graduated in October 2012 as a top-level project within the Apache Software Foundation (ASF).
Through the ASF, future Cordova development will ensure open stewardship of the project.
It will always remain free and open source under the Apache License, Version 2.0.
What is PhoneGap?
PhoneGap enables software programmers to build applications for mobile devices using JavaScript, HTML5, and CSS3 instead of device-specific languages such as Objective-C, Java or C#.
The resulting applications are considered “Hybrid Mobile Apps”.
They are not truly native as all layout rendering is done via web views instead of the platform’s native UI framework.
They are not purely web-based because they are not just Web Apps but packaged as Mobile Apps for distribution having access to native device APIs.
From version 1.9 onward it is even possible to freely mix native and hybrid code snippets.
Early versions of PhoneGap required a person making IOS apps to have an Apple computer, and a person making Windows Mobile apps to have a computer running Windows.
After September 2012, the Adobe’s PhoneGap Build service allows programmers to upload HTML, CSS and JavaScript source code to a “Cloud Compiler” that generates apps for every supported platform.
When did PhoneGap Come to Life?
First developed at an iPhoneDevCamp event in San Francisco, PhoneGap went on to win the People’s Choice Award at O’Reilly Media’s 2009 Web 2.0 Conference.
Where is PhoneGap’s Assets and Information?
The installation of PhoneGap libraries is available at: PhoneGap.com.
The Installation Link and Getting Started Guides are available on the PhoneGap home page.
PhoneGap Build, the Cloud-based packaging service, is also available on the home page.
The Site Provides:
-
Feature Description of the current PhoneGap Version
-
FAQ to get you started
-
Artwork for PhoneGap Build “Bot”
-
Information about the Apache Cordova Project
-
Contact Information
Why Would I Want to Use PhoneGap?
Apache Cordova is a set of device APIs that allow a mobile app developer to access native device function such as the camera or accelerometer from JavaScript.
When combined with UI frameworks such as jQuery Mobile, Knockout, Dojo Mobile or Sencha Touch allows the Smartphone App to be developed with just HTML5, CSS3, and JavaScript and its HTML5 APIs.
When using the Cordova APIs the App can be built without any native code from the App developer.
Advanced Web technologies are used and are hosted in the App itself locally and are not on a remote HTTP Server.
The JavaScript APIs are consistent across multiple device platforms, and built on Web standards, and makes the Web Application portable to other device platforms with minimal to no changes.
Apps using Cordova are still packaged as Apps using the platform SDK, and can be made available for installation from each device’s app store.
Cordova provides a set of uniform JavaScript libraries that can be invoked, with device-specific native backing code for those JavaScript libraries.
Cordova is available for the following platforms:
-
IOS,
-
Android
-
Blackberry
-
Windows Phone
-
Palm WebOS
-
Bada
-
Symbian
How Can I Learn to Use PhoneGap?
Development and deployment information for Cordova in your mobile application, and deployment using PhoneGap Build, is available at PhoneGap.com.
The Site Documentation Includes:
-
Getting Started guides
-
The JavaScript APIs reference
-
Examples of PhoneGap
-
Instructions on Upgrading from previous versions of Cordova,
-
How to write your own Cordova plug-in
The documentation will let you pick different Cordova versions and language translations.
Video training courses for PhoneGap are available at from Pluralsight Training.
You can get a one week free trial of Pluralsight to check out theses courses if you have an email not previously used with Pluralsight.
The current courses as of this writing are:
The introduction to PhoneGap course is a deep dive into the APIs and development of the deployment code.
The Practical PhoneGap course is more targeted towards PhoneGap Build and navigating the rocky terrain of posting the Mobile App to the three major App Stores: Android, Apple and Windows.
A Closing Thought
There are alternative tools and platforms being offered to support the PhoneGap paradigm.
Research what is being offered and make an intelligent choice for your unique situation.
The main objective of this post is to offer a solution to the Mobile Application challenges facing the Modern Developer.
The paradigm that PhoneGap addresses is the real value of this post.
Your available solutions for that paradigm are increasing almost daily.
Wisdom Pearl # 137 – The Technical Imperative
The Primary Technical Imperative in Software Development
… Is to Manage Software Complexity
…… Always be able to Justify Your Designs Complexity
The following two tabs change content below.
I am a Principal Architect at Liquid Hub in the Philadelphia area specializing in Agile Practices as a Certified Scrum Master (CSM). I use Test Driven Development (TDD) and Acceptance Test Driven Development (ATDD) with Behavior Driven Development (BDD) as my bridge to Agile User Stories Acceptance Criteria in a Domain Driven Design (DDD) implementing true RESTful services
Latest posts by Brad Huett (see all)
- DevOps: A Bridge to Your DevOps Culture - March 25, 2016
- Embracing Test Driven Development (TDD) - March 25, 2016
- DevOps: Delivering Agile Projects - March 25, 2016