|
Drawing a line in the groundWhere do you start? When growing a garden, which seed gets planted first? You have the crazy idea for an app that would win accolades, quiet screaming babies and woo the gender of your preference. Now what? Starting an app from nothing can be much more daunting that jumping into a partially or fully finished bowl of code. If you find you self staring at an empty project in Xcode, the ultimate-super-secret is to find an starting point with a low barrier of entry. Do UI love me?When brewing Cocoa, you will always have a GUI. One way to get started is to mock up an app in an image editor or directly in Interface Builder. Since we are at day one, we should create GUIs that get us started, not GUIs where we fuss over pixel widths. If you create a GUI intending to throw it away, you won't fuss over extraneous details. Premature GUI tweaking is a tuber of evil.
It's not pretty, but it will take you about 60 seconds to do in IB. The "browse for file" code will be fast, even if you have never done it before. The key is the big button in the middle. You hook up an IBAction, a few IBOutlets and BOOM. IB will generate the template and your LBoE point is waiting to be filled in like an overdue tax form. Prove it!Another starting point is writing tests. The low barrier here is that writing a test should be easier than writing the code that passes a test. Writing test code may not be interesting, but that's a personal problem. Recent versions of Xcode have a testing framework built in. The whole software testing concept is explored in a diverse medley of websites, books, articles and interpretive song and dance. One way to get get basic functionality started is to write a test. If you know you are going to need some string processing functionality, write a simple test with some example inputs and outputs. I ObjectIf your app is based on Core Data, you can use Xcode's Data Model Design tool to create your model graph.
This is a widget based tool that will get you thinking about your objects by visualizing the relationship between them. As if this LBoE wasn't low enough, you can create a simple GUI by dragging and dropping from Xcode to IB. It's a neat party trick and sure to impress innocent bystanders. Let's just keep things simpleThe lowest of low barrier entry points is a simple list of priorities. This can be done with a text editor or fancy outliner. The outline format maps well; the code will eventually be structured into chunks of functionality, each with sub-functionality. Once your priorities are laid out, draw straws and pretend you are sentencing an item to execution by delete key.
What if we just start over from the middle?It is also important to remember that you don't have to start from scratch. Apple has a trove of example code that can help those new or not so new to Cocoa. The always excellent CocoaDev has an exhaustive list of sample code. If you do find code in the wild, remember to respect the licensees and don't plagiarize. Give credit when it is due. Let's take things a step at a timeIt should be intuitively obvious to even the most casual of readers that the critical action is to just get started. Million dollar ideas are worth approximately $0.02 if they are never acted upon. |
about products blog contact misc xml
Copyright 2007-2009 6Tringle Inc