HTML and CSS Reference
In-Depth Information
Graceful Degradation
So you've decided which browsers you're going to support (all of them hopefully), but
now you must polyfill or gracefully degrade, your apps where certain HTML5e specifi‐
cations are not implemented. The premise for graceful degradation is to first build for
the latest and greatest, then add polyfills , or handlers, for less capable devices. How can
you create a development environment that will service your enterprise project needs
and give you an API that works and degrades gracefully across multiple mobile brows‐
ers? At the end of each subsequent chapter, we'll look at approaches to handling these
issues and identify projects that could possibly provide an open source solution.
You now have a starting point: a decent view of which HTML5 APIs are supported within
mobile device browsers. In terms of the future, W3C, spec-driven, device features are
only guaranteed to get better as new device operating systems are released and the
specifications themselves become final. The following chapters will examine and rate
available frameworks to form a reusable API for your project.
QA and Device Testing
In addition to deciding which browsers you are going to support, you need an easy way
to develop and test across them. Enterprise development and QA cycles can get expen‐
sive depending on the scale of your project. So setting up the proper rapid development
and testing environment is critical to success.
Because the current mobile market is mostly owned by Android and iOS, WebKit-based
testing is fairly easy. You can test things out as you normally do on your desktop browser,
then run them on a targeted mobile device that is backed by a version of WebKit. Just
because you tested your app on the desktop version of Chrome or Safari, however, does
not mean that everything will work properly across all WebKit-based mobile browsers.
Nor does it mean that WebKit is the perfect representation of the Mobile Web. You
should test across as many target platforms as possible based on W3C standards.
The best way to test your mobile HTML5-based application is to use the actual physical
device you are targeting (or an emulator). As a service to developers, Max Firtman, the
author of Programming the Mobile Web (O'Reilly) does a great job of identifying available
emulators and maintains an up-to-date list, which you can find at mobilexweb and
preview in Figure 2-6 .
Take a few moments to decide which emulator you may need and get ready for Chap‐
ter 3 . There, you'll review how to debug hardware acceleration issues, investigate all the
available remote debugging techniques, and learn how to work and develop across each
browser.
Search WWH ::




Custom Search