3. Who?
Miguel de Icaza (not the only one, but got the ball rolling)
Original developer for Gnome
Was impressed with .NET, saw that MS really wanted
to make developers happy
Started working on Mono, released in 2005
Now working @ Novell
Released MonoTouch in Sept 2009
4. What?
Mono
Cross-platform re-implementation of .NET
5 years old
Monotouch is a project from the Mono developers
Includes very mature IDE - MonoDevelop
Intellisense
Integrated into XCode toolset
Motivated and helpful community
5. Why?
Current developer expertise
Codebase
Objective-C is a zone of pain
25 year old language
Do we really still need to worry about memory
manangement.... REALLY? (yes I know about Autorelease Pools)
But you still have to understand it because all the good
examples are in it
6. How?
.NET is based on IL and gets JIT’ed as necessary
But there are Apple restrictions
No JIT’ed apps
No shared libraries
But eventually everything gets turned into machine
code, right????
So what can we do to fix this?
7. How?
AOT - Ahead of Time Compiler
Compiles directly to machine code
But one big .app is still very large....
The Mono linker strips out all unused code
Minimum binary is still 5-7M
8. MonoTouch API’s
mscorlib
System
System.Core (LINQ)
System.Data
Mono.Data.Sqllite
Mono.Dialog (UITblV)
System.ServiceModel
WCF
System.Json
System.Web.Services
System.XML
System.XML.Linq
.NET API’s MonoTouch
AddressBook/
AddressBook.UI
AudioToolbox/
AVFoundation
CoreAnimation
CoreGraphics
CoreLocation
GameKit
MediaPlayer
MessageUI
StoreKit
SystemConfiguration
UIKit
Third Party
OpenTK
OpenGL
OpenAL
Sqlite-CS
XnaTouch
CocoaNet
Service Stack
(JSON, XML SOAP)
Vici.CoolStorage
(Object store)
9. How it is Bound
Monotouch Namespace
Monotouch.Foo
Maps to CocoaTouch’s Foo Framework
1:1 Mapping of classes
Monotouch.UIKit.UILabel
CocoaTouch’s UIKit framework, UILabel class
10. Strongly Typed
Obj-C
Arrays are weakly typed
NSArray returns values
MonoTouch has strong types
UIView[] Subviews {get}
vs.
NSArray *subviews
MonoDevelop has nice Intellisense - explore the API
11. Garbage Collection
Automatic
Mono’s GC will collect objects on demand
Deterministic
Use it when you need control
Every object in MonoTouch implements IDisposable
using (var image = UIImage.FromFile(“foo.png”))
{
surface.DrawImage(image, 20, 20);
}
13. Integration
Tight integration between MonoDevelop and
InterfaceBuilder
IB makes XIB’s / MD parses them
Auto-generates classes in MD
Generates partial classes for types, outlets and actions
set up in Interface Builder
15. Debugger / Performance
MonoTouch supports Mono’s debug framework and
MonoDevelop
Supports the simulator and the device (even over
WiFi)
(New) Supports profiling via Shark and Instruments
17. Roadmap
Currently support SDK 3.1.3
Beta MonoTouch builds iPad apps for simulator (< 24
hour turnaround from when the SDK was released)
Will track future iPhone/iPad SDK releases
MonoDroid preview Q3 2010
Silverlight/Moonlight prototype Q3 2010
18. Get Started
iPhone SDK
Monotouch from Novell (eval is free, simulator only)
$399.00 Dev
$999 Enterprise
MonoDevelop from the community
Join iPhone Dev Program ($99) to deploy to a device
and sell in the AppStore
19. Thanks
To the Mono team at Novell for such an awesome tool
@chrisntr for letting me reuse his slides
adam.hill@gmail.com