iPad Web Apps hidden at Apples website
Today’s iPhone web apps are more than just iPhone-optimized websites. They almost look and feel like native 3rd party apps: You can “install” them and they’ll appear right along your other “regular” iPhone apps. After launching, they hide the browser’s address bar and other controls. They can be even used in offline mode, thanks to HTML5’s local storage.
It seems like a perfect “illusion”. Well… it’s an almost perfect illusion. The main difference between a native iPhone app and an iPhone web app is performance.
In december 2009, John Gruber posted an article on his Daring Fireball blog about Apple’s mysterious PastryKit Javascript Framework. It has never been officially released and you won’t find any information about it in Apple’s developer docs, but it’s already in heavy use.
Grab your iPhone and navigate to http://help.apple.com/iphone/3/mobile/ where you will find the official iPhone user manual as a web app that is build on top of PastryKit. The overall performance is impressive. On a 3GS device it’s hard to distinguish from a native iPhone app.
Here’s what Gruber wrote about it:
From WebKit’s perspective, everything in this iPhone User Guide is in a view that is exactly the size of the viewport, so there’s nothing to scroll. PastryKit handles all of what the user sees as scrollable content. This is how on the iPhone it provides for lower-friction scrolling than provided by MobileWebKit itself — PastryKit does its own scrolling math.
[…]
After installing the User Guide app to your home screen and launching it from there, there’s really very little to suggest that it isn’t a native iPhone application. No MobileSafari address bar at the top, no MobileSafari toolbar at the bottom. Scrolling is fast and has momentum. It even works perfectly offline, because the contents of the user guide are stored locally in a database using HTML5.
[…]
Here’s to hoping we haven’t heard the last of PastryKit, and that Apple continues work on making mobile WebKit an open alternative to the App Store.
You bet your ass, John.
When I played around with the iPad simulator in iPhone SDK 3.2 today, I logged into Apple’s developer portal. After trying to access the iPhone reference library docs, I was redirected to something that looks like this:
That’s right - the reference library as iPad web app.
It’s really amazing. This is as close to a native app as anything else I have seen yet, and way better than the iPhone user manual. And guess what it’s using under the hood:
It seems like iPad.js exends PastryKit by adding iPad specific features and classes like the SplitViewController or the DocumentViewController.
The big question remains: Will Apple ever give PastryKit in the hands of iPhone and iPad web developer or will they continue to keep it as “open secret”?
