Preface
PhoneGap/Cordova, as a technology to create hybrid mobile apps, relies heavily upon JavaScript, HTML, and CSS in order to present your apps to your users. This is ideal in many ways, especially since you can rely upon your knowledge of web-based technologies in order to create cross-platform mobile apps. Being able to build on your existing knowledge set is a major plus when it comes to recommending Cordova, and generally, one can build their first simple app using Cordova pretty easily. But when it comes to building larger, more complex apps, it is useful to explore various technologies and tools that allow us to more efficiently develop mobile apps. The first few chapters of this book focus exactly on this need. We'll cover task runners such as Gulp, packagers such as Browserify, and a method of writing CSS that's easier to maintain using Sassy CSS.
In this book we generally refer to PhoneGap and Cordova simply as Cordova—PhoneGap itself is a distribution of Cordova and supplies additional features and utilities. If there is a specific difference we need to mention, we will do so in at the appropriate time.
One particular hallmark of large, complex apps is a requirement for a way to store complex data efficiently. There comes a point when using the Local Storage and File API become unwieldy, and so it is important to learn about other methods to store data, such as IndexedDB and Web SQL Database.
Quite often, it's also necessary for apps to transfer large amounts of data between the device and external servers. You can imagine a social photography app might need to upload images, and an e-book app would need to download files that represent books. We'll devote an entire chapter to this topic as well.
Of course, most developers want to get their apps out into the devices of as many users as possible. This is why creating accessible applications is important. Not every user has perfect vision. Some users may have trouble reading small text or text with low contrast. Other users may have problems discerning various color shades. And other users may not be able to hear your app's sounds very well. With assistive technologies on many mobile platforms, it is a very good idea to build our apps so that as many users as possible can use them effectively.
Deployment, ultimately, is our goal, and so the latter portion of the book will deal exactly with that: how to create launch screens and icons for our app, how to create a release build, and ultimately, how to deploy the app to the various app stores.
Along the way, we'll also deal with other concepts, such as tips you can use to make your app's user interface respond appropriately to the various form factors it finds itself running on. You'll also find tools that can verify that your app is working as you expect, as well as tips on how to find and fix performance issues.
When you're finished with this book, you should hopefully have the knowledge necessary to tackle large scale and more complex apps that are accessible, performant, and responsive.
In this book, we'll focus on the iOS and Android platforms. Cordova, however, supports many other platforms. In general, most of what is covered in this book applies to these other platforms as well. However, there are some third-party plugins that are used. If you do want to support another platform, you'll want to verify that the same or a similar plugin is available.