If you have picked up this book, there is a good chance that you are interested in combining WordPress with PhoneGap and building some really cool mobile applications. While it may not be obvious, WordPress can be used in conjunction with PhoneGap to create native mobile apps, with a powerful backend content management system (CMS) provided by WordPress.
This book shows you how to combine WordPress and PhoneGap so that you can create native mobile apps with minimal coding.
How can we use WordPress together with PhoneGap? It turns out that this is possible through the use of WordPress's Application Programming Interface (API). For starters, consider how popular websites such as Facebook, Twitter, and Google allow third-party programmers to extend their website's core functionalities via APIs; third-party developers create mashups or build new applications through two basic requests, namely the GET and POST requests. In this book, you will also learn how to extend your WordPress site's capabilities over to mobile applications.
Chapter 1, WordPress Overview and Installation, walks you through a high-level overview of WordPress, from getting it up and running, to its key features such as plugins and themes.
Chapter 2, Adding Geographical Capabilities via the GeoPlaces Theme, talks about creating a location-based directory via the GeoPlaces theme. It covers the setting up and addition of sample geographic data into your WordPress site.
Chapter 3, Extending WordPress Using JSON-API, covers how to create your very own API that exposes WordPress's functionality with the JSON-API plugin. From here you'll see how you can quickly create a third-party app based on your WordPress site's content and its exposed API.
Chapter 4, Building Mobile Applications Using PhoneGap, walks you through the installation and creation of a PhoneGap application.
Chapter 5, Extending WordPress to the Mobile World, continues and builds upon the concepts learned in Chapter 4, Building Mobile Applications Using PhoneGap You will extend your WordPress site to native mobile applications via PhoneGap. You will learn how easy it is to convert a JavaScript application to a PhoneGap application with just a few lines of code.
Chapter 6, Using Open Source Themes, walks you through applying what we have learned from the first five chapters to open source themes. The theme we are using is the Twenty Ten theme.
You'll need a basic text editor to get started in this book. Instructions for installing MySQL, PHP, WordPress, and so on are provided in this book.
This book is for people who are interested in building cross-platform, native mobile applications with a minimum effort for coding. You should have at least a beginner's knowledge of JavaScript/jQuery and WordPress. Knowledge of PhoneGap, JSON, and API-related concepts is not required.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "We will be writing a readSinglePost()
function."
A block of code is set as follows:
<!DOCTYPE HTML> <html> <head> <title>Hello World</title> <script type="text/javascript" charset="utf-8"src="cordova-1.9.0.js"></script> </head> <body> <h1>Hello World</h1> </body> </html>
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
<body> <h1>Hello World</h1> <div id="main"> <div id="title"></div> <div id="contents"></div> </div> </body>
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "clicking the Next button moves you to the next screen".
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>
, and mention the book title through the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]>
if you are having a problem with any aspect of the book, and we will do our best to address it.