Linked by Thom Holwerda on Thu 11th Jun 2009 22:14 UTC, submitted by johan
Mac OS X "Although OS X is relatively new, it is built on top of technology that has been under development since Steve Jobs founded NeXT in the mid '80s. Erik Buck, author of Cocoa Design Patterns, has been working with this platform for over two decades. His perspective on the development of Cocoa, from its beginnings in NeXTSTEP and its evolution through the OpenStep specification, provide some interesting insights."
Order by: Score:

Fantastic article
by tyrione on Fri 12th Jun 2009 01:34 UTC
tyrione
Member since:
2005-11-21

Eric M. Buck is an old school NeXT developer and glad to see getting published. Eric and Donald Yacktman go way back.

Coupling and Objective-C
by Hypnos on Fri 12th Jun 2009 04:33 UTC
Hypnos
Member since:
2008-11-19

Buck's discussion of coupling -- interdependencies between classes -- is pure gold.

This, to me, is Objective-C's greatest selling point: the whole point of objects is that they are black-boxes that behave according to a protocol. Since dispatch is built-in, you also get reflection virtually for free.

Typing, OTOH, is a poor substitute for a protocol. Achieving the same degree of genericity and reflection in C++ requires boost::any{_*} or class factories ..

The second greatest selling point is that the syntax to effect this messaging paradigm is so elegant; I agree with Buck about the "." accessors ...

Price to join the club
by fretinator on Fri 12th Jun 2009 14:34 UTC
fretinator
Member since:
2005-07-06

I've looked into creating an iPhone app (I have a classic Palm app I'd like to port), but the price of admission is too much for me. In order to do iPhone development I need an Intel Mac, which is going to cost me about $1000. Darn!

RE: Price to join the club
by roverrobot on Fri 12th Jun 2009 17:57 UTC in reply to "Price to join the club"
roverrobot Member since:
2006-07-23

I've looked into creating an iPhone app (I have a classic Palm app I'd like to port), but the price of admission is too much for me. In order to do iPhone development I need an Intel Mac, which is going to cost me about $1000. Darn!


Not if you mostly write OpenGL programs. If you need to write GUI apps, you can install Mac OS X in a virtual machine.

RE: Price to join the club
by tyrione on Fri 12th Jun 2009 18:06 UTC in reply to "Price to join the club"
tyrione Member since:
2005-11-21

I've looked into creating an iPhone app (I have a classic Palm app I'd like to port), but the price of admission is too much for me. In order to do iPhone development I need an Intel Mac, which is going to cost me about $1000. Darn!


Plan on not surpassing your investment to do sell an iPhone app? You have low business expectations and a poor business sense if you don't write down that investment.

RE[2]: Price to join the club
by fretinator on Fri 12th Jun 2009 18:55 UTC in reply to "RE: Price to join the club"
fretinator Member since:
2005-07-06

I'm not a business, this is just a hobby app I created on Palm (note-taking program, won't promote myself here by giving the name or URL). I never made any money on it, mostly broke even. I would just like to learn iPhone development, but there doesn't seem to be a cheap entry point, unlike in the Windows or Linux world. I am a professional developer during the day, but at night it's mostly for fun.

RE[3]: Price to join the club
by Chicken Blood on Fri 12th Jun 2009 19:49 UTC in reply to "RE[2]: Price to join the club"
Chicken Blood Member since:
2005-12-21

You can get a mac mini. You should be able to develop for iPhone no problem. If your investment works out, you should be able to upgrade in no time!

RE[4]: Price to join the club
by fretinator on Fri 12th Jun 2009 19:59 UTC in reply to "RE[3]: Price to join the club"
fretinator Member since:
2005-07-06

OK, sounds good. Now the last hurdle:

"Hey, honey, I need to buy another computer..."

RE[5]: Price to join the club
by tyrione on Fri 12th Jun 2009 22:09 UTC in reply to "RE[4]: Price to join the club"
tyrione Member since:
2005-11-21

