views:

126

answers:

1

Hi,

I am trying to make an application on mac.i am trying to develop a user authentication module that uses the OS authorization dialog and use its functionality in my application. i have two questions regarding the mac development;

1) Is there a possibility to port the carbon applications to cocoa? (i don't have any concern with 64 bit, i want to develop in cocoa for simplicity and also because it doesn't go to low level programming.)

2) secondly, please tell me that i am using an intel based mini mac with OS 10.5, so, if there is no possibility of porting the carbon application to cocoa then can i develop on this intel based mini mac for Carbon?

Regards

+2  A: 
  1. Yes, but there's no automatic way to do it. If you write your Carbon application in C++, then you can use Objective-C++ to integrate Cocoa without having to change your existing classes too much, but you still have to do all of the heavy lifting.

  2. You can develop Carbon applications on OS X 10.5.

Note that Apple's "Getting started with Carbon" guide is now part of the legacy documentation library, and an increasing number of new features are only accessible through Cocoa APIs. I would strongly suggest using Cocoa for your new application, instead of starting with Carbon then porting.

Graham Lee
thanks graham for the reply. Can you please clarify one more thing to me. what do you suggest i should write cocoa program or carbon for my user authentication module. Can i write applicaiton in objective c for carbon? i dont want to use carbon , but a person suggested me that i should write carbon application for authorization purpose programs. rather than developing in cocoa. but i am much interested in developing cocoa application.
maddy
There is very little reason you should ever need Carbon. Don't listen to someone who tells you to use Carbon, but gives you no reason. Cocoa will do what you need it to do, but if it doesn't, go ahead and dig into the core libraries. The key is to always use the highest abstraction available.
Jonathan Sterling
It's true that you should avoid using high-level libraries in _privileged_ code, but that's true for Carbon, Cocoa or anything else. If your application needs to get root or admin, then factor it into an unprivileged user interface which calls out to a privileged helper tool, using Authorization Services. Use Cocoa in the UI. If you don't need special privileges, then don't worry about it and just use Cocoa in the UI :-).
Graham Lee
Cocoa uses Carbon all over the place, so don't listen to someone who tells you not to listen to someone who tells you to use Carbon but gives you no reason to believe that they have any idea what Carbon actually is.
Azeem.Butt
@NSD: Cocoa uses Carbon as SPI. Carbon API is not recommended where Cocoa API is available. Much Carbon API is not available to 64-bit processes. SPI is not recommended. Simple.
Graham Lee