Re: Carbon vs Cocoa arguments
Re: Carbon vs Cocoa arguments
- Subject: Re: Carbon vs Cocoa arguments
- From: Izidor Jerebic <email@hidden>
- Date: Thu, 10 Oct 2002 10:48:07 +0200
On Tuesday, Oct 8, 2002, at 23:48 Europe/Ljubljana, Scott Corliss wrote:
This actually goes against what you're trying to prove, but might give
you a little different viewpoint on Carbon.
http://www.unsanity.org/archives/000024.php
On Tuesday, October 8, 2002, at 04:26 PM, Benjamin Frere wrote:
Where can i found documentation that compares Carbon and Cocoa up to
the smallest level in the system
integration... I want to prove him that Cocoa is better with
something else that my feelings.
_______________________________________________
It naturally depends on what you do, but for developing a normal
application with GUI, there is simply no way Carbon can be compared to
Cocoa. It is much easier and faster to develop such an application in
Cocoa with less bugs. Just compare source examples from Apple for
somehow similar apps - TextEdit in Cocoa and SimpleText in Carbon. And
then see the Sketch in Cocoa for example of drawing app. If these
examples won't convince you, well, there's Apple's recommendation to
develop new apps in Cocoa, which they adhere to (everything new is
Cocoa).
Why is this so?
Cocoa is a real object-oriented platform (with all the benefits of such
a thing) with concepts (patterns) which are useful to you even if you
just learn them and use them in a different environment (e.g. C++ and
MS Windows). Carbon is a C environment with all the weaknesses and
strengths of such procedural approach (it does try to emulate OO with
opaque types, but that's just that - emulation which does get in a way
and causes code to be not as legible and bug-free as with real OO
environment). You can also use most of Carbon API in Cocoa app, such as
QuickTime (and encapsulate it in OO if you like, so it can fit
naturally), but not reverse (Cocoa in Carbon app does not make much
sense, because of concept mismatch).
And there is also a catch - it is a big problem if your developers
cannot grasp object-oriented development! In this case (speaking from
experiences) it is better to use procedural approach such as C and
Carbon, because in OO environment they will use procedural approach
anyway (despite the code being in OO language), but the mismatch will
show as a very bad code.
So developers should at least try to do some examples, go through
tutorial, and then if they cannot see any positive side of going with
Cocoa, leave them to do it the old way.
izidor
P.S. A little bit of history - the great OO bible Design Patterns by a
gang of four was an offspring of a project, commisioned by a bank,
which investigated how could a software be migrated from NeXT platform
(predecessor of Cocoa) to some other, in case of vendor problems. They
tried to distill an essence of NeXT for use in C++. The byproduct was a
very successful book - so you see, knowing Cocoa can be useful for C++
programmers, too (but if they do know it, they would not want to be C++
programmers for long :-)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.