Developing for Android: PhoneGap versus Native

PhoneGap
Android is a mobile operating system developed by Google, which originally was used mostly with mobile phones, but it has been developed afterwards to support also tablets. Application development to Android can be made in two different ways. The first and the most used way of these two is to produce applications with native development style, where the application’s source code is written in operating system’s default programming languages and style. The second approach is to use application development framework, where the application’s source code is written by the rules and programming languages needed for the application development framework.

At the moment every popular mobile operating system uses different native development style, and if a developer wants to develop an applications for several different mobile operating system, he or she has to make the programming for each and every different mobile operating system he or she wishes the developed application would work on. PhoneGap which is made and marketed by Adobe is the most popular application development framework, and it is run by open source project Apache Cordova in its core, which gives developers different kind of approach to mobile application development. The reasons behind PhoneGap have been to bring programming style and languages of web development to the toolkit of every popular mobile operating system, and with this make it possible to use these same techniques on mobile application development across all these popular mobile operating systems. PhoneGap gives developers a chance to work on one source code and copy that to all mobile operating systems supported by the application development framework.

When developing to Android, the basic structure of source code’s directories is always the same, and even if application development frameworks were used, there are certain Android specific configuration files that are always necessary to be included in the source code. If there is application development framework used in the development, there has to be some referral in these configuration files which makes it possible to use these application development frameworks.

When developing to Android on native way the main programming language is Java and when programming the applications there are usually used some of the Android’s own Java libraries. With the help of the libraries developer can make a connection to the properties of the device which runs the operating system, but otherwise programming usually follows the basic structures of Java. Google has made a guide on the development of Android native applications, where it suggests to use so called activities when programming applications and follow the style of the guide when doing the applcation development. Native applications can still be made in a way the developer wants and that is the strength of native application development, because every way is possible. There is even chance to write under the native defined programming layer, when there is chance to use C-based languages to improve the performance of the applications.

If PhoneGap is used, the application development framework has to be installed in the basic structure of Android application’s source code, and it has to be referred in the configuration files which will get it started at the beginning of the application’s start process. On the installation process of PhoneGap there will be made an own development folder, where the developer writes the source code of the application and from where the application is in the end ran. The programming languages used in PhoneGap are standardized in the web development field, which includes HTML, CSS and JavaScript. Usually Android applications made with PhoneGap use HTML and CSS to create the base and user interface for the application and the behaviour and interactivity with JavaScript. This is the basic structure of development with PhoneGap and it cannot be escaped, and shouldn’t have to, and it is the biggest difference between native development and PhoneGap. With PhoneGap there is a JavaScript library which enables the use of properties in the device which is running the mobile operating system, so that you can bring for example GPS-data from the device to your application. Native source code can be executed on the side of PhoneGap but it is not very supported since it breaks the base idea behind PhoneGap which is to make it possible to run the source code on different platforms. After applying PhoneGap to development process the development methods can be used exactly the same way as making a website but for the sake of interactivity with the user it is recommended to use JavaScript to give the application some actions and interactivity.

There are some great differences between PhoneGap and native development and they both have a place in the development of applications for Android operating system. Native development is recommended to use in applications in favor for better user experience and for greater performance. PhoneGap mobile application framework gives the opportunity for simple approach to producing mobile applications with programming languages easy and well-known and the compatability with the most used mobile operating systems with once written source code. Native mobile applications can be described as more advanced because they are usually used to produce more difficult applications like Angry Birds, but native way has decreased in popularity after the launch of application development frameworks like PhoneGap. PhoneGap and other application development frameworks are developing all the time and with fast pace, and at the moment they win native development easily in the ease and speed of development.

More information about PhoneGap and getting started guide can be found at their website: www.phonegap.com.

  • SorinJackson

    Hi,
    I am a developer in mobilepundits and use PhoneGap for developing mobile applications. I love its feature which is very useful for developing mobile applications.

  • Cinilak

    How many languages do you speak, Bob?