Jared White over at The Idea Basket has published an interview with Erik J. Barzeski, Founder and Editor-in-Chief of Cocoa Dev Central. In the interview they discuss the history of the Cocoa programming environment, the importance of Cocoa vs. Carbon within the Mac development community, and how vital Cocoa is to Apple and the Mac platform.
I still don’t like Cocoa apps, they don’t behave like Mac apps. The text views don’t behave the same and many Cocoa apps use file paths as file primitives so when you move a file the app loses track of it.
This is mostly Apple’s fault for not providing an easy way for Cocoa developers to write Mac apps. They’re more like OPENSTEP apps which look, but do not behave like Mac apps. It makes the OS schitzoid.
I’ve tried both Carbon and Cocoa programming. Carbon lib is not object oriented although it can be made OO. I dislike the Carbon event manager very much, and therefore appreciate the way Cocoa simplifies event handling.
I’d like to see a more general purpose XML parsing class in Cocoa rather than using NSDictionary. Also I have yet to find info on how to do HTTP programming in Cocoa. Basically I just want to be able to send out an HTTP request and manipulate the HTML output that gets sent back. Carbon can do this and fortunately I am able to mix Carbon function calls inside a Cocoa app.
Just some of my thoughts.
Hi strobe,
I can understand you point of view, especially the ‘schitzoid’ part
However the NeXT OS and it applications were consistent and very easy to use, everything made sense. Well, on Mac OS <=9 everything also made sense, but in a different way. It is hard to bring these both technologies together without compromises.
I suppose especially things like the use of Cocoa’s eventloop, delegates and NIB system causes what you mean by ‘do not behave like Mac apps’. Unfortunately you can’t change that without totally breaking Cocoa (of creating a new API). But Apple decided to use the standard OpenStep API instead, because it was well tested and has a clean design!
So if some behaviour changes in the future, then it’ll be the one of the Carbon/Mac apps instead of the Cocoa apps (IMO), since the latter is at least technically feasible.
BTW, I worked with the early Rhapsody and MacOS X Server releases, and you can be glad that they changed the GUI towards the former MacOS behaviour since then
greetings max
I wouldn’t call myself a Cocoa programmer, but I think something like this does what you want:
//Create url
NSURL *URL = [NSURL URLWithString:@”http://blabla.com“];
//Get date
NSData *urlContents = [URL resourceDataUsingCache:YES];
//Do whatever you want, save to file for example.
[urlContents writeToFile:[@”~/Documents/filename.html” stringByExpandingTildeInPath] atomically:YES]
The little bit of coding I have done on OSX have been great.