Book Image

JavaScript Mobile Application Development

Book Image

JavaScript Mobile Application Development

Overview of this book

Table of Contents (15 chapters)
JavaScript Mobile Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The differences between mobile web, hybrid mobile, and native mobile applications


It is very important to understand the differences between mobile web, hybrid mobile, and native mobile applications. Mobile web application(s) can be accessed using the web browser and are designed to be responsive. Responsive means that they can adapt their views in order to be displayed properly on different resolutions of mobile and tablet devices. Mobile web applications usually require you to be online in order to use them. They are not real mobile native applications, although they might have the same look and feel as mobile native applications that use the CSS technology. Mobile web applications are, in fact, not uploaded to app stores and do not have the same physical formats of the platform native mobile applications. They use limited native features of the mobile device, such as geolocation and storage features.

Although hybrid and native mobile applications have the same physical formats, they are developed using totally different technologies. Hybrid mobile applications are developed using common web technologies (HTML, CSS, and JavaScript), while native mobile applications are developed using the mobile platform programming language (for example, Java for Android, Objective-C for iOS, and .NET programming language(s) for Windows Phone).

If you are a native mobile application developer, then in order to develop a single native application that can work on the different mobile platforms, you will need to develop your application on one platform and then reimplement its logic on other platforms. Reimplementing the same logic on every platform that you have to support is a pain. This is because you will need to use the mobile platform programming language and handle different types of problems, which you will face on every platform.

Hybrid applications have the great advantage of allowing you to use the same code base (which consists of your HTML, CSS, and JavaScript code) for the different platforms of your application. This means that you write your application code once, and then, you can run it everywhere. Of course, you might need to do specific changes on every platform, but in the end, these changes are mostly minimal. Adding to this advantage, all of your application logic is implemented using a single and neat programming language, which is JavaScript.

The time taken to develop hybrid mobile applications, which run across many mobile platforms, will definitely be shorter. Furthermore, the required resources to implement a hybrid mobile project will be minimized compared to developing native mobile applications. This is because hybrid applications use a unified programming language (JavaScript), while native mobile applications use many non-unified programming languages (such as Objective-C, Java, and C#), which, by definition, require a larger team of developers with different skill sets.

Finally, it is worth mentioning that native mobile applications might be a little bit faster than hybrid applications (assuming that they are implementing the same set of requirements), because native applications are compiled and native code is optimized. However, applying the common best practices in your hybrid applications can definitely increase your application's performance to be as close as the native application. In this book, you will learn how to boost the performance of your hybrid mobile application using Apache Cordova and jQuery Mobile.

If you take a look at the following table, you will find that it summarizes the differences between the three types of mobile applications:

 

Mobile web

Hybrid application

Native application

Uploaded to app store

No

Yes

Yes

Used technologies

JavaScript, CSS, and HTML

The native programming language of the platform

Complexity

Normal

Normal

High

Cross-platform mobiles support

Yes

Yes

No

Device native features

Partial

Full (thanks to Hybrid application frameworks such as Apache Cordova).

Full

Performance (assuming following best practices)

Very good

Excellent

This table summarizes the key differences between mobile web, hybrid mobile, and native mobile applications.

Tip

Apache Cordova is currently one of the most popular frameworks for building Hybrid applications.

From the developers' perspective, if you are a web developer, then creating hybrid applications using Apache Cordova is a great option for you as you will not have to spend time learning JavaScript, CSS, and HTML. Using your existing skill set with Apache Cordova allows you to develop cross-platform mobile applications in less time.

If you are a native developer, then spending some time learning the common web technologies will add great value and have an impact on your work. This is because after acquiring these skills along with Apache Cordova, you will be able to develop cross-platform mobile application(s) in less time and effort compared to the time and effort you would spend in order to develop the same application(s) on every platform using native programming languages.