On Jun 29, 2007, at 11:46 PM, Laurence Harris wrote:
There's been a good bit of discussion about Cocoa and Obj-C
recently, and how once you get over your aversion to Obj-C's weird
bracketed syntax that it's about an afternoon to pick up Obj-C.
This is consistent with what I've heard for years. What hasn't
been discussed much in the recent threads is that Cocoa, a
complete application framework, can*not* be learned in an
afternoon or any other short period of time. Cocoa takes time to
learn. Writing first-quality applications with it takes even longer.
It's absolutely true that Cocoa takes time to learn, but it's not
like it's *that* hard for an experienced software developer --
especially one already comfortable with object-oriented programming
-- to get started with.
Perhaps, but not being hard doesn't mean you figure it out instantly,
and more important, how long it takes me to get started with it is
not a significant issue. What matters is how long it takes me to
complete the conversion of my Carbon application to a Cocoa
application, which includes converting all of my windows and menus to
Cocoa nibs, redesigning and rewriting my code, and all the testing
and debugging any reasonable person would expect when you rewrite
massive amounts of code from the ground up. And as many people have
mentioned before, this is separate from the time and work needed to
enhance the product so I actually have an upgrade I can sell when
it's done.
I've been programming on the Mac since 1990, and on Cocoa and its
predecessors since 1997. Almost exactly 10 years ago, I bought a
used NeXT workstation and installed the OPENSTEP 4.2 "prelude to
Rhapsody" release that developers were sent so I could get up to
speed with the API, and what I found was that the OpenStep
framework and Interface Builder were to software development what
the Macintosh was to end-user computing.
I've never used IB to build serious Cocoa nibs, but if it's anything
like building Carbon nibs, it's a disaster. I expect the Cocoa side
has gotten a lot more love than the Carbon side, so I'm sure it's
much better. However, in Tiger it's still too stupid but do anything
besides say "Multiple Selection" when I select multiple objects.
You'd think an interface-building tool that's been around this long
could let you make four things wider at the same time (Resorcerer
could do that over 10 years ago), but alas, you'd be wrong. I can't
select a range of menu items with Shift-click, and Command-click
never lets you select multiple objects anywhere. Sorry, but anyone
who thinks IB is the end-all, be-all of tools has been brainwashed.
It definitely does some nice things, and it's certainly usable, but
it also has some glaring gaps in its usability, especially for a tool
that's been around as long as it has.
My skills with PowerPlant and C++ translated readily to the new
environment, and a lot of things were much more consistent and made
more sense under a single, unified API than they did under the
"layered" API that PowerPlant plus the Toolbox represented. (The
main revelations at the time for me were NSTableView and NSBrowser.)
Frankly, I think you're a lot sharper than the average developer, and
hence your experiences are probably not typical.
My point is that while it will be different from what you're used
to, Cocoa does have its own gestalt and if you follow some of the
modern learning materials -- such as the Hillegass book -- you'll
have an easy time getting up to speed with the way it does things,
and you'll be building real, Mac-quality applications with it in no
time.
Sorry, but I don't buy that. "Real" applications, as in applications
with a variety of features and windows don't just pop out in no time.
One of the problems with a lot of Cocoa applications is that
apparently their developers bought into this notion, so when they
actually needed to do some work to get something right they just
didn't bother. OTOH, there are some fabulous applications written in
Cocoa, but too many people aren't bothering to put in the time to
tweak what Cocoa gave them for free so they really *could* have a
great application. Those people are exceedingly lazy, the tweaks
require a lot of work to implement, or it's not obvious how to
implement them.
For example, the human interface of an application like Larry's
FileBuddy would be relatively straightforward to build in Cocoa
with Interface Builder -- including getting the little behaviors
correct.
This sounds like a great way to prototype an application. In practice
I suspect there would be the usual collection of edge cases and
things I do now that Cocoa doesn't give me by default that would slow
the work. Life and programming have long taught me that these kinds
of endeavors never go as smoothly as people would have others
believe, especially when undertaken by someone who is new to the
technology. Of course, maybe it would be something *you* could do in
a few days, but you've been using Cocoa for 10 years and in general
you're pretty sharp. But I suspect that even you couldn't build and
wire up 60+ windows from scratch in IB in a few days. ;-)
I suspect that your estimate assumes at least to some degree that the
current version of a Carbon application is well-structured, with data
and interface properly factored, and so on before converting it to
Cocoa. But that's not always the case with applications that have
been around a long time (or even some that are relatively new ;-), as
is the case with a lot of Carbon applications. There are going to be
applications out there in which the data is tied too closely to the
interface, which could end up requiring that much of the application
be redesigned to work well with Cocoa.
And finally, even if the picture you paint is an accurate one,
understand that a lot of Carbon developers have a tale to tell about
how this or that transition (usually carbonizing) wasn't nearly as
simple and painless as Apple made it out to be. So when someone comes
along and tells us that all we'll need to do is drag some UI elements
over to windows in Interface Builder and we'll be shipping an
application in no time, our natural response is, "Yeah, right. Heard
that before."
Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden