YYZtech.ca

Safari and WebKit Development for iPhone OS 3.0

Developing for the mobile web the WebKit way.

By: Staff

AdSense

When Apple initially announced that developers would be limited to writing web applications for the iPhone, there was predictable disappointment from developers; while Apple eventually relented and allowed developers access to the OS, the growing number of capable -- and not only iPhone -- mobile browsers means that today creating a mobile website makes more sense every day. While this book naturally focuses exclusively on the iPhone, much of the material related to optimization, HTML5 and CSS3 is very applicable to the growing number of WebKit-based mobile browsers as well as desktop browsers like Safari and Chrome.

"Safari and WebKit Development for iPhone" provides a good introduction to developing web applications for the iPhone by: showing how to use web toolkits to mimic the look and feel of native applications, how to make use of the features of CSS3 and HTML5 implemented by the browser and how to convert and optimize an existing site for the iPhone. As well as these, there are also chapters on integrating -- and that limits of -- with the rest of the iPhone OS.

To sum up the intended reader, I'd say the book itself is aimed at Mac users -- there is, unsurprisingly, simply much more complete tools for iPhone development on that Mac at this point in time -- with some understanding of JavaScript. The book's second chapter does have a brief introduction to JavaScript and manipulating the DOM; but while I can't see it teaching someone new to JavScript enough to get through this book, it is useful for those of us who have been spoiled by jQuery and have forgotten how to do DOM manipulation without the aid of such helper libraries. As readers work with the toolkits available, some Javacript knowledge is required.

Web Toolkits
That chapter is followed by an introduction to three web toolkits that aim to make it easy to create web applications that look like regular iPhone applications. There is good reason for that, and a quote from chapter 4 sums it up well: "the biggest mindset change for developers is to grasp that they are creating iPhone Web apps, not Web applications that run on iPhone." (page 97)  Simply put, outside of games iPhone users expect the same look and feel from any application, hence the need for these toolkits, including the three profiled in the book: iWebKit, iUI and UiUIKit. Of the three, iWebKit seems to be the most powerful and is used in most of the book. Each of these toolkits use the features of CSS3 and HTML5 to mimic the look of native apps.

CSS3/HTML5
One of the most useful things about this book is its coverage of HTML5 and CSS3 as it is implemented on WebKit/iPhone. Both CSS3 and HTML5 are developing standards that offer a lot of features to developers ranging from more control over presentation and video support to off-line storage. The book devotes a lot of space to demonstrating what can be done with them. In particular, the <canvas> element's features are explained a lot, but new CSS features for images are also covered. HTML5's support for off-line content is also covered. If there's a weak section, it's the coverage of using SQLite from JavaScript.

Optimizations
Chapter 13 provides a number of good general ways to optimize your iPhone app using CSS and JavaScript. Because the iPhone's WebKit browser is much closer in capabilities to desktop browsers, most of these tips will be familiar to web developers who sites like Yahoo!'s Exceptional Performance while some, particularly to do with memory usage and speed are more relevant to the iPhone. One of the interesting points is the author makes a point about how optimizing a site as much as absolutely possible (he calls these people hyper-optimizers) can lead a large amount of work not resulting in a large gain in performance. I'd add a point to that designers should keep in mind that with a platform that is being improved roughly once a year, it makes sense to learn how to write tighter JavaScript, figure out how to make the most of CSS' abilities, in short, optimize with language, not the hardware.

Perhaps the most useful chapter for web developers with an existing website is chapter 12. This covers a few ways you can convert an exiting website into something more iPhone-friendly, and might make a good starting point for organizations looking take their existing website into the world of mobile devices without committing to a full re-design.

Conclusion
"Safari and WebKit Development for iPhone" teaches readers how to use three web toolkits available to create iPhone-friendly websites, provides a good introduction to the features of HTML5 and CSS3 as implemented in the iPhone's browser, as well as how to convent and optimize websites for the iPhone. The best features of this book is the coverage of HTML5 and CSS3 as it applies to the iPhone and the use of toolkits for creating iPhone Apps. As well, if you have a existing website, this book will provide a fair amount of help, especially in areas where the iPhone's browser differs from its desktop cousins.

Date published: 11-Dec-2009

AdSense

Comments

AdSense

Related

Original Macintosh Design Team Interview Video

Interviews with 5 designers recorded in October 1983 for Apple TV commercials that never ran.

Taking your iPhone to the Max

Secrets of the iPhone.

Create Great iPhone Photos

A book that's a bit more than just a grand-tour of photo-related iPhone apps.

Revolution in the Valley

Andy Hertzfeld's insiders tale of the birth of the Mac.

Sponsored



2017 YYZTech



For American computers stores, visit: AmericanComputerDealer.com

Google+