Learning Cocoa

Backstory

Haven't blogged in a while, been caught up with transitions to work from just graduating. Recently I started learning Cocoa for work. I'm not completely new to making apps using frameworks, but still pretty fresh out of school.

I have some experience with Android, so this post will describe my experiences learning Cocoa coming from more Android side.

Cocoa vs Android

I found the whole Cocoa framework to pretty acceptable and usable. That being said, tutorials for OS X Cocoa are pretty non-existent, and iOS is marginally better. So unless you pay to buy books, expect heavy digging. Buying a book from Big Nerd Ranch is probably your best bet. Android is much better to learn as a beginner. And then the transition into Cocoa isn't too bad.

If only Apple spent more resources developing and maintaining a set of tutorials for Cocoa, like Google does for Android, I think Cocoa would become slightly more popular.

Of course, the barrier to entry for Cocoa development is still limited by how costly it is for a setup. You'd need iOS or OS X device, and pay $99 for developer access per year. Where as pretty much any phone can run Android, and it's free to develop.

Cocoa's IDE: Xcode vs AppCode

But being a programmer by trade, I'm a little hesitant of doing any work that involves heavy use of GUIs. And developing for Cocoa you'll almost certainly be using Xcode. The alternative is to use another IDE or use the plain old text editor.

Let's face it. You can't manage this with text editors. Given how some files are structured, like XIB files, it pretty much screams at you to use an IDE.

XIB stands for the XML Interface Builder. Interface Builder is a software application which allows you to develop Graphical User Interface with the help of Cocoa and carbon. The generated files are either stored as NIB or XIB files.

If you're looking at IDEs, the major competitor to Xcode would be AppCode. Now Xcode isn't bad itself, anyone who've ever used JetBrains software knows that Xcode's compiler reasoning is garbage. Definitely AppCode wins here. Not only here, but across the board for compiled language IDEs. Making recommendations is their specialty. Ironically, because AppCode is put so much effort here, it isn't very good for making GUIs like Xcode. Among other things utilities like Instruments (monitoring your app), etc. But keep in mind I have used JetBrains stuff longer than I have Xcode, so I have my biases here.

In short, AppCode for writing code. Xcode for making interfaces, because Interface Builder is king.

Programming Paradigms

Both Android and Cocoa follow similar patterns, mainly MVC. Sometime in the future, I want to learn more about Reactive Programming, rather the observer pattern. But for now, I can't comment much, because I haven't got anything to compare to.

Conclusion

Well a lot more can be said about programming for Cocoa. But that's all the blogging I will do for now. Sleep, and I may come back to this post.

Leave a Reply

Your email address will not be published. Required fields are marked *