OK, sounds good. Now the last hurdle:

"Hey, honey, I need to buy another computer..."


Find some habit that she spends on yearly that costs more than the mini and guilt her into it.

RE[6]: Price to join the club
by Tuishimi on Sat 13th Jun 2009 15:40 UTC in reply to "RE[5]: Price to join the club"
Tuishimi Member since:
2005-07-06

You dog! ;)

RE[7]: Price to join the club
by tyrione on Mon 15th Jun 2009 01:45 UTC in reply to "RE[6]: Price to join the club"
tyrione Member since:
2005-11-21

You dog! ;)


It used to work for me when I was married. Think back to all those glorious birthday presents your better half bought for colleagues you've never met or associate with, while on your dime.

Guilt can be a wonderful tool.

RE: Price to join the club
by fithisux on Sat 13th Jun 2009 14:45 UTC in reply to "Price to join the club"
fithisux Member since:
2006-01-22

Not anymore you can buy a 200$ hackintosh and run linux on it instead of hackintosh. Install EtoileOS and GNUStep and you can create nice OpenStep apps (I do not know if they are suitable for iPhone). There is also JIGS if you are hardcore Java developer.

RE[2]: Price to join the club
by Chicken Blood on Sat 13th Jun 2009 21:51 UTC in reply to "RE: Price to join the club"
Chicken Blood Member since:
2005-12-21

Not anymore you can buy a 200$ hackintosh and run linux on it instead of hackintosh. Install EtoileOS and GNUStep and you can create nice OpenStep apps (I do not know if they are suitable for iPhone). There is also JIGS if you are hardcore Java developer.


Not even close.

RE[2]: Price to join the club
by tyrione on Mon 15th Jun 2009 01:44 UTC in reply to "RE: Price to join the club"
tyrione Member since:
2005-11-21

Not anymore you can buy a 200$ hackintosh and run linux on it instead of hackintosh. Install EtoileOS and GNUStep and you can create nice OpenStep apps (I do not know if they are suitable for iPhone). There is also JIGS if you are hardcore Java developer.


GNUstep and EtoileOS are no where near ready to make one want to develop for it and OS X.

I'm sorry but the Smalltalk focus on EtoileOS is a waste of effort when it should first sync up Foundation and AppKit on par with at least 10.5.

Comment by Chicken Blood
by Chicken Blood on Fri 12th Jun 2009 20:10 UTC
Chicken Blood
Member since:
2005-12-21

In theory, Cocoa could have been written in C++ or Java. In practice, the message-oriented nature of Objective-C is what makes Cocoa feasible and so amazingly productive. Qt Software/Trolltech's Qt framework is the closest thing you will find to a C++ re-imagining of Cocoa. Qt uses C++ with several non-standard extensions implemented by an additional pre-processor. The pre-processor is necessary to enable Objective-C like expressiveness and defines a messaging like capability.


This is so true.
After developing in at least 5 GUI toolkits on various platforms in C++, I found Qt to be far and away the best choice for developing UI. The other toolkits required a lot more work to achieve simple things and lacked the runtime dynamism required for modern, adaptable user interfaces. Part of this was due to the toolkit design, most of it was due to the static nature of C and C++. Qt leverages its meta-object compiler to achieve useful constructs like runtime dispatch and reflection/introspecition.

When I started developing in Cocoa for Macs, I had that "a ha!" moment where I could see where a lot of the clever Qt constructs had been inspired. Some people deride Qt for it's preprocessor for reasons of language purity rather than pragmatic reasons. In my opinion, it's what makes it truly dynamic and suited for UI development.

Roughly equivalent concepts between Qt and Cocoa:

target/action - signals and slots.
delegate messages - signals and slots.
messages to "id" - Use of CONNECT() macro and emitting a signal to dispath a message.
Class - QMetaObject
NSObject - QObject
respondsToSelector: and performSelctor: - QMetaObject::invokeMethod()

Edited 2009-06-12 20:16 UTC