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

Optimizing JavaScript


Now that we have covered the optimization of stylesheets, let's look at our scripts. JavaScript has also had a history of being dropped onto the page without any forethought or planning, and in general has led to bad reputation for the language. But again, because of the complex nature of web applications, the open source community has helped shape the language.

Throughout the book, we have adopted several industry standards, including namespaces, closures, caching variables, and so on. However, it is also essential we validate and profile our scripts so they can be optimized. In this section, we will go through this and hopefully cover the major points needed to make high-performance mobile applications.

Validating JavaScript using JSLint

In recent years, various tools have come out to help us validate our JavaScript. Tools such as JSLint and JSHint have been created to help us as we code, similar to CSS Lint. But why should we use these tools, especially for JavaScript...