Book Image

Phonegap Essentials

By : Ivan Turkovic
Book Image

Phonegap Essentials

By: Ivan Turkovic

Overview of this book

Table of Contents (15 chapters)

A brief history


In 2007, Apple introduced its first smartphone: the iPhone. It changed the mobile phone industry forever. iPhone was the first smartphone that provided a browsing experience comparable to desktop web browsing. Many web pages were trying to mimic iPhone's look and feel for mobile use. Originally, iPhone didn't support third-party native apps. Many tried to create hybrid applications by hosting them on web servers. The application was running inside the Safari browser.

iPhone's immense success was noticed by competitors, especially Google. Google had planned to introduce Android before iPhone. Android back then was like Blackberry OS and interacted through the keyboard, but, seeing the success of iPhone, they decided to ditch the keyboard and open source it. Android had the ability to develop native applications. Apple allowed the development of native applications with the next version of iPhone. Competing platforms have different development stacks. It requires an extra amount of work to make them work on many popular platforms. This makes even the simplest application development across multiple platforms difficult. After some time, most platforms offered the ability to communicate between inline web browsers and the application's native code. With this, compiled hybrid applications became a reality. You could create the whole application with JavaScript, HTML, and CSS, and access native libraries through native code. It wasn't the best solution, since you needed to write native code that supports it, but that was going to change with the arrival of PhoneGap.

PhoneGap was started as a project at the iPhoneDevCamp event in 2008. It was started by a team of developers wanting to simplify cross-platform mobile development. Until then, it was easy to create applications for a single platform but there was no tool to manage it for multiple platforms. In the beginning, the idea was to create project templates that could be reused inside Xcode for iOS or Eclipse for Android to develop hybrid applications. Shortly afterwards, PhoneGap supported Blackberry OS. The team behind the project was from Nitobi Software company. They started to work on PhoneGap as a more serious tool for development. It began to be used for a full development cycle including preparing builds for deployment to the app stores or for using inside enterprises. PhoneGap won the People's Choice Award at O'Reilly Media's 2009 Web 2.0 Conference. Prior to Apple's developer license agreement version 4.0, the rules for submitting PhoneGap applications to the Apple app store were not clear and many apps were rejected for that reason. After updating the developer license agreement, Apple has confirmed that the framework has been approved for submitting PhoneGap applications.

In 2011, there were two important items of news for PhoneGap development. Adobe decided to acquire Nitobi Software as a part of the strategy for moving away from Adobe Flash on mobile devices. The other news was that they were going to open source PhoneGap and contribute it to the Apache Foundation. Since being contributed to the Apache Foundation, it changed to Apache Callback, Apache DeviceReady, and finally Apache Cordova (http://cordova.apache.org). After Adobe acquired it, the team behind PhoneGap worked full time on the project and the updates are being delivered on a monthly basis.

The PhoneGap brand has been preserved by Adobe. PhoneGap is now a fork of Apache Cordova with some extra features. PhoneGap and Cordova were basically identical until the release of version 2.x. After that, the development went into simplifying project creation. A command-line interface was created for most common actions, and the core features were separated into numerous plugins. The new process simplified the creation and installation of new plugins.