Renaissance - XUL for Cocoa

This morning I was playing around with Renaissance which is a XML user interface language for building Mac OS X Cocoa applications. OK, actually it's a XUL for building applications that can target both Mac OS X and GNUStep, but I just call it cool. I've been checking out all the various XUL languages. Obviously, Mozilla XUL is the most well known, but it's far from the only one. I have a lot of ideas for cool stuff to do with a XUL and I'd been thinking a lot about writing one for Cocoa, fortunately I don't have to.

BTW, if you've been paying attention to the hype around Microsoft's Longhorn you've probably heard about XAML their new XUL language. Well, what XAML is really supposed to be is a technique for wiring together CLR types to be able to do whatever you want. Mac OS X of course, already has a very cool tool for wiring together Objects, it's called Interface Builder. Interface Builder generates .nib files that are simply serialized graphs of objects. Nib files are not XML(contrary to what Apple says), though they probably could be and I personally wish they were. I suspect there's a way to convert them, but I'm not sure how. Anyway, what Renaissance provides is basically a way of creating a nib file that is specified in XML. The major downside is that you lose the ability to use Interface Builder. That's unfortunate, but not a showstopper for my current experiments. I think the combination of PyObjC and Renaissance is going to be particularly fun.

Here's a simple Renaissance example, the code used with it is just standard Cocoa code like if you were using a Nib file.


<!DOCTYPE gsmarkup>
<gsmarkup>

<objects>

  <window title="Button Test" closable="no" frameAutosaveName="main" >

      <vbox>
	<button title="Click this button to quit &lt;disabled&gt;"
		enabled="no" 
		action="terminate:" />
	<button title="Click this button to quit &lt;enabled&gt;"
		action="terminate:" />
      </vbox>

  </window>

</objects>

</gsmarkup>

  

Posted by Kimbro Staken

Tuesday Dec 9, 2003 at 12:22 AM
Recommended Sites