To read all comments associated with this story, please click here.
With regard to the article, Interface Builder's way of representing GUIs as a serialized object is certainaly interesting, and would definitely improve startup speed. That said, however, I don't think the time to initialise the GUI is the real bottle neck in most applications: it's the virtual machine (if any), followed by I/O performed by the business logic.
I don't exactly undestand where the article's author found this idea of faster starttime... while it's perhaps possible, the objects *are* initialized anyway, just from their serialization format rather than by hand, but I don't think it's _that_ faster. And more importantly, that's frankly not the point of Interface Builder !
The real interest of the IB's approach -- manipulating objects directly -- is that, along with your objects and their properties, ALL their connections to other objects are saved !
As it can be any objects (even non-gui) you basically can do most of your work in IB instead of doing it by hand. That's what is interesting in IB -- you only need to write and concentrate on the "real", useful code.
Plus, you can write your own palettes of custom objects (which can be widgets or non-graphical objects) and easily connect them...
I should remind people that a similar tool to IB exists in the GNUstep project, named GORM (btw, read this post of the GORM's maintener : http://heronsperch.blogspot.com/ ^_^ ) . For a demonstration of GORM+custom palettes with GNUstep, check http://www.xdev.org/gnustep/demo.html
The improved start-up time is NOT just from the object serialization but the fact that the entire GUI is serialized. All of the layout code, connections, bindings, etc. are serialized. This is where the performance boost comes in. I have tested it against hand writing GUI code in Objective-C for Cocoa. The start up times are quite different.
BTW, their is a difference in the initialization times between initWithCoder and init... initWithCoder is generally faster.
Why hate GUI builders? It's quite simple... resizability.
For years, GUI Builders have easily been able to generate statically positioned forms quite well, but customer's don't want that.
Dynamic support has been absolutely painful for years as well, and that's why there's so much going against GUI builders. Visual Studio 2005 has some small improvements in this regard, and Matisse does as well, but neither are good enough, and the maturity is just not there.
Delphi has supported resizeability for at least five years now using its system of anchors. NetBeans has supported resizability for an even longer time, although only with Matisse has it become easy to work with. IntelliJ has supported resizability in its GUI designer for quite some time. Qt has supported resizability since Designer came out with version 3, which was around 2001 I think, and before that Glade existed.
The only aspect of "resizability" that GUI designers have traditionally failed on is font-sizes, and resizing forms dynamically based on font sizes. However that's only on Windows: all the Java IDEs have supported that from the beginning, and so have Glade and Qt Designer. I think even Delphi 2005 supports that now.
I don't know about Visual Basic or VC++, but GUI designers have been working well for quite some time. And while the font-issue is a weakness, it is a weakness that didn't matter until this year, when it became feasible - thanks to large, affordable, flat-screen displays - to run your desktop at a high resolution. For the most part, I would say the maturity is most definitely there, it's just a matter of developers using these features.




Member since:
2005-07-06
I'm always amazed by people, like the author, who criticise GUI builders. After all, a GUI is just a nested series of configuration options (width, height, position, label, font etc.) and code is an astonishingly bad way to represent such data. A structured document language like XML is far better (see SwiXML for a Java example) and easier to read and edit.
But then there's the issue of manually entering XML, which is quite time-consuming due to XML's verbosity (which is precisely it's advantage when it comes to reading in the file). The obvious solution for any hacker is to write a program for themselves that make entering that data easier. Hence, GUI builders, which not only let you enter the data quickly, but also let you preview the results.
Score!
Frankly, given that the average GUI spends most clock-cycles in a busy-wait loop, I can't see the point of hand-crafted optimsiations. That should be reserved for the business logic surely.
With regard to the article, Interface Builder's way of representing GUIs as a serialized object is certainaly interesting, and would definitely improve startup speed. That said, however, I don't think the time to initialise the GUI is the real bottle neck in most applications: it's the virtual machine (if any), followed by I/O performed by the business logic.
With regard to Java, the GUI builder in Netbeans 5 is very impressive, and quite easy to use. Likewise, things like SwiXML and Thinlet take the pain out of GUI development, and the upcoming official release of Qt for Java should make things easier still (not to mention faster). I'm not sure Cocoa is the be-all and end-all here; in fact, I think Objective-C is a bit of a hamstring for Apple: for most modern developers - reared on C++ and Java - it's a very odd looking language.