Sunday, March 09, 2008

The iPhone SDK

I don't own an iPhone and since I'm in Canada I can't even buy an iPhone from Apple even if I wanted to, but that hasn't tempered my enthusiasm for the new iPhone SDK.  Like so many thousands of others I downloaded the SDK as soon it was available, installed it, and then started coding away.  I'm sure more experienced Cocoa developers were able to quickly bang out something cool, but not me.  It took me a bit longer to get the mandatory "Hello World" running, but nonetheless, my previous Objective-C/Cocoa investigations definitely came in handy.  I think one of my mistakes was thinking that the videos Apple put up would help me.  IMHO, don't bother.  Go right for the developer documentation in XCode instead.

Alas, I can't really say that much about the SDK.  I clicked through one of those license agreements and I'm sure that there's something in there that forbids me from revealing anything too juicy.  But I think it suffices to say that I'm still enthusiastic about where this is going.  I think the iPhone (even though I don't have one yet) is a great bit of technology and once in the hands of people in the enterprise who suffer at the other craptaculous mobile devices out there, they'll definitely start demanding stuff.  And that's where I fit in.  I'm excited to see how this all evolves and hope I'm ahead of the curve at least momentarily. ;-)

Sunday, March 02, 2008

Javascripting with ExtJS

Back in the early days of my work in Java I adopted the typical Java developer's bias against Javascript. Whenever someone would mention Javascript I would cringe. Afterall, why would I choose Javascript when I had Java? But I always felt I was missing something.

So last year I decided to do something about it and integrated the Prototype Javascript library into my Struts application.  I quickly learned that I didn't hate Javascript but hated the inconsistencies in the browser DOMs and learned to properly direct my hate  (Internet Explorer, I'm looking at you!).  

Despite a couple hiccups, that project was really quite enlightening and I went on to expand my knowledge with a great series of videos at the YUI Theatre. Douglas Crockford has three series of videos that I highly recommend to anyone wanting to learn JS. He goes over the history of Javascript and plainly spells out Javascript's problems and strengths (e.g., it supports functions as first class objects with support for closure, hashes are all powerful, prototypical inheritance is different than classical inheritance but is quite workable, and be careful of the default global namespace).

So now armed with a proper understanding of the language, I started a building new web application in January and realized that there were requirement that would be best served by AJAX and some nice browser widgets.  In enters ExtJS. After a couple weeks writing a spike through Struts and ExtJS (still using Prototype underneath), I made the choice to adopt ExtJS as a the library for my application's user interface.  Two months later, I'm more than satisfied with the choice.  So are my users.  

In the end, I've shed a bias I really shouldn't have been harbouring, I embraced a "new" language and added the ability to better server my users.  I still won't choose Javascript for a lot of things but I'm much happier knowing that I can properly apply it as part of an overall solution.