Tuesday, July 10, 2007

FW: SitePoint Tech Times #168 - The iPhone Cometh

 


From: SitePoint [mailto:techtimes@sitepoint.com]
Sent: Tuesday, July 10, 2007 4:56 AM
To: sitepoint@fkx.com
Subject: SitePoint Tech Times #168 - The iPhone Cometh

SitePoint Tech
TimesJuly 9th, 2007 
Issue 168 

Newsletter Archives | Advertising | Contact us  
Tips, Tricks, News and Reviews for Web Coders

In This Issue...

Web CEO 7.0. Your key to top rankings in Google, Yahoo and MSN

  • keyword research
  • website optimization for search engines
  • accurate reporting of search engine rankings
  • link popularity research and building
  • real time visitor tracking and more

Download Web CEO Free Edition and get access to SEO/SEM Training and Certification

Top


Introduction

Kevin YankWe're less than two weeks into July, and already it's looking like the biggest news of the summer for web developers will be the release of the Apple iPhone.

In the lead up to its June 29th release, the most insubstantial rumor regarding the pricey gadget made instant headlines. By launch day, queues had formed outside Apple Stores all over the US, with IT A-listers announcing their intention to stand in line. Now, a week after release, most outlets have sold out, and reports put the number of iPhones in circulation somewhere around the one million mark.

For web developers, however, the iPhone is much more than just a sexy handset. It's arguably the first mass-market mobile device to sport a desktop-grade web browser. In fact, the iPhone's browser is really just a customized version of Safari, with all the support for web standards, Ajax, and other niceties that come with it.

Here at SitePoint HQ in Australia, we can expect a significant wait before the iPhone reaches these shores. But because iPhone application development is really just web application development for a particular browser, we can all get in on the act today!

Top


The iPhone Cometh

From the moment it was announced, the iPhone generated excited speculation within the developer community. The combination of a portable device with a big, glossy, multi-touch color display had programmers chomping at the bit to develop applications for the platform.

But what sort of platform would it be? At first, many assumed it would provide the same JavaME platform supported by most current cell phones, or perhaps even a full JavaSE implementation. Apple CEO Steve Jobs was quick to quash these theories in a widely-reported interview:

"Java’s not worth building in [to the phone]. Nobody uses Java anymore. It’s this big, heavyweight ball and chain."

Without Java in the picture, developers wondered if they would have any access at all to the iPhone platform. Apple had said that the device would run a version of the Mac OS X operating system, so perhaps iPhone apps would be developed in Cocoa, Apple's Objective-C based programming environment for Mac OS X?

All was revealed at the Apple 2007 Word Wide Developer Conference (WWDC 07), where Jobs announced that the iPhone would sport a desktop-grade web browser based on Safari, which would support hooks into the iPhone's built-in applications (phone, address book, calendar, etc.). Far from having to accommodate an entirely new development environment, developers would be able to exploit their existing investment in web standards and Ajax to bring their applications to the iPhone.

While many developers were disappointed by the perceived limitations of 3rd party applications having to run within the phone's browser, others were more optimistic, assuming that Apple's iPhone-specific extensions to Safari would bring the iPhone's many slick UI features to 3rd party applications.

Now that the iPhone is out, the race is on to build killer apps, and developers are quickly discovering just how much of the device's potential is available to 3rd party applications.

Continued after the ad...

Top


Clickatell SMS Gateway – Bulk SMS Solutions.

Clickatell allows you to SMS enable any of your applications via various API's with ease. With Clickatell's global reach, you can now reach 600 networks in 200 countries from as little as 0.015 Euro.

Clickatell is the world's #1 Messaging Provider promising to deliver any message, anywhere.

Try the Clickatell SMS Gateway and receive 10 FREE test messages.

Top


First, a few facts that became clear the day the iPhone was released:

  • Safari on the iPhone does not support Flash, or other plug-in technologies like Java applets.
  • Safari on the iPhone has no text selection or clipboard features.
  • Safari on the iPhone provides no support for multi-touch events within web applications.
  • In fact, Safari on the iPhone provides no way to respond to the user touching the screen at all—all you get is a click event in response to single taps.

Whether these limitations will prove to be permanent restrictions, or simply growing pains in a new platform, remains to be seen.

