MonoTouch meet WindowsPhone7
This is a very basic example of how you can share data and code between the iPhone platform (using MonoTouch) and recently RTM'd Windows Phone 7.
The code is available on github... notice that the source data (
restaurants.xml file) and class file (Objects.cs) are identical on both platforms, as is the XmlSerialization code that parses the data into memory for display.You will see there is a lot more 'user code' in the MonoTouch project for iPhone - this is due to the laborious way that
UITableViews must be coded*; whereas the WP7's Silverlight heritage allows some very neat databinding scenarios.* the excellent
MonoTouch.Dialog project significantly reduces this code overhead on MonoTouch - definitely give it a try!...now I just need to put the MonoDroid version together... :-)

If I understood correctly, you can reuse the code that you wrote for iPhone with Monotouch for Windows 7 phone? Do you need to buy license for Monodroid even if you have the license for Monotouch?
ReplyDeleteSorry I am a newbie in this :D
You can re-use your C# objects, web service calls, XML processing, Linq queries, etc across all three platforms (WP7, MonoTouch and MonoDroid). Obviously you aren't using Mono on WP7 - just Microsoft's standard c#/.NET environment.
ReplyDeleteFor each platform you write custom UI code that takes advantage of that platform (CocoaTouch for iOS, Silverlight for WP7 and Android's XML/Activity/whatever layout tools).
MonoDroid licensing has not yet been announced as it is still in beta.
Thanks a lot craig for the info. really appreciate it! I will start making iPhone apps with MonoTouch :)
ReplyDeleteThis comment has been removed by the author.
ReplyDelete