Re: Interface Builder popularity w/ Cocoa Developers
Re: Interface Builder popularity w/ Cocoa Developers
- Subject: Re: Interface Builder popularity w/ Cocoa Developers
- From: j o a r <email@hidden>
- Date: Mon, 16 Jun 2008 08:39:20 -0700
On Jun 16, 2008, at 2:04 AM, Jack Nutting wrote:
I'd like to point out another problem with the code-generation
approach, related to what Greg pointed out, about the
viability/usefulness of the generated code. With code-generation, if
you have some special tweak for your GUI that cannot be done with your
layout tool, it may be tempting to put those modifications into the
generated code (indeed, in some systems it may be the *only* option)
instead of in a separate file. Doing so puts you at the risk of
either making the generated code unparsible by the tool (if the tool
tries to read it back in), or more likely having your changes wiped
out the next time the tool generates the code. With the archived
object graph approach, any tweaking that cannot be done with IB is
done (can *only* be done) in external code that doesn't affect the
archive itself, just changes the graph in-memory after it is loaded,
so the archive and the tweaking are insulated from changes in each
other.
I think that Jack nails the main reason for why people would prefer
object archives over code generation as output from "designer" tools.
There is also another good reason to prefer object archives:
Localization.
While you can localize strings used in the UI in both cases, code
generation tools would typically not allow you to provide pixel
perfect sizing, alignment and ordering of UI widgets for different
locales.
Note that Apple isn't the only company using object archives -
Microsoft is also in the process of moving to using object archives
with their introduction of XAML as the backing store for WPF.
j o a r
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden