Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
JavaScript Mobile Application Development

You're reading from  JavaScript Mobile Application Development

Product type Book
Published in Oct 2014
Publisher
ISBN-13 9781783554171
Pages 332 pages
Edition 1st Edition
Languages
Toc

Table of Contents (15) Chapters close

JavaScript Mobile Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. An Introduction to Apache Cordova 2. Developing Your First Cordova Application 3. Apache Cordova Development Tools 4. Cordova API in Action 5. Diving Deeper into the Cordova API 6. Developing Custom Cordova Plugins 7. Unit Testing the Cordova App's Logic 8. Applying it All – the Mega App Index

Why you should use Cordova


In order to understand the importance of using Apache Cordova, you first need to understand the current challenges of mobile development, which are summarized as follows:

  • Every mobile platform has its own programming philosophy

  • Every mobile platform has its own set of unique problems

  • Developing, testing, and maintaining native application(s) on different mobile platforms is expensive

One of the biggest challenges of current mobile development is that every mobile platform has its own programming philosophy. There are various programming languages and tools that are required in order to develop mobile applications on the different platforms. For example, if you want to develop a native mobile application on Android, you will need to use Java as the programming language and Eclipse or IntelliJ (or another equivalent Java IDE) as an Integrated Development Environment (IDE). On the other hand, if you want to develop a native mobile application in iOS, you will need to use Objective-C as the programming language and Xcode or JetBrains AppCode as the programming IDE. Finally, if you want to develop a Windows platform mobile application, you will need to use a .NET programming language and Visual Studio as the IDE.

As a result of this previous challenge, developing, testing and maintaining a single application that has different implementations on mobile platforms is really hard and costly. You will have many code bases that are usually inconsistent, because every code base will be written in a different language by developers from different backgrounds. This is because it is really hard to find a single developer who is aware of all of these programming languages and tools.

Tip

Using an IDE to develop mobile applications is not mandatory. However, it is recommended as it speeds up the process of application development and testing.

Adding to these challenges, handling the incompatible behaviors of mobile platforms is a challenge that cannot be ignored. One of the problems that you might face when you develop your native Android application on iOS is that you cannot send SMS messages directly using the platform API without launching the native platform SMS application to the user. On the other hand, in Android, you can send SMS messages using the platform API directly from your application code. This means that you will have the burden of not only implementing your application logic on the different platforms, but you might also need to implement different workarounds using different programming languages in order to have a consistent behavior of your application as much as you can across the mobile platforms.

Using Apache Cordova will reduce the complexity of these challenges. It will give you the ability to use a single programming language (JavaScript) to write your application on the different mobile platforms; you won't need to have a big set of programming languages anymore after using Apache Cordova. Apache Cordova gives you the ability to have a common code base for all of the implementations of your application on the different mobile platforms. This means that the complexity of developing, testing, and maintaining your mobile application will be greatly reduced.

Having a single code base that is developed using JavaScript gives a great flexibility for mobile developers to handle the unique problems of every mobile platform. This puts everything neatly in a centralized place in the code. This makes your application code more readable and maintainable.

You have been reading a chapter from
JavaScript Mobile Application Development
Published in: Oct 2014 Publisher: ISBN-13: 9781783554171
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}