on 2/12/01 2:47 AM, jud spencer at [EMAIL PROTECTED] wrote:
> on 2/11/01 9:07 PM, David Leitch at [EMAIL PROTECTED] wrote:
>
>> The discussion is useful but I'd still appreciate some informed comment as
>> to whether there is much of a performance benefit from a Cocoa source rather
>> than a Carbonised source and if so why?
>
> It is unclear at this point what speed benefit you might derive. Any speed
> benefit would likely be as a result of Cocoa being close to the metal than
> Carbon.
It's the other way around. Increasingly many Cocoa classes are being
implemented through Carbon calls. Cocoa is nothing more than a sophisticated
and time-tested set of high-level application frameworks. Like MacApp, only
a lot better. It happens that you can write to the Cocoa frameworks using
either Objective-C or Java 2, but this isn't inherent in Cocoa. In the old
days, you could write to Cocoa using C++, too. Carbon, as a toolbox rather
than an application framework, is closer to the machine, and mostly written
in C these days.
But this should have no impact on execution speed, either way. If you use
Carbon, you're going to end up building all the functionality you need that
already exists in the Cocoa frameworks, anyway. There is some implicit
overhead in Cocoa due to the way Objective-C and Java work as languages, but
this should almost never have a negative effect on an application's
perceived responsiveness. In those few situations where it is important to
milk every ounce of speed out of the machine, you will always resort to
special techniques no matter which environment you're writing in.
>> Is it because of the greater speed of Objective C or the ability to take
>> advantage of some of OS X technologies over Carbonised applications.
>
> I don't think it is either. Objective C isn't some holy grail of
> programming. Carbon will be as rich as Apple makes it. I would think that
> over time, once it becomes apparent that the apps that make a Mac a Mac
> aren't going to be using Cocoa very extensively, that Apple will make sure
> that Carbon is a first class citizen.
Currently, Cocoa and Carbon don't seem to be fully coextensive with respect
to technologies. There are things you can do in either that you can't do in
the other. As far as I know, however, the plan is to converge their coverage
as quickly as possible. Currently, for example (or, at least, the last I
heard), you can create "drawers" easily in Cocoa but not in Carbon. On the
other hand, some ready-made user controls are available in Carbon but not in
Cocoa. Currently, for example, Cocoa users don't have automatic access to
the little round buttons used as Help buttons in dialogs. All this will
change rapidly, I think.
>> What would these choices mean in the real world to Entourage and Office
>> users and will be ever see a Cocoa version of Entourage?
>
> In the real world, we will do what we have to, to make sure that our Apps
> run with sufficient performance on X. If this means writing some stuff in
> more X specific ways we will. I have learned to never say never but I would
> think it very, very unlikely that we throw away what we have done to date
> and basically start from scratch on Cocoa. Even more unlikely that Word or
> Excel would.
True. The real, and overwhelming, advantage of Cocoa is its ease of
development. You don't have to delve into the basement-level detail that
Carbon development requires, if you don't want to. In Carbon, you have to
machine your own nuts and bolts, assemble the furnace, and construct the
mechanicals room before you can build the house. In Cocoa, you just pull the
mechanicals room off the shelve and put it in the house. At the same time,
you don't lose the ability to customize the mechanicals room to your heart's
content. Design a better furnace, if you like, and just replace the one that
came with the prefab mechanicals room. For these reasons, if you're starting
a new application from scratch (or if the code of your old application is so
skanky that it really needs to be replaced), Cocoa is the way to go.
-
Bill Cheeseman, Quechee, Vermont <mailto:[EMAIL PROTECTED]>
The AppleScript Sourcebook
<http://www.AppleScriptSourcebook.com/>
Vermont Recipes-A Cocoa Cookbook
<http://www.stepwise.com/Articles/VermontRecipes/>
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
To search the archives:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>