Whether you're just starting out on your first iPhone app or are already deep into the next big iPad app, you'll appreciate this list of seven things every Cocoa developer should know from Scott Stevenson's Cocoa and Objective-C: Up and Running.
- Presentation matters
Many developers come to Mac or iPhone from other platforms and miss this. I cannot possibly overstate how critical it is to have a well-designed user interface, application icon, and website. These things tell your users that you care about your software. Your audience appreciates quality user experiences by definition—that’s why they bought a Mac in the first place. If two apps occupy the same space with roughly the same features, the one with the better UI usually wins. Invest in the user experience.
- Trust the frameworks
Another thing I see come up with some new Cocoa programmers is an inexplicable resistance to using the built-in frameworks. The reasoning is usually either that they’re not sure if the built-in frameworks are good, or they want to have complete control. The frameworks built into Mac OS X are good, and get better with each release; you want to get on that train so that you get new features in the future. It’s almost always in your best interest to bend the frameworks to your will instead of trying to write something from scratch. Trust the frameworks, and don’t worry about not having enough code to write; there’s plenty of interesting work to do.
- Use Interface Builder
Along the same lines as frameworks, some new Cocoa developers want to figure out how to write apps without using XIB files. Don’t waste time trying to do this. Interface Builder is there to help you do your job. It’s been around for a long time, and the concept is battle-tested. The best Cocoa programmers in the world use Interface Builder every day.
- Write code
This sure seems obvious, doesn’t it? The best way to become a better Cocoa programmer is to do more of it. Don’t worry about doing it right the first time. I wrote some absolutely horrible code when I first started, because I simply didn’t know what I was doing. But I did it more and more, and got better each time I made something. Spend five hours working on some Cocoa project—any project—every single week.
When in doubt, simplify. If you don’t know where to start with your app or don’t know how to design your user interface, start with the simplest thing that will work and build on it. This approach will never steer you wrong, because you won’t build anything you don’t need. All great apps are built on a few great ideas. Don’t waste time thinking up more complexity for your app. Simplify.
- The user is in control
If you only take one thing away from the list, make it this. The user is always in control. Never do things behind his back, even with good intentions. Never change the user’s data, rearrange preferences, or autoupdate anything without asking. This was once phrased to me as something along the lines of, “If you place a book on a table, you expect it to still be there the next time you come into the room.” Ask before changing anything.
- Have fun!
Writing software is very demanding. You can produce world-class apps only if you enjoy doing it. The best engineers I’ve ever worked with are not driven by a need to work hard, but a deep desire to make the best thing they possibly can, and they stay at it long after everyone else would have given up. They do it because they love making great things. If you’re not having fun writing software, why are you doing it?
Learn more about this topic from Cocoa and Objective-C: Up and Running.
Build solid applications for Mac OS X, iPhone, and iPod Touch, regardless of whether you have basic programming skills or years of programming experience. With this book, you'll learn how to use Apple's Cocoa framework and the Objective-C language through step-by-step tutorials, hands-on exercises, clear examples, and sound advice from a Cocoa expert. You get just enough theory to ground you, then you'll lean how to use Apple's rapid development tools -- Xcode and Interface Builder -- to develop Cocoa applications, manage user interaction, create great UIs, and more.