The news isn't all bad, though. One unique feature of the iPhone is its ability to detect when it is held sideways and adjust the display accordingly. While no event is generated by Safari when this occurs, JavaScript that continually checks the display dimensions can identify when such a change has occurred and respond to it. This hack became the basis for Tilt, one of the first games written specifically for the iPhone.

While intrepid developers continue to bend the iPhone to their will using hacks like these (e.g. hiding the toolbar using scrollTo), Apple has released basic developer documentation detailing the unique iPhone features that are supported:

  • Web applications can provide links to dial phone numbers with the tel: URL scheme:
    <a href="tel:1-408-555-5555">1-408-555-5555</a>
  • Links with the mailto: scheme open the iPhone's built-in email composition screen:
    <a href="mailto:me@example.com">email me</a>
  • The iPhone detects links to Google Maps and displays them with its built-in mapping application instead:
    <a href="http://maps.google.com/maps?q=sitepoint"> SitePoint</a>
  • The iPhone supports CSS 3 Media Queries, which allow you to specify a separate style sheet for the iPhone
    <link media="only screen and     (max-device-width:480px)"     href="iphone.css" type="text/css"     rel="stylesheet"/>
    Note that, as other browsers begin to support media queries, iPhone-specific style sheets will apply to all devices with a display width less than or equal to 480 pixels.
  • The iPhone supports a <meta name="viewport"> tag that controls the rendered width of the page, how the page is scaled when first displayed, and how much control the user has over page scaling.
  • The iPhone supports a number of file formats for embedded video, including H.264 and MPEG-4.
  • The iPhone supports downloading and displaying PDF documents.

To me, this all feels like a platform designed to make browsing the Web on a handheld device an absolute joy, and from what I've read Apple as certainly succeeded at that.

As for whether Apple has produced an attractive platform for 3rd party applications, I think its clear that it has done no such thing. Steve Jobs's WWDC announcement positioning Safari as the platform Apple envisions for building iPhone apps was obviously a knee-jerk response to the development community's interest in the device.

Enthusiastic developers may well use the limited features of Safari on the iPhone to build a realistic framework for application development, but what Apple has provided is little more than a pile of bricks (with a note claiming that you don't need mortar to build a brick wall).

In truth, a solid implementation of JavaME (with multi-touch extensions, natch) would have provided a much more powerful platform for application developers.

Top


That's all for this iPhone-filled issue of the Tech Times. See you in two weeks!

Kevin Yank
techtimes@sitepoint.com
Editor, The SitePoint Tech Times

Top


Help Your Friends Out

People you care about can benefit from the wealth of information on new and maturing technologies available on the Internet. Help them learn how to do it by forwarding them this issue of the SitePoint Tech Times!

Send this to a friend
 New Technical Articles

Simply JavaScript: The Three Layers of the Web

Kevin Yank
By Kevin Yank

HTML and CSS alone can only achieve the static beauty of the department store mannequin. Here, Kevin shows you how, with JavaScript, you can combine the three layers of the Web to bring that awkward puppet to life!

 Techy Forum Threads
 More Techy Blog Entries

Web Tech Blog:
Technically Speaking

JavaScript & CSS Blog:
Stylish Scripting

Daily Links Blog:
SitePoint News Wire

ColdFusion Blog:
InFused

Manage Your Subscription Here.

!You are currently subscribed as sitepoint@fkx.com to the HTML edition of the Tech Times.


CHANGE your email address here

UNSUBSCRIBE from the Tech Times here.

SUBSCRIBE to the Tech Times here.

SWAP to the 'Text-Only' version of the Tech Times here.


SitePoint Pty. Ltd.
424 Smith St
Collingwood, VIC 3066
AUSTRALIA


Thanks for reading!

 © SitePoint 1998-2007. All Rights Reserved.

1 comment:

Unknown said...

Tilt Has a Home Page!

Since the iPhone Dev Camp Hack-A-Thon we have created a page for Tilt: a game in 1.5 dimensions. It contains the latest information, source code, and updates for Tilt the first motion controlled iPhone game. To play Tilt rotate your iPhone to help Flip eat falling butterflies and leaves of matching color.

Here’s the main link page for the Tilt iPhone game.
Here's the link to play from your iPhone.
Here’s the story of how we made Tilt in a weekend.

Have Fun!

Nicole Lazzaro
President XEODesign, Inc.