Re: Guidelines for NIB usage
Re: Guidelines for NIB usage
- Subject: Re: Guidelines for NIB usage
- From: Uli Kusterer <email@hidden>
- Date: Wed, 25 Jul 2007 20:01:09 +0200
On 25.07.2007, at 19:39, Kevin Hoffman wrote:
I was wondering if there was
some documentation or guidelines on when you should start nesting NIBs
or when you should keep everything in a single NIB, etc. What are the
guidelines for determining when you need to break your current NIB
into
multiple NIBs?
Well, a rough rule of thumb for me is generally "one NIB per
reusable module". That way, if I throw out or replace a certain class
and all its subordinate classes, I can take out its NIB as well.
Another reason to go with several NIBs is when you have stuff in a
NIB that is rarely used. By placing that stuff in a separate NIB and
lazily loading it, you can improve startup times because only a few
small windows get loaded.
And finally, I try to keep the annoyance level low. Since IB
doesn't remember window sizes properly, whenever I have to scroll in
a NIB, I'm at least tempted to move stuff out.
I'm leaving out obvious reasons like having a separate NIB for a
plugin or PrefPane so you can load or remove it along with the
plugin's code, or cases where you want to load several copies of a
group of objects (e.g. for a "predicate view" like it's used for
searches in the Finder).
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden