Game Development Reference
In-Depth Information
Mobile frameworks
jQuery and Zepto
jQuery is an awesome, widely-used JavaScript library that makes working with the DOM easier and offers
an abstraction to support all browsers. Zepto is an alternative to jQuery that only targets WebKit browsers.
Its usage is perfect for mobile and tablet platforms because they mostly use a WebKit browser.
To summarize, take jQuery, clean it from all hacks, polyfill, and fallback aimed to support old browsers,
and you get Zepto—a lightweight and efficient library.
Tip To learn more about the jQuery API, visit http://jquery.com .
PhoneGap
PhoneGap is a convenient library for deploying web applications to most of the smartphone and tablet
platforms. The PhoneGap JavaScript library enhances the HTML5 API to gain access to native device
features in JavaScript. For instance, if you have permission, you can theoretically access phone contacts,
access the accelerometer (used in Same Game Gravity ), shoot a photo, get a geolocation, get the network
state, and so forth.
Some of these features (like geolocation) are available in HTML5 specs and are already implemented in
browsers. Globally, most of these features will be implemented. PhoneGap is just a polyfill, a shell that
guarantees the support of a feature.
It also provides app skeletons that help you to build packages for app stores.
Figure 3-5. Supported platforms
PhoneGap Build
PhoneGap Build is a web service that helps you to build your web application for different platform packages
(Android apk , iOS ipa , Symbian wgz , Blackberry ota , webOS ipk ). You just upload your zip application or link
to a Git repository to get these different packages. That's revolutionary because you no longer require
thousands of frameworks to build your application for each platform, and it's much, much faster.
The application configuration is described in a config.xml manifest, which is an abstraction of platform-
related manifests.
The first limitation of PhoneGap Build is the security/privacy: will a company trust this cloud system and
accept its certificates? The second limitation is, in my opinion, the coverage of the config.xml : will this
manifest cover all the needs and possibilities a platform provides?
 
Search WWH ::




Custom Search