Cocoa & Carbon

Discussion in 'General Mac Discussion' started by Freg3000, Feb 28, 2003.

  1. Freg3000 macrumors 68000

    Freg3000

    Joined:
    Sep 22, 2002
    Location:
    New York
    #1
    How do I know whether an App is Cocoa or Carbon? Is there a list somewhere on my computer that lists what they are? Or do I just have to know? Thanks.
     
  2. MacsRgr8 macrumors 604

    MacsRgr8

    Joined:
    Sep 8, 2002
    Location:
    The Netherlands
    #2
    Xray is an app that can help you.
    You can get it here
     
  3. shadowfax macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #3
    you can tell based on error messages and open/save dialogues and stuff, for one. like, if a save dialog pops up as a whole new window, like photoshop, it's carbon. in a cocoa app like iChat or Chimera or MS word, on the other hand, will have save etc dialog boxes slide down from the titlebar of the window they apply to.

    there is an app to check this too; i have it somewhere. i am looking for it madly; if i find it, i'll tell you.
     
  4. MacsRgr8 macrumors 604

    MacsRgr8

    Joined:
    Sep 8, 2002
    Location:
    The Netherlands
    #4
    Indeed Shadowfax.

    Here's an example. Every cocoa app can access the font management tool built in OS X, by typing COMMAND-T.
    If it can't, then it's a carbon app.

    Here, take a look:
     

    Attached Files:

  5. shadowfax macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #5
    is MS Word, then, a cocoa app or not? i don't think it has access to fonts that way, but it has the dropdown dialog boxes. Word may just be a weird exception, as MS has their own way of doing stuff like that from Office already, probably :rolleyes:

    on a random note, Word pisses me off a lot because cmd-shift-s doesn't "save as..." there isn't a save as shortcut. what were they smoking?
     
  6. kishba macrumors 6502a

    kishba

    Joined:
    Dec 11, 2001
    Location:
    Michigan
    #6
    programmers can combine cocoa and carbon i believe.

    i read an article that interviewed the head of the mac business unit sometime ago and he tried to explain why m$ felt using only parts of cocoa and parts of carbon was a good idea (i think it had to do with development time, among other things)
     
  7. MacsRgr8 macrumors 604

    MacsRgr8

    Joined:
    Sep 8, 2002
    Location:
    The Netherlands
    #7
    Both not.
    M$ indeed wants to do things their own way. It looks most like a carbon app, but they made some changes to the standard carbon, for some idiotic rerason. You can tell this by the simple fact that you can't add languages to the apps manually, one of the great things of OS X.
    And it sure ain't cocoa... no way.
    Maybe Office v X1... aka Apple-make-a-better-office-than-M$.
     
  8. Freg3000 thread starter macrumors 68000

    Freg3000

    Joined:
    Sep 22, 2002
    Location:
    New York
    #8
    Cool. Thanks everyone. Xray is a cool App, and works very well. The reason I wanted to know was because I had just discovered something really amazing-mouse gestures.

    If you don't what mouse gestures are, I would recommend downloading Cocoa Gestures (http://versiontracker.com/moreinfo.fcgi?id=18404&db=mac) to try them out. They are basically like hot keys for the mouse. They are very intuitive and easy to use. They only work in Cocoa Apps, so that?s why I wanted to find out how to tell.

    Thanks.
     
  9. shadowfax macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #9
    you're right, methinks. It surprises me people don't use cocoa more. it seems much more convenient after you do port you app, as so much (esp for a word processor) is already done for you. photoshop seems OK as a carbon app, but man, word could really benefit from cocoa.
     
  10. macktheknife macrumors 6502a

    macktheknife

    Joined:
    Jan 24, 2002
    #10
    Other than some Apple and shareware apps, there are actually very few Cocoa applications. Most major applications with a Windows counterpart (i.e. Office, Photoshop, Dreamweaver, etc.) are Carbon applications. It cost the companies quite some time already to create a Mac version AND carbonize it. To rewrite a major application like Photoshop with Cocoa would have simply been too much spent for too little gained.
     
  11. MacsRgr8 macrumors 604

    MacsRgr8

    Joined:
    Sep 8, 2002
    Location:
    The Netherlands
    #11
    I think everybody agrees that cocoa is the way to go. This is the environment which uses OS X to its potential.
    But have you guys ever heard of Rhapsody with blue, yellow and red box?
    To cut the story short, yellow box was "native Rhapsody" = cocoa for OS X, and blue box was "Mac OS 8 emulation" = classic for OS X (hence trueBLUE environment). Red box was 'classic windows emulation" on x86.
    But Rhapsody would never sell as no (big) developer (Adobe, M$) would want to build their new apps from scratch!
    So Steve came with carbon: the environment for developers to just remake their apps (about 10%) to make it executable on Mac OS X.
    I think that carbon is like a "transition" period for new apps (remember FAT: 68k and PPC?)
     
  12. benixau macrumors 65816

    benixau

    Joined:
    Oct 9, 2002
    Location:
    Sydney, Australia
    #12
    save as ... under a mac has always been F12.
     
  13. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #13
    You can access sheets (sliding, attached dialogs) from Carbon. In fact, it was one of the first things I learned to do in Mac OS X GUI programming.

    MS uses Carbon, btw. It's really just an adjustment to their 2001 code which uses Nib files instead of resource files.

    I'd still like to know what Cocoa can give you that Carbon can't (other than a headache when porting C++.)

    Convince me that I'm going to port something in C++ (used by 70+ percent of applications) to Mac OS X and Objective-C (with the Cocoa frameworks), which is used by fewer than 2 percent of applications since the late 1980s.
     
  14. vniow macrumors G4

    Joined:
    Jul 18, 2002
    Location:
    I accidentally my whole location.
    #14
    a ? from a non-programmer type person

    What's the difference between Cocoa and Carbon?
     
  15. sparkleytone macrumors 68020

    sparkleytone

    Joined:
    Oct 28, 2001
    Location:
    Greensboro, NC
    #15
    so safari isnt cocoa?

    chimera isnt cocoa?

    answer: they are both cocoa. never depend on a key shortcut to tell you anything about a program.
     
  16. shadowfax macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #16
    oh. thanks. it just doesn't say that by the option on the menu; you know, like on the right side on the file menu it shows save is cmd-s... why don't they list save as as F12?:confused: oh well. thanks for telling me, i'll use that a lot, as going from keyboard to mouse to open the save as dialogue is no fun on touchpad laptops.

    thanks for setting me straight. I don't know much about either framework, honestly. i thought i'd read something somewhere about the slide-down menus being a cocoa advantage. but you can't believe everything you read, huh? lol.

    so does carbon have that native antialiasing on fonts and all the automatically (fairly so at least) available spell checking and easy language switching options? that seems like an advantage to me, but carbon ?may? have this too. :confused:
     
  17. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #17
    Indeed, since 10.2.3, Carbon has been able to anti-alias text. I believe most services (spell check, etc.) were available to Carbon in 10.1.5 and 10.2.

    Switching languages is available to any application which uses Nibs, and has been localised (additional language inside its bundle.) Someone has to provide all those language details. :) It's just that those Carbon applications which are warmed-over Mac OS 9.x versions using resources cannot do this.

    Carbon is not object-oriented, which generally means there's more work to do and more chance of difficult-to-find errors. However, Apple did a wonderful thing and made it much easier to use than the original toolbox, as well as more efficient. Carbon applications are also created by using MetroWerks CodeWarrior and their framework PowerPlant or Apple's MacApp, both of which utilitise C++ (no more Pascal!)

    Cocoa is object-oriented and can be used with Objective-C (a beautiful language) or Java (Objective-C is a beautiful language.) For Mac OS X-only applications, it's the real choice. For cross-platform applications, well, it's ummmm, not the best choice.
     
  18. shadowfax macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #18
    This was the best! i laughed out loud, even though i don't know too much about objective-C (C# right?). java fails to seem useful to me for non-internet type apps. but then again, i am not very knowledgeable with java either.

    thanks for the info:D
     
  19. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #19
  20. Fukui macrumors 68000

    Fukui

    Joined:
    Jul 19, 2002
    #20
    Objective C++...Ever tried it?

    Also, Model View Controller design makes sure that the back-end (Model) of the application can be written for multiple platforms while the controller mediates between the UI (View) and the model. IMHO, cocoa would be a much faster way to desgn cross-platform applications becasue the "business logic" is completely separate from the Interface...

    Cocoa also delivers so many many things for free compared to carbon that makes debuging, developing ect, way faster. You know Java? Its actually similar to Objective C (Not Becessarily Cocoa API) which is similar to C# because MS "copied" Java....

    Anyways, there are alot of ways to easily wrap Command-Line apps into cocoa (almost all written in C/C++), and many other apps...

    See the thing is, Cocoa something like 15 years old (from NeXT), and even now its still ahead of its time...

    BTW, only mach-0 carbon apps can utilize cocoa api's...Carbon is tied to PPC as well, cocoa is not.
     
  21. Dreamagi macrumors newbie

    Joined:
    Feb 28, 2003
    #21
    Hey y'all, I'm a Windows user considering a switch to the Mac platform, however, the thiong holding me back is that I am and computer-science student. Yeah, you know Visual C, Visual Basic, Java (SE/ME), that kinda thing.

    I am very interested in developing programs for the Mac platform, but still kinda confused about the languages available. Java for sure is portable, but what about my VB applications? Or what actually is Cocoa and Carbon that I have been reading up on lately? Could anyone fill me in?

    (I was reading a Cocoa book, and it seemed quite a lot like Visual Basic... is it??)
     
  22. shadowfax macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #22
    i can't tell you much about programming, but i can tell you OS X uses a fairly new GCC, which compiles all of the aforementioned languages, i am pretty sure. OS X also comes with its own IDE for building projects and interfaces, though you can use other compilers, of course. i'll leave the rest to the smart people.
     
  23. Fukui macrumors 68000

    Fukui

    Joined:
    Jul 19, 2002
    #23
    Well, Languages that are available are: C , C++, Objective C (Similar to Java...sort of). Cocoa, is just a set of Api's that are very object oriented and can be accessed using Java, C, C++ and Objective C, with the C-based languages able to be mixed if neccesary. You can also access the Cocoa Api's from Java.

    Carbon is another set of api's that are carried from classic Mac OS ported to run on top of BSD, and IMO are on the way out...they are not object oriented.

    You can of course program pure java, and command-line BSD/Linux compatible apps in C/C++/Obj-C.

    Apples Developer tools are free, and can be downloaded any time, and come with the OS X on a different CD.

    Also, RealBasic can let your program in Basic on OS X but is limited to carbon, and a lot of users have a prejudice against apps written in this language...

    Visual Basic is I think very much like the dev tools (in appearance:drag and drop), MS modeled it after NeXT interface builder (where OS X came from), so it is sort of similar...

    Visual C programs of course can be ported to cocoa, but that all depends on how much MS specfic code you are using...
     
  24. chewbaccapits macrumors 6502a

    chewbaccapits

    Joined:
    Jul 10, 2001
    Location:
    Torrance, Californizzel
    #24
    So...In laymens terms....What are the benefits of a cocoa app vs. one written in carbon...BTW, ...Saying cocoa is kinda fun..
     
  25. shadowfax macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #25
    do you want Carbon dioxide or Cocoa puffs?
    personally, i am cuckoo for cocoa puffs!

    *note: this is my layman rendition.
     

Share This Page