Making the move to the Mac

Mac development for Windows programmers

Combat fraud and increase customer satisfaction

As should be pretty clear from previous ramblings, I've about given up on Windows and am in the process of trying to reinvent myself as a Mac developer (I should perhaps say re-reinvent myself, since I worked with Macs back in the early days of the original 128K Mac, over 20 years ago).

Things are going pretty well so far, and if I could only resist the temptation to disassemble bits of the AppKit framework whenever I have an idle moment (see here for more on my strange personal habits) then I might actually have had a shareware application or two out by now.

This article is aimed at Windows developers who are considering making the move. The idea is to get you up to speed as quickly as possible with mainstream Mac development. Rather than discussing cross-platform programming techniques and toolkits (the subject of previous articles), I'm going to focus unashamedly on Cocoa and Objective-C. I'll assume only that you're coming at things from a RAD perspective: Delphi, WinForms on .NET, or maybe even "classic" Visual Basic. Think of this article as a "Dummmies Guide" to Mac programming if you like. All I'm trying to do here is cover the basics using terminology that should already be familiar to a Win32 RAD developer.

As with many development environments, the two most critical components in the Mac development equation are the programming language and the class library/libraries; we'll look briefly at these first.


Having bought out NeXT, Apple ended up with the OpenStep development system, hence the emphasis on Objective-C. For those who haven't used Obj-C before, it's basically a superset of C with object-oriented extensions. The syntax of the OOP extensions is rather esoteric for those unused to it. For example, to call a method taking three arguments in C++, we'd do this:

someObject->drawCircle (20.0, 27.0, 5.0);

To do a similar thing in Objective-C looks like this:

[someObject drawCircleAtX: 20.0 Y: 27.0 withRadius: 5.0];

Objective-C developers prefer to talk about sending a message to an object rather than calling a method. Notice that the name of the message (in this particular case, 'drawCircleAtX:Y:withRadius:') is arguably more self-explanatory than the C++ example because the meaning of each argument – preceded by a colon – is made clear; proponents claim that you end up with code that's more descriptive, but against this, you'll get much more verbose syntax.

Personally, I like Obj-C more than I did when I started using it, but in the gcc compiler the integration of Obj-C syntax leaves something to be desired. Leave off one of those all-important colons, for example, and you will get an unhelpful error message from a very confused parser. Put simply, part of the rationale behind the language syntax (aside from the language designer's fondness for Smalltalk) is to necessarily disambiguate the object-oriented extensions from the underlying C syntax. The brackets and colon symbols are compiler hints, if you will, which tell the thing whether it's looking at an Obj-C method call or a chunk of plain-vanilla C.

The whole thing is potentially more dynamic and reflective than many programming languages because, for example, an efficient mechanism exists for asking a particular object whether it handles some message before sending the message to the object.

SANS - Survey on application security programs

More from The Register

next story
Next Windows obsolescence panic is 450 days from … NOW!
The clock is ticking louder for Windows Server 2003 R2 users
Ubuntu 14.04 LTS: Great changes, but sssh don't mention the...
Why HELLO Amazon! You weren't here last time
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Ditch the sync, paddle in the Streem: Upstart offers syncless sharing
Upload, delete and carry on sharing afterwards?
Microsoft TIER SMEAR changes app prices whether devs ask or not
Some go up, some go down, Redmond goes silent
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
prev story


Mainstay ROI - Does application security pay?
In this whitepaper learn how you and your enterprise might benefit from better software security.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Top three mobile application threats
Learn about three of the top mobile application security threats facing businesses today and recommendations on how to mitigate the risk.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.