Datasheet

8
Chapter 1: Introducing Safari/WebKit Development for iPhone 3.0
Four Ways to Develop Web Apps for iPhone
A Web application that you can run in any browser and an iPhone Web application are certainly made
using the same common ingredients — HTML, CSS, JavaScript, and AJAX — but they are not identical.
In fact, there are four approaches to consider when developing for iPhone:
Level 1 Fully compatible Web site/application: The ground-level approach is to develop
a Web site/app that is “iPhone/iPod touch-friendly” and is fully compatible with the Apple
mobile devices (see Figure 1-10). These sites avoid using technologies that the Apple mobile
devices do not support, including Flash, Java, and other plug-ins. The basic structure of the
presentation layer also maximizes the use of blocks and columns to make it easy for users
to navigate and zoom within the site. This basic approach does not do anything specifi c for
iPhone users but makes sure that there are no barriers to a satisfactory browsing experience.
(See Chapter 12, “Enabling and Optimizing Web Sites for the iPhone and iPod Touch,” for
converting a Web site to be friendly for iPhone users.)
Figure 1-10: The site is easy to navigate
Level 2 Web site/application optimized for Safari: The second level of support for iPhone
is to not only provide a basic level of experience for the Safari on iPhone user, but to provide an
optimized experience for those who use Safari browsers, such as utilizing some of the enhanced
WebKit CSS properties supported by Safari.
Level 3 Dedicated iPhone/iPod touch Web site/application: A third level of support is to
provide a Web site tailored to the viewport dimensions of the iPhone and provide a strong Web
browsing experience for Apple device users (see Figures 1-11 and 1-12). However, although
these sites are tailored for iPhone viewing, they do not always seek to emulate Apple UI design.
And, in many cases, these are often stripped-down versions of a fuller Web site or application.
49667c01.indd 849667c01.indd 8 10/9/09 8:04:23 AM10/9/09 8:04:23 AM