Re: wasting space?
Re: wasting space?
- Subject: Re: wasting space?
- From: "I. Savant" <email@hidden>
- Date: Sun, 5 Oct 2008 13:05:37 -0400
On Oct 5, 2008, at 11:01 AM, Michael Ash wrote:
Pardon me? Cocoa did perfectly fine for over a decade having this be
the *only* way to do things. Bindings only came about in 10.3,
practically yesterday. And some of us still aren't too convinced about
their ultimate utility either. In any case, directly manipulating the
user interface, while perhaps not as shiny and new as bindings, is
*definitely* "Cocoa-like".
I agree with you 50% ... with respect to Quincy, this is
questionable advice. The Target/Action mechanism in many cases is
superior to the Key/Value Observation mechanism. The opposite is also
true in many other cases. We need to be careful not to imply one
approach is generally superior to the other when giving advice of this
nature.
If you're new to Cocoa, I actually recommend learning to do
everything with the target/action mechanism (not to mention
notifications) before even considering KVC/KVO/Bindings. It makes
understanding the 'WTFs' of Bindings so much easier. Not necessarily
'easy' but definitely 'much easier'.
I'll even assert that it's unlikely you'll be able to complete a
moderate-to-complicated application without running into things that
the bindings mechanism doesn't magically solve. There are lots of
things that it most definitely does not. At least this is true for the
present. Who knows what direction Apple is headed over the next few
years.
I also think it's necessary to point out that all of the button-
clicking, menu-invoking (via keyboard), etc. is done by target/action,
even if all your collection management and editing actions are done
using Cocoa Bindings and even Core Data, when your user says "save",
it's the target/action mechanism that handles it. All that dragging
and connecting in Interface Builder is setting up this very thing.
As to the other 50% of this sentiment, I don't understand the "some
of us still aren't too convinced about their ultimate utility"
comment. By "ultimate utility", I take it that you mean some view the
Bindings mechanism as trivial and not particularly useful. If I'm
wrong, please correct, but if I'm right, I strongly disagree. Bindings
was, by popular belief, of limited utility in 10.3 (mostly because of
weaknesses/inflexibilities in the controller layer with a handful of
unsavory work-arounds), but the underlying technologies (KVC/KVO) have
been a powerful, flexible, modern addition to the Cocoa frameworks and
continue to grow with each new OS release. We'll call 10.4's
NSTreeController a ... valiant first-draft. :-)
Of course all this is my opinion, not canon, so no religious wars
are intended. :-) In fact, though I have a good grasp on
"Bindings" (as an umbrella term for KVC/KVO as well), I still struggle
to use them creatively (that is, beyond the typical documentation and
tutorial examples). I'm only starting to grasp the true potential of
the technology (and dreaming of a few custom NSObjectController
subclasses to handle some special cases I'm faced with). So there's my
disclaimer and your license to label me wrong. :-)
--
I.S.
_______________________________________________
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