Let's delve into advanced iPhone development tips and techniques that go beyond the basics of my first iPhone development article.
Once you've decided to ensure your content is accessible via iPhone (and thus the iPod Touch) you'll need to contemplate the different ways this can be done. Essentially there are 3 different levels of iPhone support to which you could aspire:
- Compatible: Test an existing web site on the iPhone and make any minor tweaks necessary for basic display.
- Optimized: Create an alternate user interface (for some or all of an existing web site) that has been created with the iPhone in mind.
- Application: Create a new web application intended specifically for iPhone users.
If you have an existing web site, you might first decide to ensure it is simply iPhone compatible. This is generally an easy bar to reach since most web sites developed using modern web development techniques and standards (such as HTML 4.0.1 and XHTML 1.0) are already iPhone compatible. The iPhone with its built-in Safari web browser is clearly the best handheld web surfing device ever created. Users can easily zoom in & out, and scroll around intuitively to view virtually every web site on the Internet.
To ensure your site is iPhone compatible, obviously you'll need to test it with an iPhone - or at least an iPhone simulator.
Some issues you may run into are the iPhone's lack of support for plug-ins such as Flash, ActiveX controls, and Silverlight. The iPhone also has only limited support for various file types. Aside from the supported image file types (GIF, PNG, JPG, & TIFF) the iPhone supports the display of only QuickTime, PDF, Text, Excel, and Word files. (Word and Excel files are automatically converted to HTML for display.) The old fashioned WAP/WML cell phone standard is not supported (or needed) on the iPhone.
Once you've ensured your pre-existing web site is iPhone compatible, you might choose to take the extra step of optimizing some of all of its content for improved display on the iPhone.
While users can view large web pages by zooming & scrolling, it's preferable to display content to iPhone users in ways that do not require them to do so. To accomplish this goal you may want to design user interfaces that fit nicely within the iPhone's native resolution of 320x480.
Sites optimized for the iPhone often detect iPhone users (via the browser's user agent string) and apply alternate CSS or even redirect users to a completely different (iPhone optimized) version of the page.
For example, the standard home page of the popular movie site Fandango displays just fine on the iPhone, but the iPhone optimized version is even more convenient since it is sized in a way that does not require users to zoom or scroll at all. If you navigate to Fandango's home page with an iPhone you'll automatically be redirected to their iPhone optimized version of the site, as shown below:
Web Applications that have been designed specifically the iPhone typically implement cutting edge technologies such as AJAX to improve usability responsiveness. (If you plan to use Microsoft's ASP.NET AJAX development platform, you should ensure that your iPhone users have upgraded to at least version 1.1 of the iPhone firmware.)
Since such applications usually don't have to worry about being cross browser compatible, they are free to take advantage of Safari-supported CSS styles that are not yet part of the HTML standard. These webkit styles can be used to display rounded corners, shadows, and colorful buttons so that bandwidth (and memory) hogging images can be avoided.
Applications designed for the iPhone also tend to take advantage of the client side Canvas object to implement advanced animation techniques. The Canvas object is supported by every major browser except Internet Explorer (although a plugin is available to add Internet Explorer support.) This can be a reasonable alternative to Flash and Silverlight.
Apple has assembled a showcase of iPhone applications that were created by developers from around the world.
Article Source: DotnetSlackers.Com
iPhone Programming | iPhone Applications | iPhone Development