Archive

Archive for October, 2009

Start Writing by Reading

October 7th, 2009

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!).

development, mobile

Starting Native

October 7th, 2009

I have been debating what would be the correct way to start.  I would like to support multiple platforms and the rhomobile platform looks promising.  The biggest problem with my application is connecting to the WCF web service in the backend.

I can’t affort RhoSync since this will be deployed at the end customer’s site.  Also I think it would make the deployment too complex.  I need to work directly against the current WCF web service.  I thought about using Soap4r and go directly from Rhodes, but it look like direct HTTP access is not supported right now.

So for now, I am going to start with a native Objective-C application and get something out there so that I can get feedback from customers.

development, mobile