Developing for the Mac?


Recommended Posts

Great, thanks!

What about C++?  Is that used in OS X?

Mark

585803534[/snapback]

C++ can be used, but it's not nearly as native as Objective-C is to OS X. If I remember correctly, C++ will produce Carbon apps whereas Objective-C will produce Cocoa apps, even thought both can use Cocoa (e.g. Finder).

So it doesn't really matter if you use Cocoa or Carbon?  I read a while ago that Cocoa apps were slow and unstable.  I haven't seen anything like that with cocoa apps I use but just a question.

Thanks

Mark

585807595[/snapback]

Cocoa apps are the native type for OS X, so I don't understand why someone would say that (perhaps it was an old article you read?). Carbon apps can run on either OS 9 or OS X.

To say that Carbon isn't "OS X native" is a bit of a misleading unless these people are trying to say that programs like Finder are not "native". In some places Cocoa is falling back on Carbon calls (ie: Menus) so if Carbon application's aren't native, neither are ones written using Cocoa. They are different but one is not inferior to the other in and of itself. Much like operating systems the value of each is best determined by what you're trying to do. If you need a very dynamic GUI application fast then you'll probably want Cocoa, if you're concerned with speed and backward compatability with OS 9 users then you'll want Carbon. There's an article on O'reilly's Mac Developer Center about this so I won't bother making those same points. Carbon is not dead, it's not 'bad', and it's not out-dated: it's just got different strengths than Cocoa does.

There are four major languages used for OS X development these days:

  • C++
  • Objective C
  • Java
  • Objective C++

Python is getting a lot of attention lately and Apple finally poured a little love onto AppleScript Studio in 10.4 so you would do well to study either of those. The transition to OS X programming with Cocoa+Objective C will be easier if you already understand OOP concepts and SmallTalk. In 10.4 you would do well to study up on ERD diagrams: it can save you a lot of work. Most of the standard UNIX programming concepts work pretty well in OS X, if you have plans to write 64-bit applications then you should get comfortable with C/C++ programming and Pipes: there's really no other way to do it because Cocoa isn't 64-bit clean. If you know VB6 already then you can get a jump by ordering a copy of RealBASIC. I'm not sure why everyone seems to expect you to develop using Xcode now: powerplant & code warrior used to be perfectly fine

The three books I would most recommend are Sams? Cocoa Programming O'Reilly?s Learning Cocoa with Objective C and New Riders? Mac OS X programming.

The Sams book is an in-depth reference reference that covers not only how to use the IDE and APIs but also explains why Mac OS X is different from on other platoforms; for example, Cocoa force MVC patterns down your throat until you crap controller objects. I bought my copy when Project Builder was still the norm so (unless they've updated) be prepared to spend a few minutes mapping the old interface to the new while you work through examples.

The O'Reilly book is a little light on details. It's got a very accessible introduction to Core Foundation and Objective C and it introduces the debugging tools very early on but I found it to be more of a high-level overview of Mac OS X development rather than an in-depth guide to Cocoa.

I found ADC nearly useless as a 'getting started' resource. Once you're comfortable with how things work it's a respectable API reference and you can generally get the basics of unfamiliar/new APIs pretty quickly. That said, there are enough holes in the documentation that I don't think it's worth the $500+/year unless you take them up on offers like WWDC tickets or use of the testing facilities: the student membership has served me well enough.

To be honest I haven't finished the Carbon Book (Mac OS X Programming) but the parts I have read made it worth the $50 or so that I paid for it.

EDIT: I said "core foundation" when I meant foundation. Doh!

Edited by the evn show
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I bought one of these last year. I really hope I won't have to deal with this crap. My drive is in good condition at the moment.
    • Umm, read my answer again! If you have something to add or contribute, feel free. Otherwise my point was that you apparently dont want faster updates... so you want slower updates by process of elimination. If you have something to contribute, meaningful answers are better.
    • These features described above are good, but far from what developers will like the most. The main feature that developers will care and love the most it's called "Bring Your Own Models". It gives us the ability to connect to LOCAL AI models running on Ollama. The feature it's located on GitHub Copilot tab -> On the model picker where you can select "manage models" instead of paid models and then it will show you the "Bring your own models" window where you can now select Ollama and the endpoint of your local server. So if you have a beefy spec machine you can now use your own model 100% local inside Visual Studio 2026 18.7.0
    • Microsoft Teams is getting a controversial location tracking feature that users may hate by Usama Jawad Image generated with Microsoft Copilot Earlier this year, Microsoft planned to roll out a controversial location tracking feature in Teams, but following customer feedback, it decided to delay its release. The bad news is that the company has decided to launch it later this year, but it's based on roughly the same design that was shared earlier, which means that many users still have good reason to worry. Basically, Microsoft Places and Teams have received workplace check-ins via Wi-Fi. The idea is that if an employee arrives at the office and connects to their enterprise network, their profile status indicator will show them as being present in the office. For example, if you arrive at work, open Teams on your PC, and connect to the "Studio B" company Wi-Fi network, your Teams profile will indicate that you are present in "Studio B", as shown below: Microsoft says that this feature is basically a replacement for physical workplace check-in peripherals, it reduces the need to manually update your status, and it also enables co-workers to know that you're at work so that they can coordinate in-person meetings with you. IT admins can enable this workplace check-in capability at a tenant level, and users have the ability to control whether they want to enable it or not. Of course, all of that sounds great on paper, but naturally, many Teams customers may still have concerns, as they did before. This is because it enables your reporting manager and other members of the organization to track if you are at the office, when you arrive at the office, and where you are right now. This could be problematic for people who work in what they consider to be flexible work environments or hybrid setups, and this kind of location tracking could be considered an invasion of privacy. Microsoft has tried to alleviate some of these concerns by letting users know that they can manually set their location easily, which essentially overrides workplace check-in if they feel uncomfortable with it. However, that doesn't really solve the problem because your organization could enforce a workplace policy that mandates that this feature remains enabled. The Redmond tech giant has also assured users that this capability does not store historical data and is only a real-time indicator of location. Finally, it only generates a signal when you connect to a corporate network, which means that if you are working from home and connect your PC to your personal Wi-Fi, it won't broadcast your location to your employer; you will simply be shown as "Remote". Microsoft has encouraged IT admins to prepare for this change and begin informing users so they know what to expect once it begins rolling out later this year.
  • Recent Achievements

    • Very Popular
      AndrewSteel earned a badge
      Very Popular
    • Veteran
      Taliseian went up a rank
      Veteran
    • One Month Later
      Clizby earned a badge
      One Month Later
    • One Month Later
      Timaximus earned a badge
      One Month Later
    • Week One Done
      Timaximus earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      516
    2. 2
      +Edouard
      162
    3. 3
      PsYcHoKiLLa
      157
    4. 4
      Steven P.
      82
    5. 5
      ATLien_0
      81
  • Tell a friend

    Love Neowin? Tell a friend!