A couple semesters ago, I took a college Visual Basic class. It wasn’t bad – your typical programming course, and I’ve had my fair share of those. I liked VB.Net, because it was easy, and had a nice, clean object-oriented syntax. Basically, you type stuff to the effect of “window.close”, and these simple statements can control quite a bit. Granted, comparing VB to Obj-C isn’t exactly the right idea, but the development environments that they use are what truly counts. If you’re using Visual Studio with VB, it’s pretty easy to get started laying out the form, and sending things back and forth between the objects on-screen. On the other hand, getting up-and-going with Cocoa can take a bit of a leap. I read a number of articles when I started out, and they were all mentioning, in some way or another, that Cocoa has a bit of a steep learning curve. Oftentimes, you must understand a lot more to do the same that VB would do.
So why would we even bother learning it then? If it’s so hard, what are the benefits of Cocoa? Well, after playing with VB, I realized – this is basically just a simple document-writing app language. It isn’t going to program any big games or intensive stuff. Cocoa, on the other hand, can do quite a bit. Once you’ve mastered the basics, you can paruse through Apple’s online documentation, and see how to use QuickTime, audio, web browsing, and even an iSight in your app! Visual Basic is clearly not as powerful as Cocoa and many other programming languages. And, yes, you can use Java with it, but it’s not really a good idea, as Aaron Hillegass has often said.
I’ve put out a couple apps so far, so I know what’s involved in getting Cocoa to do what you want. For a while before Tiger came out, bits of info were coming out that Apple had developed a bunch of cool new stuff in Tiger. It wasn’t until Tiger’s actual release that we got all of the scoop. Now, if you check Apple’s online documentation for developers, you can see how much has changed. Quite a few things are listed as being depreciated, in favor of newer methods, specific to Tiger.
Now that Tiger has arrived, Cocoa is getting even stronger. If you’ve purchased it, you’ve most likely recieved the Developer Tools CD with it. These have been free with every copy of Mac OS X for a while, and I hope Apple continues the trend. Also with Tiger was something that impressed me – QTKit. QTKit is most obvious in the new QuickTime 7. It’s pretty neat, from what I’ve played with so far. Developers no longer have to call Carbon for some things with QuickTime, and makes those simple things so much easier! This shows that Cocoa isn’t going away any time soon, and Apple is working to make it better.
In a future article, I’ll be going in-depth on some of the details – Cocoa has a lot of cool stuff behind the scenes. In the meantime, a good place to look for info is on http://www.cocoadev.com. It’s an awesome wiki with a lot of community involvement.