Monday, April 7th, 2008

iPhone WebKit Goodness: 3D CSS Transforms and ontouch events

Category: iPhone, JavaScript, Library, Mobile

Scripters and Coders 2008

Apple is secretive. I normally don’t mind so much, as they always come through on yet another cool Mac product. If I could know one thing though, it wouldn’t be when the next Macbook Pro is coming out, or when we will see the 3G iPhone. Instead, I wish I knew the attentions in the battle of “what can we develop with on the iPhone”.

We started out with only being able to use JavaScript, and folks like Joe Hewitt quickly mastered the restrictive tools such as meta viewport and co.

Then we got the final word of the iPhone SDK, and the Cocoa developers rejoiced as they went from being the cool kids to the “now you will pay me to help in the land grab yO”.

There was one shoutout to the WebKit lovers. We got ongesture* events.

Now we got a glimpse of new updates for the iPhone Ajaxians:

Safari 3.1 showed us CSS transforms, which are 2D. On the iPhone though, we can now do 3D transforms which means you can do true coverflow through the browser.

The other new thing I found are new touch screen events. We already knew about the ongesture* events, but now there are ontouch* events, and new DOM interfaces Touch, TouchList, and TouchEvent.

This is great progress.

The optimist in me thinks: Wow, WebKit is going to be a first class citizen and Apple will continue to open up more and more of the innards as JavaScript APIs.

The cynic in me thinks: Yeah, they will support it, kinda like how Java is supported on the Mac. One poor bugger has to do all of the work and make people care. In this case, when Apple starts making 30% on all of the native applications, what will their incentive be to help people develop apps using the Web?

The hope is that they realize that the Web is the long term winner, and that they want to win in that market too. Please, Mr. Jobs.

Posted by Dion Almaer at 12:01 am
8 Comments

++++-
4.1 rating from 22 votes

8 Comments »

Comments feed TrackBack URI

Argh, this is all wrong!
Why, when we are on the brink of getting standards compliant browsers, are people rejoicing when even more proprietary extensions are being added to browsers?
If you want to be doing 3D transformations, surely you should be writing a native app.

Comment by tub — April 7, 2008

I disagree… I’m all for standards but for the most part people won’t plan to be doing this stuff on full safari. This is for iPhone sites, proprietary stuff is fine there cuz there is only one browser there and probably only one browser that will be allowed at least for a while. So if you look at it that way then it isn’t really proprietary. As for iphone specific web development this is the “standard”. Now if only somebody would write a jQuery wrapper for all of this stuff (including css anims/transforms). I tried to start writing one last night but all I got was a headache.
I think Apple may truly support this stuff for a few reasons… WebKit is sort of a thing on its own w/ plenty of evangelists and it’s picking up speed (figuratively and literally). Second, I see a lot of this as a direct attack directed at Adobe. Steve bad-mouths Flash then gives us tools to that pretty much eliminate its advantage on the iPhone. Maybe they upset him w/ the whole CS4 not being 64bit hehe. I’m starting to think Adobe is headed into trouble. For the time being I will avoid Silverlight like the plague but as more people use Safari and other browsers pick up this stuff I might start to avoid Flash.

Comment by JonBad — April 7, 2008

The extensions are (mostly) not a bad idea, some of it could adopted to be standard. However, I’m not happy with the way apple “supports” their extensions.

For instance, for the iphone/ipod touch we got the onorientationchange event (after apple saw people wanted to detect that and wrote loops to do just that). That is fine, dandy in fact. However, it’s also broken! because:
works, but document.body.onorientationchange = function(){alert(‘here’)} doesn’t.

Dear Apple, _IF_ you and your webkit programmers are going to do extension, please, with suggar on top, do them PROPERLY or don’t do them at all.

Comment by pyalot — April 7, 2008

No need to speculate. Just attend the WWDC. The Javascript developments were revealed at the WWDC 2007. If you want more info, go to a non-secretive WWDC.

Comment by HG — April 7, 2008

@tub: Quite a lot of existing standards we have today come from standards orgs incorporating proprietary extensions, even from *gasp* Microsoft. Proprietary extensions aren’t the problem, implementation of them in lieu of standards is the problem. Like I said in the last post about IE8, when we demand standards compliance, we need to be clear that our goal is not strict adherence to standards per se but full interoperability. This is supposedly the design goal of all of the current-next gen browsers, but the strict adherence of the IE team to the CSS standard leaving opacity out of the mix has gotten more than a few standards-demanding developers pretty peeved. Why is that?

The issue is interoperability, first. And we should keep in mind that this site wouldn’t exist, and quite a lot of the advances in web dev over the last several years wouldn’t exist, were it not for proprietary extensions.

Comment by Trevor — April 7, 2008

@Trevor: agreed. I would also urge the community, however, to provide Graceful Degradationâ„¢ for devices that cannot replicate the touch interfaces offered by Apple’s devices.

Comment by jL — April 8, 2008

@jL: Of course. Those should be supplemental actions for any app that is intended for a broader audience than the touchscreen mobiles (as in, if you don’t have a mobile-specific UI).

Comment by Trevor — April 8, 2008

This will prove useful as the world goes touch srceen

Comment by Aphrodisiac — July 31, 2008

Leave a comment

You must be logged in to post a comment.