Comparing Cocoa to WPF

While I bought my MacBook over two and a half years ago, I didn't start getting into programming it until a little under a year ago. It has definitely been an eye opening experience.

I guess that I was most surprised by just how different it is from Windows programming. At first, when I had no idea what I was doing, I couldn't even search the documentation to find the answer since the whole concept of Cocoa programming (the primary API for OS X apps) was so foreign to me.

Once I got familiar with it (greatly aided by Cocoa Programming for Mac OS X, by Andy Hillegass), things got quite a bit easier. I still had a lot to learn, though.

Now that I am starting to really get into and understand WPF, it's amazing to me how similar it is to Cocoa. They both greatly emphasize the use of data binding for populating UI controls, and they have a lot of features for making programming easier.

They do have their differences, however. Personally, I still feel as if WPF is more flexible. If something that I want to do isn't provided by default, it seems like I'll have a better chance of implementing it cleanly in WPF. Granted, this could just be because I have more experience with Windows programming in general.

Cocoa does have some advantages, too - namely its UI designer. While it was weird at first that it doesn't generate any code, its approach does make sense. Plus it does a great job of enforcing standard UI conventions.

It has definitely been interesting to learn two different UI libraries at the same time. This has shown me where the strengths and weaknesses of each are - not to mention making me a better programmer by expanding my horizons.