3 February 2009

No Code

Working with Cocoa is just magical. After a few years of using Java and Swing, starting up an XCode project and using Interface Builder is a joy. I wanted to share that, so here is an entire application, arguably interesting, created without writing a single line of code.

SalaryManager

SalaryManager is pretty simple: it has a table you can populate with people and their salaries, and it displays their average salary. Two buttons allow you to add and remove people and the values are saved between sessions: if you quit and restart the app all the data you entered remains. The internals are pretty simple as well: there is a Person table built with CoreData, and it is managed by an NSArrayController bound to the NSTableView. The neatest part is the average: the NSTextField is bound to the key @avg.salary, automagically displaying the correct value. There is no code refreshing the display, no code setting the values of the table, and no code saving the values. Certainly it took some knowledge of Cocoa and the tools to create this program, but I did not write a thing. Obviously most any larger app is going to require writing code, but it is interesting to see how much can be done without it.

So download the app or the whole XCode project. What can you create without code?

Hi! My name is MacRae Linton. I work with computers in California. Email me at . You can find the archive in the usual place. © MacRae Linton 2009.