If you want to learn more, Farhi will be speaking at Apps World, in London on October 2-3, 2012. mobiForge readers can get a 15 percent discount for this event using the code: “MOBI15”.
There are two common philosophies/methodologies for the creation of Web apps – progressive enhancement and graceful
Anyone that is familiar with the typical HTML5 boilerplate, should have spotted the class “no-js” on the HTML tag in index.html.
• Graceful degradation is the opposite concept to progressive enhancement. Proponents of this philosophy argue that progressive enhancement isn’t suitable for modern Web applications. Graceful degradation dictates that Web apps should be developed with all the latest features and enhancements that are supported by the most up-to-date browsers. Support for older browsers should be a secondary consideration, refining the settings for the advanced features, where possible, by using polyfills, for example.
In practice, it’s common to find developers using a mix of the two approaches.
However, if required and designed correctly, Web apps can get round connectivity issues by using the latest localStorage object to store data in a key-value object:
At a later time, get the data simply by:
var details = localStorage.getItem('mySpecialKey');
var details = localStorage['mySpecialKey'];
Alternatively, localStorage can also be replaced with file storage (HTML5’s File System API) and application cache settings.
The app should periodically check for the availability of a Web connection, using this API. It will return true or false depending on the device’s network connection status.
var isOnline = navigator.onLine;
The first thing to note is that there is an abundance of frameworks out there, allowing developers to pick and choose the best to suit the task at hand. Some frameworks contains masses of features – which make them more relevant for a full-blown application workflow, while others specialize in achieving specific goals, such as: canvas for game development; event management for achieving subscriber/observer pattern; large data operations; dealing with files; sound; and/or video.
9. What are the pros and cons of using a framework?
Using a well-known framework usually boosts the development process. Most frameworks are open source, which means you can update the code, collaborate with other like-minded developers using a VCS service, such as GitHub and receive the benefit of worldwide support and quality assurance (QA) for a framework.
On the negative side, if developers do not handle or understand the framework correctly, attempting to make changes and updates to the framework can slow down the development process – it’s a steep learning curve.