Colloquy, an insane IRC client for OS X
WebKit is so insanely easy to use that I'm amazed every OS X application doesn't do it somewhere, just for the fun of it. Maybe they do.
A new major feature of Colloquy 2 are the extensible conversation styles. Styles are simple OS X bundles wraped around a CSS file (at minimum) or a CSS file and a XSL file. Knowing this, the fact that Colloquy uses XML to store chat messages that come in over the network is no surprise to some. Pairing these three technologies gives us great flexibility when processing and displaying a message on screen.
The process of formatting a message follows these steps, start to finish. First, wrap the message in a simple XML envelope, encoding any special characters and representing IRC styling as XHTML. This XML envelope gets transformed with the curent style's XSL file (or a built-in default XSL file). The resulting transformation from the XSL on the XML should be XHTML that can then be rendered with help from the style's CSS file. Rendering is done via Apple's Safari (WebKit) engine -- so the possibilities are endless (evidenced by the built-in iChat like Bubbles style).
Colloquy is an IRC client for OS X that I just discovered this week, via an article posted on MacSlash. I've been looking for a decent Cocoa-based app as an alternative to my use of X-Chat Aqua, Conversation, and irssi. Having never heard of Colloquy before, I figured I'd check it out.
Colloquy is a Cocoa app, and the source is available. It's the first OS X IRC client I've played with yet that most resembles what I expect out of a modern Cocoa app. Conversation is right there, too, but I don't see any source (no offence to the author) and it doesn't yet support multiple servers or AppleScript (although those are on the planned features list).
This has lately lead me to consider how a browser canvas could be used as a sort of universal widget inside a native app... not at all unlike the way Colloquy uses it. Apple's WebKit encapsulation makes it just about dead simple to drop it into an app and integrate it. In fact, from a shallow glance at the docs for WebKit, it seems even simpler to use than some other GUI widgets in the Cocoa arsenal.
So... is this the start of more Cocoa apps embedding WebKit views, "just for the fun of it"? Who knows, but it really appeals to my propensity for mixing and matching different tech within the same project. I suppose it's a sort of sick addiction I've picked up from the Tower of Babel web development I've been doing for years, but it looks like fun to me!