Start Writing by Reading
My professional development experience has been on the Windows platform. Realistically, I am not a Windows programmer (I have rarely written a Windows application by myself), but rather write back-end services, middleware,or components that run inside a Windows application. I have had to make changes to a Windows application that someone else started, but it was just to add a small feature. I have done a few little utility applications, but nothing significant.
I have always stayed away from doing traditional Windows programming due to the truly insane programming model which is the WndProc. With past developments with MFC and current developments with .NET, there are abstractions that make it fairly painless, but they are still Leaky Abstractions and that WndProc still leaks through via overriding message processing to hook something that wasn’t exposed or even the Single-Threaded Apartment (shudder).
When the iPhone SDK was first announced, I knew that I eventually wanted to write an application for it. I signed up for the iPhone Developer Program (a little premature since I haven’t release anything yet) and started reading the Introduction to The Objective-C 2.0 Programming Language. I have been studying other dynamic languages like Ruby and JavaScript and it was appealing to use a dynamic language that could call directly into C as well.
When I started reading about the Cocoa framework, I was interested to see that the programming model on the iPhone and the Mac is Model-View-Controller which has become very popular recently in the web development circles through Ruby on Rails. I have researched Rails in the past and noticed that quite a few of the developers come from the Mac community. Now I see that Cocoa seems to have had an impact on the start of the Rails framework.
One thing that I have learned from my Windows development background is that to write good code for a platform it helps to read code for that platform. Scott Hanselman is a well known .NET developer and advocates regularly reading code to become a better writer. The problem with reading iPhone code is that Apple had it under NDA for quite a long time. I am in search of complete applications to look at so as to understand the correct way to implement MVC in an iPhone application. I am starting by reading the WordPress iPhone source. I will also be looking at the sample code in the iPhone OS Reference Library.
Stackoverflow also has a post for Where can I find sample iPhone code? which looks promising. If you know of any source that focuses on writing correct MVC code, please post a reply on the Stackoverflow question (and let me know!).