Monday, September 14, 2009

iPhone Dot Net

Here's another interesting project, which allows programming iPhone applications in C# using Mono. It's based on the open source Mono project, but is a commercial product.

I have such mixed feelings about projects like this one. On one hand, I have tremendous admiration and respect for the ingenuity and hard work that went into making this work. Yes, it definitely does lower one barrier to entry for a considerable number of people with solid .NET experience, but that's not necessarily a good thing.

Tools like this encourage people to become hammer developers, that is to say, developers who use and are comfortable with only one language and framework. I have a very strong belief that being a hammer developer is, to put it bluntly, bad. I'm a strong believer in the importance of cross-training. I think it's important to see multiple approaches to problems. To become a great programmer, you need to be exposed to the work of a lot of different great (and not-so-great) programmers, and not just ones working in a the same language and toolset as you. Good developers have both breadth and depth of knowledge to draw upon when solving problems.

Although C# has some similarities to Objective-C, C# derives from the Simula object model, like C++ and Java, meaning it's strongly typed and does a lot more at compile time than Objective-C. There's nothing wrong with strongly-typed, static languages, but in many cases, the Simula and Smalltalk models really do require the use of different design patterns to be used most effectively. These differences are not insurmountable; Apple, for example, ported WebObjects from Objective-C to Java several years back. But, there were definitely bumps in the road; some parts of WebObjects 5.0 were necessarily klugey to work around the fundamental difference in the two languages.

Now, before people jump on me, let me just readily admit that I'm biased here. I really like Objective-C and I do think it's the absolute best option for programming on the iPhone. I also fully realize that Objective-C seems like a weird beast when you first come to it, especially after spending a lot of time with languages like C++ and C#.

But I do honestly think that one mark of a good developer is choosing the right tool for the job even (or maybe especially) when it's not a tool you are comfortable with. Learning is good, people. Learning is good. Don't ever say you're too busy to learn a new language or framework. Learning is an investment in your future viability and employability. You can't afford to stop.

Now, obviously, there's more than one opinion on this. The developer of MonoTouch, Novell, has a very different take on it. They believe that C# is so much more efficient than Objective-C that they're kindly willing to sell you a $1,000 toolkit. You'll still need to be a member of the iPhone Dev program, and you'll also still need a Mac for development. So, while this may lower the knowledge barrier for .NET developers to create iPhone programs, it certainly doesn't lower the financial ones any.

No comments:

Post a Comment