HTML and CSS Reference
In-Depth Information
Introducing PhoneGap
PhoneGap is an open source development tool created by Nitobi ( http://www.nitobi
.com ) that acts as a software bridge between standards-based HTML development and
several mobile platforms. Using PhoneGap, the HTML5 Canvas developer has access
to the various hardware APIs for supported devices through an abstraction layer . This
software interface allows the same code to be used to target features common among
various devices—such as geolocation, touch screens, microphones, and other hardware
capabilities—so that separate code does not need to be written for each device.
You will need an Intel-based Macintosh running Xcode to be able to
compile a PhoneGap project. There currently is no development plat-
form for Windows that will allow compiling Safari Mobile applications
to the iOS platform with an Objective-C wrapper.
We won't target too many specific iPhone features in this chapter. In the allotted space,
we will cover the basics needed to take a simple application and get it up and running
in the iPhone simulator, and then onto a physical device. We will then implement an
accelerometer feature into our application.
For further reading, Jonathan Stark's Building iPhone Apps with HTML,
CSS, and JavaScript (O'Reilly) covers PhoneGap and hardware feature
API integration in detail. If you'd rather try this with Android, explore
the similar Building Android Apps with HTML, CSS, and JavaScript
(O'Reilly), also by Jonathan Stark, which applies PhoneGap to create
applications for Android.
The Application
The application we are going to create is a simple BS Bingo game. BS Bingo was designed
on paper well before mobile devices were available. This cynical game concept is based
on the feeling (by some) that the typical business workplace has been overtaken with
Dilbert- or Office Space -esque annoying corporate jargon and doublespeak. This dou-
blespeak seems to have deeply rooted itself in the workplace over the last 20 years,
mostly to the annoyance of software developers (such as ourselves).
In the pen-and-paper version of the game, each player brings a “bingo card” to a meeting
where he expects to hear a lot of this corporate doublespeak. The bingo card is a 5×5
grid, and each of the 25 squares is filled with one of the annoying words or jargon
phrases. During the meeting, each player marks off squares as the words or phrases are
said aloud by the unsuspecting (and not playing) members of the meeting. When a
player has a full column of his card marked off, he is supposed to jump up from the
meeting table and yell “BS!”
Search WWH ::

Custom Search