Problem
After attending a Mono session at a local.Net event today, the use of MonoTouch as an alternative for iPhone development was ‘touched’ upon. Despite some of the Mono stack’s quirks, it appears to be an interesting solution for someone who is highly experienced with C# and.Net. However, since MonoTouch costs $400, I’m somewhat torn on if this is the way to go for iPhone development.
Anyone have any experience with MonoTouch and Objective-C development, and if so, is programming with MonoTouch that much easier and faster than learning Objective-C, and therefore worth the $400?
Asked by jamesaharvey
Solution #1
This question (and variations on it) has come up a lot recently. What surprises me is how many people reply, but how few actually respond.
I have my favorites (I like both stacks), but this is where the majority of “solutions” go awry. It shouldn’t be about my desires (or what anybody else wants).
Here’s how I’d go about evaluating MonoTouch’s worth – obviously, I can’t be objective, but I think this is reasonably zealotry-free:
There are numerous factors to consider. Value is so ephemeral. If we’re discussing cost and if it’s worthwhile, the answer boils down to my first bullet point: if this is for business, and if you can obtain the work, you’ll get your money back in no time.
So… that’s as objective as I’m going to get. This is a brief list of questions you could ask yourself, but it’s a good place to start.
Personally, (for the sake of neutrality), I adore and use both. And I’m pleased I started with the Apple stack. When I already understood my way around Apple’s environment, it was much easier for me to get up and running with MonoTouch. As others have stated, you’ll still be working with CocoaTouch; the difference is that you’ll be doing so in a.Net-based environment.
But there’s a lot more to it. The people who haven’t used MonoTouch tend to stop there – “It’s a wrapper blah blah blah” – that’s not MonoTouch.
MonoTouch provides you access to both what CocoaTouch has to offer and what (a subset of) has to offer. Net has to offer, such as an IDE that some people prefer (I’m one of them), greater interaction with Interface Builder, and, while you don’t get to fully ignore memory management, you do have some leeway.
If you’re not sure, download Apple’s stack (which is free) and the MonoTouch eval stack (which is also free). Both will only operate against the simulator until you join Apple’s developer program, but that should be enough to determine whether you prefer one over the other, and whether MonoTouch is worth the $399 for you.
And don’t listen to the zealots; they’re usually the ones who haven’t utilized the technology in question:)
Answered by Rory Blyth
Solution #2
This post contains a lot of hearsay from developers who haven’t tried MonoTouch and Objective-C. It appears that MonoTouch has been largely ignored by Objective-C developers.
Although I am clearly biassed, you can see what the MonoTouch community has been up to in:
http://xamarin.com
There are various articles there from developers that have worked with both Objective-C and C#.
Answered by miguel.de.icaza
Solution #3
So, in response to a previous query of a similar nature, I recommend learning Objective-C. (Don’t forget about debugging support as well.)
Another user added the following:
Monotouch is now more accessible to you. Later on, it will be more difficult.
What happens, for example, when fresh seeds are released that you need to test against, but they break MonoTouch for some reason?
By staying with Mono, any time you search for resources for frameworks, you must mentally translate them into how you will utilize them with Mono. After a few months in Objective-C, your app binaries will be larger, your development time will not be significantly faster, and other app developers will have a significant edge over you because they are using the native platform.
Another factor to consider is that you want to utilize C# rather than Objective-C because you are better familiar with it. The frameworks, which you’ll have to call into with C# as well, make up the great majority of the learning curve for the iPhone, not Objective-C.
You should utilize the platform that most directly conveys the platform’s design philosophy, which for the iPhone is Objective-C. Consider the situation from the other side: if a Linux developer used to programming in GTK wanted to design Windows programs, would you genuinely advise them to avoid C# in favor of GTK because it was “easier”?
Answered by BobbyShaftoe
Solution #4
Mono is not a band-aid. It improves the iPhone OS in a number of ways. LINQ, WCF, sharable code between a Silverlight app, an ASP.NET page, a WPF app, a Windows Form app, and there’s also mono for Android and it will work for Windows Mobile as well.
So you can spend a lot of time writing Objective-C (many studies show that building the same sample code in C# takes a lot less time than writing OC) and then DUPLICATE it for other platforms. MonoTouch appealed to me since the Cloud App I’m developing will have a variety of user interfaces, with the iPhone being just one of them. It’s ridiculously easy to have WCF data stream from the cloud to a MonoTouch app. I have common core libraries across platforms, so all I have to do now is develop a simple presentation layer for iPhone/WinMobile/Android/SilverLight/WPF/ASP.NET deployments. Re-creating everything in Objective-C would be a huge waste of effort, both in terms of original development and ongoing maintenance as the product evolves.
The people who are insulting MonoTouch or insinuating that users of it need a crutch are lacking the Big Picture of what it means to have the .NET framework at your fingertips and maybe don’t understand proper separation of logic from presentation done in a way that can be reused across platforms and devices.
Objective-C is a fascinating language that is unlike many others. I enjoy a good challenge and trying new things… but not when it slows me down or requires excessive re-coding. There are some really great things about the iPhone SDK framework, but all that greatness is fully supported with MonoTouch and cuts out all the manual memory management, reduces the amount of code required to perform the same tasks, allows me to reuse my assemblies, and keeps my options open to be able to move to other devices and platforms.
Answered by Paul
Solution #5
I changed my mind. Monotouch allows me to write apps at least 3-4 times faster than before (4 apps per month compared to my old 1 per month in Obj C)
Lots less typing.
Just my experience.
Answered by Ian Vink
Post is based on https://stackoverflow.com/questions/1583856/how-to-decide-between-monotouch-and-objective-c