Re: Minimal document-based app
Re: Minimal document-based app
- Subject: Re: Minimal document-based app
- From: Fritz Anderson <email@hidden>
- Date: Tue, 01 May 2012 09:50:16 -0500
On 1 May 2012, at 2:28 AM, ecir hana wrote:
> If nothing else, it would explain to me how things works, 20 lines of
> code would help me better than 20 documentation pages. There tutorials
> above certainly did the explaining very well.
Every few months, a beginner comes who wants to skip NIBs to "see how it works." Please understand why experienced developers advise against this, even though they understand the impulse.
NIBs _are_ how it works. They don't contain or generate code. They don't contain or generate scripts. They don't exercise much of the API you're trying to use. They contain archived objects and their connections.
Their effects can (often) be mimicked in code, but by the same token, Objective-C can be mimicked in assembly. It is useful to understand a bit of assembly when you use a high-level language, but except in special circumstances, nobody advocates writing programs in it. And in the case of compiling Objective-C, at least the translation passes (notionally) through assembly code.
Similarly, it is useful to understand how NIBs are reconstituted into objects, but one must understand that the underlying mechanism is reconstitution, not executing code that simulates reconstitution. Unlike the translation of a high-level language, there is no executable layer through which reconstitution passes. (At least in the sense you mean.)
NOTE: On iOS, it is frequently useful to build object hierarchies in code, but the Cocoa Touch API is designed to make that easy. Even there, most designs take the form of reconstituting objects from NIBs.
— F
_______________________________________________
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