In a surprise move, Apple has relaxed their restrictions on which tools and languages developers can use to build apps for iPad and iPhone they previously disallowed in section 3.3.1:
"In particular, we are relaxing all restrictions on the development tools used to create iOS apps, as long as the resulting apps do not download any code," Apple said in a statement released to the press. "This should give developers the flexibility they want, while preserving the security we need."
http://arstechnica.com/apple/news/2010/09/apple-relaxes-restrictions-on-ios-app-code-iad-analytics.ars
I'm now intrigued at the propsect of the following code-reuse possibility using the Mono framework in addition to Microsoft C#. With Apple easing this restriction, C# works on:
With all of these tools, the goal is to reuse the functional (backend) code, and use the native UI (user interface) toolsets. For instance, on iPhone you still use Apple's user interface builder, but instead of combining that with backend code in Objective-C, you combine it with C# and the MonoTouch Framework(open-source .NET implementation). Same for Android, you combine it with Android's native UI builder, same with Phone 7. For the web, we use the MVC pattern which keep our functional code separate from our view (presentation code). Moving from the web to phones isn't a 1-to-1 switch, but some of our code could be cut / pasted.
But why C#? Aren't we playing in to the hands of the evil empire? Well, not really. I've said it before, C# is a great language that is as powerful as anything out there but lets developers write fewer lines of code. Like Java, we don't concern ourselves with low-level memory allocation and we get access to a powerful, tried and true tested framework for almost every web, client, server scenario you can find yourself in.
But C# isn't "free" as in "freedom", I hear. Well, more than you'd think. Microsoft released C# in a way that you, I, or for instance, Novell could freely implement the language and it is now a free ECMA standard language: http://port25.technet.com/archive/2009/07/06/the-ecma-c-and-cli-standards.aspx
As Microsoft's release explains it:"Under the Community Promise, Microsoft provides assurance that it will not assert its Necessary Claims against anyone who makes, uses, sells, offers for sale, imports, or distributes any Covered Implementation under any type of development or distribution model, including open-source licensing models such as the LGPL or GPL."
They even went so far as to apply these rules to their MVC framework, ASP.NET MVC.
Most businesses have to pick and choose to support more than one phone, which means a different code base and developer skillset. Web-based mobile apps are one approach, but are limited in capability so sometimes don't fit the need. I hope to see C# grow as a broader solution to cross-platform development.