Chapter 25. Writing Cross-Platform Mobile Applications with Apache Cordova

Cordova is a set of device application programming interfaces (APIs) that allow you to build mobile apps for iOS, Android, and Windows. These applications run natively on the device. However, they are built using the web technologies Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), and JavaScript. This includes support for client frameworks such as Angular, Bootstrap, and Knockout. A mobile app, like a website, also typically calls backend services such as those built with the Web API. Cordova allows you to adapt your web skills to mobile development. (See Chapters 17, “Building Modern Websites with ASP.NET 5,” 18, “Using JavaScript and Client-Side Frameworks,” and 19, “Building and Consuming Services with Web API and WCF,” for a discussion on web technologies.)

As native applications, they can access features of the native device such as the camera, the file system, the accelerometer, and local storage (to allow the application to work offline). Cordova supports APIs written in JavaScript for working with the device. A native application also means you can build for the mobile app store and thus monetize your creations.

Cordova also solves the big problem of building a mobile application targeted at a single device (such as iOS) and then having to completely rebuild it to support other device types (such as Android and Windows). Building native mobile applications often means writing an app three times, in three different languages, on three different platforms. This is time consuming and expensive to create, maintain, and evolve. With Cordova, you write once and deploy to multiple platforms. This decreases your development and maintenance costs significantly.

Microsoft has made a big investment in supporting Cordova with tools built into Visual Studio 2015. These tools simplify getting an environment up and running (and keeping it that way). For example, Cordova requires more than a dozen tool chain dependencies to set up and start developing. Thankfully, Visual Studio has built-in support to solve this problem for developers. This chapter introduces you to building cross-platform mobile applications using Cordova and Visual Studio.


Note

Microsoft is not only including Apache Cordova in Visual Studio; it is also contributing back to the community with numerous updates that help all developers on all platforms. This includes security improvements, support for Windows 8.1 / 10 Universal Apps, and platform-specific configuration.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset