Blog


iPhone Tech Talk

The other week I went to the Boston iPhone Tech Talk and took a bunch of notes. I thought everyone would be interested in what they had to say as its quite relevant to Mozilla's upcoming mobile efforts, and the browser space in general. Let me know if anything needs any, additional, clarification.

Notes:

There was a lot of JavaScript hate by attendees ("blah blah... GWT is the only thing we trust... blah blah JavaScript is a stupid language..."). Not really surprised. Generally, these are Mac application developers by trade and the Open Web, by comparison, is frustrating and limiting.

There was strong promotion of web standards, down play of plugin (Flash, Silverlight, Java Applets) dependencies.

They recommended optimizing your page according to the following points: Scales for readability, minimize pan/zoom, finger friendly, and tuned for wireless. That translates to: Use clear type and logical page layout, reduce the height or width of the page to better fit within the screen, make your links and inputs large (to handle the large "mouse pointer"), and make liberal use of caching and gzip. All of these are good points to encourage within the web, in general.

Pages that are marked up with XHTML Mobile or are on a .mobi domain are handled specially (they're shown unmodified - assuming that the developer has already optimized the page for a mobile device appropriately).

There are some, very interesting, limitations to pages; and the browser, in general. For the most part this shouldn't effect many sites (especially considering that plugins don't run). I've noted the JavaScript-related ones:

  • 10 MB JavaScript object allocation
  • 5 second JavaScript execution limit
  • XHR not counted to JavaScript execution time (async or sync)
  • Scripts may be paused (Inactive window, Safari not active)
  • Scripts are not paused while a Quicktime movie is playing
  • Maximum 8 windows open at a time

I found it to be interesting that JavaScript execution was pausable. Thus, if have a game running in one window and go to another, the game (presumably, written in JavaScript) will be paused until you come back to it. This model is akin to what they currently do with Dashboard widgets (which are, also, HTML/CSS/JS and are paused until you view them).

It's important to note that, not only, are you not able to have more than 8 windows open at a time, but you don't have control over windows that you open. There is no such thing as a popup or modal dialog. Nor are there tabs to browse through the open windows (You have to navigate to a separate view where you browse thumbnail views of the sites). I've been trying to decide if this is more-tabbed-like or less-tabbed-like because of how it's designed (e.g. one could argue that having modal popups breaks the tabbed model), whereas not actually having access to tabs (or information about the tabs that you open) is very limiting.

Only three dialogs are allowed: alert, confirm, and prompt. They are all highly styled and consume a large portion of the screen when they appear.

Interacting with form controls is highly unique. When you do so you are placed into a separate editing/manipulation mode laid on top of the browser itself. This is indicative of the larger theme in the browser: They consistently push the user into a separate pane to deal with specialized content. I think that this is an incredibly interesting development and - quite possibly - an optimal way of dealing with "non-native" browser content.

For example, Excel, Word, PDF, and Quicktime content are all handled natively by the browser - and are shown in separate, specialized, views. (Videos are especially interesting - the whole browser is hidden and is replaced with a completely-tailored UI that is optimized for viewing movies.) I was hugely impressed by this set of features and I really think that this is a huge step for a browser to take. Mozilla is starting to do this with the new video tag, but providing means for handling common documents might be interesting as well.

They include a fully standards compliant version of Canvas - they recommend using it, highly. In fact, they recommend using things like border-image, border-radius, and Canvas to remove the need for extra markup or images.

There is no way to completely emulate the iPhone outside of the iPhone itself (e.g. no desktop iPhone browser - even though there's Webkit/Safari - it's not completely the same).

Webkit's new Element Inspector is very, very, nice. Heavily inspired by Firebug, but with the trademark Apple UI touch. They have a CSS/Stylesheet browser (like Firebug) but they also include the default User Agent Stylesheet (which is immensely useful).

To allow the user to have control over page scaling they define a custom meta name/content that you can use:

<meta name='viewport' content='width=320'/>

The possible values for it are as follows:

  • width=320 (how wide to start the viewport at)
  • initial-scale=1 (default dimensions)
  • minimum/maximum-scale (limits user/auto scaling)
  • user-scalable=yes/no (Allows/prevents zooming via double-taps)

