While things have been kind of insane as I start my new job I was lucky enough to be able to travel down to Carpenteria, CA and do a Lynda.com recording on Up and Running with PhoneGap. The title is part of their “Up and Running” Series which means it’s about a 2 hour course and is meant to provide a basic overview of some of the features behind PhoneGap. So it’s not an intense deep dive but hopefully for some of you looking into PhoneGap it will give you a good sense of how the APIs work and some of the general workflows.
The video goes through setting up the SDKs, setting up a PhoneGap project, adding device-specific APIs, incorporating jQuery Mobile, and using PhoneGap Build to compile and test binaires. So if you’re a Lynda.com subscriber, check it out!
One quick note, there’s currently an issue with using jQuery Mobile 1.3 and the Handlebars templates I use in the course. I’m working on figuring out if that’s going to be fixed or if people will have to use jQuery Mobile 1.2.
As I’ve been digging more and more into PhoneGap Build I’ve also been discovering that there are some gaps in the workflow and that it’s not always easy to go from a feature I want to use to a cross-platform implementation for it. Most of the time I’ll use the PhoneGap documentation as a starter point and then try to wrangle it into a local project and then make that local project work with PhoneGap Build. One of my favorite features of PhoneGap Build is that it can pull directly from a git/svn repository and build binaries from that repo. So last night I did a little bit of work to pull a couple of features/code from the documentation into GitHub projects that can be quickly loaded into PhoneGap Build and turned into binaries. Fueled by some NW Peaks beer last night I built some initial ideas for the PhoneGap Starter Project. As you can see it’s pretty sparse but there are a few goals I have in mind.
- Showing how to structure projects for use in PhoneGap build. I struggled with this a bit–with things like making the config.xml file work, setting the files up correctly (in a www folder, and referencing cordova.js in the script tag but not including it), etc. Each one of these projects works with PhoneGap Build out of the box.
- Linking documentation to a real project. The documentation for PhoneGap is pretty good and I wanted an easy, out-of-the-box way for people to see the features in action. So I took the code from the documentation and turned them into projects. Load them into PhoneGap Build and you can see them in action on your device in a matter of seconds.
- Helping fix documentation! I’m looking for ways to contribute to the Cordova project and some of the documentation code is a bit out of date. What better way than to go through that code, make sure it works, fix bugs, and then submit them back?
- Showing how kick ass PhoneGap Build is. I really, really like PhoneGap Build and once you get a good workflow down I think it’s a great help in creating binaries quickly. This shows it in action.
To use the project in PhoneGap Build, just create a new app from SVN and put in the URL of the repo.
Creating a new app based on Git/SVN project
I’m going to be filling out some of other documented features over the week as well as doing an example for the ChildBrowser plugin. I’m curious to hear if this seems useful for people or solves any kind of pain point. Since it helps me find the gaps/issues in the documentation, it serves a higher purpose for me, but if it seems useful then I’ll work on keeping it up to date.