Book Image

HTML5 iPhone Web Application Development

By : Alvin Crespo
Book Image

HTML5 iPhone Web Application Development

By: Alvin Crespo

Overview of this book

<p>Create compelling web applications specifically tailored for distribution on iOS Safari. Work through real world examples with references, and in-depth discussions on the approach; including its benefits and drawbacks.<br /><br />"HTML5 iPhone Web Application Development" strives to teach all levels of developers, beginners and professionals, the process of creating web applications for iOS Safari. Utilizing current industry standards for frontend development, learn to take advantage of HTML5, CSS3 and JavaScript to create compelling software.<br /><br />Start with reviewing current industry standards for frontend development, and end with creating a native application using the same codebase.</p> <p>Your journey will begin with an overview of current industry standards for frontend technology, quickly moving to solve real world issues; from creating a resizable or responsive gallery, to creating a single page application that utilizes the popular Backbone.js framework.</p> <p>"HTML5 iPhone Web Application Development" aims to make you an expert in developing web applications for the iOS Safari platform.</p>
Table of Contents (17 chapters)
HTML5 iPhone Web Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction to Backbone.js


To add structure to our one-page application, we will be using Backbone.js, a light framework that helps us apply the MVC design pattern. Backbone.js is one of the many MVC-type frameworks that help frontend development stick to best practices of separating out the data from the views or in particular, the DOM. On top of that, our applications can become quite complex for one-page apps. Backbone.js helps alleviate these issues and gets us going quickly. So let's start with discussing how MVC applies to this framework.

MVC and Backbone.js

There are many types of JavaScript frameworks that apply MVC differently, it is no different for Backbone. Backbone implements Models, Views, Collections, and Routers; it also includes an Event, History, and Sync system. As you can see, Backbone does not have a traditional Controller that was discussed earlier, but we can interpret Views as controllers. As per Backbone's documentation (http://backbonejs.org/#FAQ-mvc):

(…) in Backbone...