When the user zooms in on a portion of the page, you can adjust how large/small the font size should become with a custom CSS property:

-webkit-text-size-adjust: none
  • none (font size doesn't grow larger)
  • auto (the text grows larger)
  • 200%, the text grows even larger

They also publish their own, custom, event and window property to let the user know about the orientation to which the iPhone is rotated, it can be used like so:

window.onorientationchange = function(){
	// 0=portrait, 90=landscape counter clockwise,
	// -90=landscape clockwise, 180=upside down
	if ( window.orientation == 0 ) {
		// ...
	}
}

Some additional limitations that were discussed:

  • There is no concept of hovering (or, really, mouse move events in general - drag/drap isn't possible).
  • There are no multiple selects. All multiple selects are just treated as single selects.
  • There is no way to detect which type of connection that you're on (Edge vs. Wireless) and to serve content based upon it. The one catch is that you're able to do it with Quicktime (serving different types of movies) but not with normal web content.

Finally, they're very interested in getting a public sync schema for bookmarks - one that works across all browsers (easily synchronizing Firefox with Safari with iPhone Safari, etc.). Apparently they've contacted Mozilla in the past about this, but I'm not sure to what end this has led.

More information about developing for the iPhone can be found on Apple's web site: http://developer.apple.com/iphone/devcenter/

Tags: iphone, css, apple, mozilla, javascript, browsers

Eastview Apple Store

Today I took a little trip down the road to the grand opening of the Eastview Apple Store. Luckily, I was one of the first 1000 there so I got a snazzy nice T-Shirt, which is exciting. Below is an assortment of pictures borrowed from my Flickr set.








More pictures can be found in my Eastview Apple Store Flickr Set.

Tags: rochester, store, apple, victor, shopping, mall, eastview

Batch Document Conversion with OSX

Included in the new release of Apple OS X, Tiger, is a simple command-line application that can be used to convert one document format, to another. Think of it as Image Magick, only for text documents. This is an amazingly useful feature. You can convert to/from any number of these format: txt, html, rtf, rtfd, doc, wordml, or webarchive. Consider this: You have a text document, borrowed from the repository at Project Gutenberg, but you're friends refuse to read anything that isn't a Word doc - and you don't own Word. No problem, just run your text file through this program and you should have your desired result. Now, couple this with a quick install of Ghostscript and you'll be able to generate Postscript files (and, subsequently, PDF files and Images - which brings you full circle back to Image Magick) all from the command-line!

Tags: data, convert, text, documents, tiger, osx, apple

iTunes Podcast Support

I downloaded the new version of iTunes today which came packaged with podcast support. I was skeptical, at first, so I popped open my Odeo subscription list and dragged one of the channel RSS feeds onto iTunes, wondering what would happen. Sure enough, it recognized the RSS feed, figured out all the enclosed content, and proceeded to download the latest show from every channel I added. I'm very impressed.

Tags: music, apple, itunes, podcast

Apple Developers Conference 2005

It's time, once again, for the annual Apple Developers Conference - where a number of new products and technologies are announced to Apple Developers. This year's largest rumor is that Apple is switching manufacturers from IBM to Intel [NYT Reg Req]. Beyond that, however, there is still a lot of speculation. The show begins at 10am PST (1pm EST) and can be followed from the Mac Rumors Live web site.

Tags: technology, computers, apple

Feed Links in Safari

A good new feature in Safari 2.0 is the RSS reader, which I'm sure everyone has heard about by now. However, Apple feels compelled to change all feed URLs from their original http: to a new feed:, making it annoying to use that address elsewhere. The one area that is particularly frustrating is trying to subscribe to a web site using a bookmarklet (such as one provided by most of the major news aggregator services). So, in a nutshell, here are a bunch of modified bookmarklets that will work in Safari, handling the wonky feed URLs easily.

Drag the following link(s) your bookmark bar:

Note: The above links will still work in Firefox, IE, Opera, et. al.

Tags: apple, osx, safari, rss, feed, blogs, bookmarklet

Current Projects

jQuery JavaScript Library

jQuery

Comprehensive DOM, Event, Animation, and Ajax JavaScript Library.

Recent Projects

Pro JavaScript Techniques

JavaScript Book

The best techniques for professional JavaScript. Published by Apress.