Mac OS Development
Yesterday, I took the first plunge into Mac OS X Development. Maybe its not the best of times to start on Mac OS X development with the upcoming Leopard release, but I was really intrigued.
So I decided to start with Applescript, which seems simple enough and yet seems powerful enough. The other alternative would be Objective C and Cocoa, which from I gather is MUCH MUCH more powerful, but also A LOT more complex. Hence, in order to continue the development of my scripts (see, I love you guys), I have decided to not devote all my energy into Mac OS X Development and learn Applescript instead of Objective C. (Ok, I am getting long-winded)
After starting on my first small Applescript Application, something that is supposed to generate an random number, I decided to take a look at widget development (after a little push from my friend). You know, the gadgets-like thing that Windows Vista ripped off the Mac OS. Yep, surprisingly it is actually made up of HTML, CSS and JavaScript. (Ok, I know this may not sound new to you experienced Apple Developers, but hey, I am a newbie!).

I found out (from the example given together with Xcode - The Mac Development Software or whatever you call it) that widget files (with the extension wdgt) are actually just bundles (meaning folders with a file extension) just like most Mac OS X apps. (that’s why most Mac applications only require you to drag a single “file” to your Applications folder to install it.) But anyway, let’s get back to widgets. Pretty much, it is made up of the following (forgive me if I bore you, PC user :P)
- a html file that will be the main file of the widget
- a CSS and/or Javascript file that may contain the styling and interaction codes. Of course they may be integrated into the HTML file just like any webpage.
- A background image in the png format
- An icon image in the png format
info.plist, the file that contains all the information about the widget that will be sent to Mac OS X. If the values in this file are wrong, pretty much you cannot run the widget. (as I found out)- And a
version.plistfile, which I haven’t looked into yet,
And why am I telling you guys all these? I have no idea. But if you are interested in widget development for Mac OS X, you should be encouraged to know that widget creation does not involve any other programming languages besides HTML, CSS and maybe a touch of Javascript for a little interactivity.
So right now, I am trying out a little widget development. And this is where I got to so far:

I know it is not much, but hey, one have to start somewhere right? I am currently looking into the Apple Developer Reference Library (which contains about 1GB worth of documentation and example codes for Apple Developers - as of the Oct 2007 release) to see how to make more advanced widgets.
I am also going to try to pick up Applescript programming, for it looks simple and yet powerful enough to develop a few small utilities. But of course, I would not totally abandon web development, but it looks like it will proceed at a much slower pace. (considering what limited time I have).
Oh, by the way, Apple Xcode Tools got a really powerful set of tools. I would advise even non-developers to look into it. After all, it is on your Mac OS X installation disc.
Well, just a little sharing of what I have found out and a little update in my life.
Till next time,
cheers