Sunday, February 19, 2006

Safari and Darwin

Not being an experienced web designer myself, I still know that testing web applications on the Safari browser is increasingly important. One might argue that it should not be necessary at all to test applications in browser. This would be true in the ideal world where every renderer adheres to and interpret the standards (html+css and javascript) in the same way. Since we do not live in an ideal world, the next best thing, in my opinion, would be sticking strictly to the standards while developing and use some type of glue to compensate, correct and mimics the behavior of the different browser. The IE7 project seem to be an example of such "glue".

At some point integration testing and testing from a users perspective in unavoidable so access to a Safari or Safari based browser is a must. The straight forward way of running Safari would be to get a Mac. The next best thing would be to run Mac OS X in a virtual machine e.g. VMWare or Qemu, however I acknowledge that Apple is not very keen on that. I know that there have been some successfully attempts to hack OS X to run on an ordinary Intel x86 PC but there attempts are not embraced by Apple.

Darwin and OpenDarwin which is the OS that powers Mac OS X is able to run on x86 hardware however as of writing this post, the binaries are not available for download (the links are broken). It is important to note that Darwin is just the OS and the GUI part (Cocoa, Aqua, Quartz) is not Open Source. Safari only runs on OS X, but the main component of Safari is WebKit which is OpenSource. WebKit consists of JavaScriptCore and WebCore which is a fork of KHTML, the rendering engine that powers the Konquorer browser. The WebKit team encourages people to port WebKit to Windows and other platforms but one hurdle to overcome seems to be Xcode which is required to build WebKit. Xcode is not Open Source so there you are... you still need a Mac.

In retrospect, digging into Darwin and OS X seems like a waste of time, but a good waste of time since along the way I learned more about things that I usually wouldn't read up on.