In this episode of Herding Code, Jon and Scott Koon pair up with Miguel de Icaza and Geoff Norton of the Mono Project and discuss MonoTouch:
- Jon asks Geoff Norton, engineering lead on the MonoTouch project and founder of the Cocoa# and Objective-C# projects, to give the elevator speech about MonoTouch and why one might choose it over other iPhone development tools. Geoff explains that MonoTouch is a commercial product from Novell. They have ported the Mono runtime to run on the iPhone thus allowing developers to write full native iPhone applications in languages which target the CLR. Some might be attracted to MonoTouch because they feel C#, for example, is fluent and expressive compared to Objective-C. Others might use the product so they can reuse existing components or code when moving to iPhone development.
- Miguel shares that there is a strong pattern in Objective-C where you respond to objects through messaging between classes. In the .NET space, you are most familiar with listening to events with attached methods such as lambda expression or delegates and MonoTouch uses this programming model and expose Cocoa API to be similar to the way C# does things. For example, the use of events, properties, delegates. He continues by stating you also have access to .NET APIs in addition to all iPhone APIs.
- Scott K asks if there are any disconnects with which .NET APIs are available. Geoff shares that MonoTouch is not the entire .NET 2.0 BCL. In fact, development was started with the Silverlight BCL and additional namespaces were included as development proceeded.
- Geoff mentioned Silverlight. Jon’s Pavlovian Trigger is fired, he starts to drool and programmatically inquires about the potential of running Silverlight applications on the iPhone (even though, as Jon mentions, Apple is currently disallowing it. Miguel speaks to the MonoTouch’s use of the Silverlight profile drops unnecessary dependencies upon the .NET framework thus providing for a leaner precompilation. Geoff talks about what would be required to getting Silverlight on the iPhone. Miguel states that Silverlight on the iPhone would not be a standard Silverlight experience. Most notably, one would have to go through the AppStore and download a Silverlight enabled application rather than access a Silverlight application through the browser.
- Jon asks about the cost associated with developing iPhone applications with MonoTouch. Miguel shares that Mono and Moonlight were basically developed to improve the Linux ecosystem. As for Mono for the iPhone, it was difficult for Novell to justify the investment for this highly desired feature request so they decided to charge for it. Geoff notes they have a 100% free, non-time limited evaluation version which works with the simulator. It’s only limitation is you can’t get your application onto the device. Please note that you get a $150 discount on MonoTouch if you register for MonoSpace.
- Jon asks Geoff for an overview on how to get started with MonoTouch development. Geoff provides the high-level steps – get the iPhone SDK from Apple, pay Apple $99 to become registered iPhone developer, load up Mono Develop, create a new iPhone project from template, start typing C# code, you will be using Interface Builder for layout, build and run.
- Scott K calls out how Interface Builder traditionally integrates with XCode. Geoff comments about Interface Builder with C# and the generation partial classes as code behinds which automatically connects outlets to MonoTouch engine. Miguel speaks to the advantages of the MonoTouch approach.
- The guys talks about XIB (pronounced zib) and NIB files and freeze drying.
- Scott K shares listener questions from @hugeonion: Is there is anything that you can’t do using MonoTouch.NET that you could using Objective-C? Can you mix Objective-C and .NET when you are writing a MonoTouch project? Geoff gives the liberal-minded answer and then Miguel finishes with the short answer — “There’s really nothing that you can’t do with MonoTouch that you can do with Objective-C". “I guess you could argue it’s a Turing machine so you can do anything on anything.”
- Scott K asks another listener question from @shamel: What are the plans to improve the MonoTouch debugging story? Miguel says the debugger will be available faster than you might think. It’s coming but the decision was made to push to product out sooner than waiting for MonoTouch (and debugging, profilers, code-generator, more APIs) to be perfect. Geoff talks about the updated compiler and the ability to back-trace crashes using DWARF, the standard debugging format which Apple uses.
- Jon and Geoff talk about graphics , MonoTouch development on a Power PC Mac and static compilation. Miguel talks about coding on paper (desk checking.)
- Jon distills MonoTouch development down to two steps: binding to the iPhone APIs and then doing the static compilation to run on the iPhone. Geoff speaks of support for generics, Cocoa#, Objective-C#, Monobjc and binding the CLR to Objective C.
- Scott K asks if they’ll be moving Mono onto the Android. Miguel speaks of Android, Java, managed language, garbage collection, native compilation, current demand and their current focus being Mono for the iPhone. Jon asks if there’s a story for Mono support on Windows Mobile. After all Windows Mobile does run the .NET compact framework. Jokes and laugh follow…
- Jon, Miguel and Geoff talk about MonoTouch iPhone application size.
- Miguel talks about embracing cross platform and getting Windows developers working on Mac – and looking cool at Starbucks.
- The guys discuss XNA for Silverlight, XNA game developer studio, XNA hosting on iPhone or the fact that you can’t distribution XNA games to the Zune. They also touch upon Mono running on the WII and PS2.
- Geoff and Miguel finish up the conversation comments about the MonoSpace, the Open Source and Cross-Platform Conference for Mono and .NET which will be held in Austin this October 27-30.
Quote of the Show:
- “Do your HTTP Get and parse the result like a man!” – Miguel
Download / Listen:
Herding Code 62 – MonoTouch with Miguel de Icaza and Geoff Norton
Show notes compiled by Ben Griswold. Thanks!
This entry was posted
on Sunday, October 11th, 2009 at 11:58 pmand is filed under interview, podcast.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.