Welcome to TheCredence.com - You may like to subscribe to our RSS feed to stay updated.
Huh.. What is cocoa?
First of all, if you stumbled on this article, you probably wondered what Cocoa is. Well, before anything, Cocoa is a object-oriented application environment. What is special about it is that it was designed especially for developing applications only for Mac OS X.
Tools for Cocoa
Maybe the description above does not tell you as much as you would want to know, but I can guarantee you that you will end up loving Cocoa, even though you may not like it that much at first. But aside from this, let’s see something about the basics. Before anything you need to know what that will be the tools that you will use.
Mac OS X comes with a set of developer tools called (surprisingly!) Mac OS X Developer Tools. You get this set for free with your Mac OS X, and all the tools you will need for Cocoa development can be found here. Still, even though these developer tools add multiple applications to your system, most of them quite handy you will, most of the times need just the first two: Interface Builder and Xcode. Besides these two, you will also need to use the GNU debugger (in order to find and fix errors) and the GNU C compiler, also known as gcc (for code compiling).
* Xcode – formerly known as Project Builder – tracks any type of resource that goes into an applications: from code to sounds and so on. You will do almost everything in Xcode: you will edit, compile and launch your application. Also, to invoke and control the debugger you can again use Xcode.
* Interface Builder – is a normal GUI builder. It will help you design and lay out windows but also add and edit several widgets to those windows. Besides this, Interface Builder offers much more. You can use it to create and edit object attributes for example. Some of these objects will be instances of classes that you create but most of them are simple UI elements (example: text fields, buttons etc).
Language for Cocoa Programming
In order to write Cocoa you can use several languages such as Objective-C or Java. Objective-C is an elegant extension to C that can be very easily learnt if you already known C and an OOP language such as C++. But, if you do not like Objective-C or you simply do not want to use it, you can always go for Java even though it is not recommended. Remember that the major benefit to Java is portability, but by using Cocoa, that portability is lost.
Also, if you do want to write Cocoa applications with Java you will find that it has more bugs rather than if you would have written them in Objective-C. This can be easy explained – since all the tools and frameworks were written in Objective-C for Objective C it is normal to face several more bugs with Java. Cocoa applications developed with Java are rather rare since almost no one is doing this.
Links you may find interesting -
