Top Banner
Wallace B. (Wally) McClure
35
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Wallace B. (Wally) McClure Who the heck am I?

Wallace B. (Wally) McClure

Page 2: Wallace B. (Wally) McClure Who the heck am I?

Who the heck am I?“Building iPhone Apps for the .NET

Developer”Ebook – downloadable today.Print book in July, 2010.

“Beginning AJAX with ASP.NET”“Beginning ASP.NET 2.0 AJAX”“Professional ASP.NET 3.5 Service Pack

1”MVP – ASP.NET.ASPInsider.ASP.NET Podcast.INETA Speaker’s Bureau.

Page 3: Wallace B. (Wally) McClure Who the heck am I?

My Mileage May Vary during the talk.• MonoTouch/Mono/MonoDevelop are

released products.• Alpha/Beta Code on my system.

– iPhone SDK 3.2 Beta.– MonoTouch 1.9.5 Alpha.– MonoDevelop 2.2.1.Beta.

Page 4: Wallace B. (Wally) McClure Who the heck am I?

Where are we at?Increasingly mobile.Laptops are not quite convenient.Power management is important.Wifi is not everywhere.iPhone has tremendous

mindshare/marketshare..NET Framework is the most popular

development framework.

Page 5: Wallace B. (Wally) McClure Who the heck am I?

Why Develop for the iPhone?

Page 6: Wallace B. (Wally) McClure Who the heck am I?

History2007 – iPhone introduced – web applications.2008 – iPhone 3g introduced – web and app.2009 – iPhone 3gs introduced – web , app,

and iPhone 3.0 operating system.2010 – iPad introduced.Apple is the #3 smart phone providers

(Symbian & RIM).“There’s an app for that!”

Page 7: Wallace B. (Wally) McClure Who the heck am I?

Strategies to get on the iPhoneWeb application.Objective-C.PhoneGap.MonoTouch.Others.

Page 8: Wallace B. (Wally) McClure Who the heck am I?

Why Develop with MonoTouch?iPhone.

MindShare.MarketShare.

.NET MarketShare.Existing Knowledge.

MonoCross Platform.Maturity.

Page 9: Wallace B. (Wally) McClure Who the heck am I?

What is MonoTouch?Mono – Open Source implementation of .NET.MonoTouch is a .NET/c# layer over

CocoaTouch.MonoDevelop – IDE.Interface Builder – Design Surface.CocoaTouch.Apple SDK.AOT Compilation.

Page 10: Wallace B. (Wally) McClure Who the heck am I?

What MonoTouch is NotNot Winforms/WPF on the iPhone.Not a plugin to Visual Studio.“.NET is (Southern)American English.

MonoTouch is British English. C# is the common bond to learn the customs (programming idiosyncracies) of the iPhone.”

Page 11: Wallace B. (Wally) McClure Who the heck am I?

Editions“Community”

Free.SimulatorCan’t deploy to device.

Single User.Enterprise.

Page 12: Wallace B. (Wally) McClure Who the heck am I?

Mono’s JIT Engine

CILCILCILCIL

MonoMonoMonoMono

MemoMemoryryMemoMemoryry

Page 13: Wallace B. (Wally) McClure Who the heck am I?

Apple No No...Contractual Requirements

No interpreted codeNo shared libraries

Kernel LimitationsiPhone OS 2.0+ disables JIT

Page 14: Wallace B. (Wally) McClure Who the heck am I?

Mono’s AOT Engine

CILCILCILCIL

Mono Mono

AOTAOTMono Mono

AOTAOT Mono Mono RuntimeRuntimeMono Mono RuntimeRuntime

ARMARMARMARM

Native Native CodeCodeNative Native CodeCode

Page 15: Wallace B. (Wally) McClure Who the heck am I?

Monotouch FeaturesMonoDevelop iPhone Add-InCocoaTouch.NETFull static AOT compilerSupport for existing code

GenericsLINQMany .NET features.

Page 16: Wallace B. (Wally) McClure Who the heck am I?

Get StartedHello World.

Page 17: Wallace B. (Wally) McClure Who the heck am I?

Learn to read Objective-C

•All Apple documentation is in Obj-C

•Most examples are in Obj-C

•It’s not too hard to understand

•It might even be fun...

Page 18: Wallace B. (Wally) McClure Who the heck am I?

MonoTouch’s APIs

Page 19: Wallace B. (Wally) McClure Who the heck am I?

The BindingsMonoTouch namespaceMonoTouch.Foo namespace

Maps to CocoaTouch’s Foo Framework1:1 Mapping of classes.

MonoTouch.UIKit.UILabelCocoaTouch’s UIKit framework,

UILabel class

Page 20: Wallace B. (Wally) McClure Who the heck am I?

Strong TypesObjective-C

Arrays are weakly typed:NSArray return values.

MonoTouch has strong typesUIView[] Subviews { get; }vsNSArray *subviews;

Intellisense - explore the API...

Page 21: Wallace B. (Wally) McClure Who the heck am I?

Garbage CollectionAutomatic:

Mono’s GC will collect objects on demand

Deterministic:

Use when you need control.

Every object in MonoTouch implements IDisposable

using (var image = UIImage.FromFile(“foo.png”)){

surface.DrawImage(image, 20, 20);

}

Page 22: Wallace B. (Wally) McClure Who the heck am I?

What about App Size?20 MB (compressed) limit on 3G/Edge

downloads.Net BCL and other libraries are hugeMono Linker to the rescue!

Page 23: Wallace B. (Wally) McClure Who the heck am I?

OutletsInstance VariablesPointer to an object.Exposed to classes.Can be strong or loosely typed

MD will strong type

Page 24: Wallace B. (Wally) McClure Who the heck am I?

ActionsObjects emit broadcast messages to

receiversYou can do this C#MonoDevelop takes care of the details for

youCreates partial methods for you extend

Page 25: Wallace B. (Wally) McClure Who the heck am I?

MonoTouch EventsSupports Objective-C pattern:webView.Delegate = new MyWebViewDelegate();

•C# style events as well:webView.PageLoaded += delegate {

HideSpinningWheel();}

Page 26: Wallace B. (Wally) McClure Who the heck am I?

UITableViewTable.TableCell.Binding Data.Example.

Page 27: Wallace B. (Wally) McClure Who the heck am I?

DebuggingConsole.WriteLine(“Debugging inside of

MonoTouch”);printf(“I made it to this line!\n”)Breakpoints.

Page 28: Wallace B. (Wally) McClure Who the heck am I?

DebuggerMonoTouch debugger leverages Mono’s

new Soft-DebuggerSupports the SimulatorSupports the Device...

even over WiFi

Page 29: Wallace B. (Wally) McClure Who the heck am I?

Debugging CaveatsDebug binaries on devices are very largeCannot debug Main or FinishedLaunching

on deviceConsumes more memory runtimePerformance hit

Page 30: Wallace B. (Wally) McClure Who the heck am I?

Urban Spoon applicationAcceleration.Example.

Page 31: Wallace B. (Wally) McClure Who the heck am I?

Getting started Get iPhone SDK from AppleGet Mono from NovellGet MonoTouch (evaluation version

is free)Get MonoDevelopRegister with Apple iPhone

Developer Program and purchase MonoTouch for putting apps on device and AppStore.

Page 32: Wallace B. (Wally) McClure Who the heck am I?

One more thing...

Page 33: Wallace B. (Wally) McClure Who the heck am I?

iPadBut you want to develop for the iPad...24 Hours after the SDK was released...MonoTouch support for iPad.

Page 34: Wallace B. (Wally) McClure Who the heck am I?

How do I find out more?Ebook now.Book available shortly.http://monotouch.info.http://forums.monotouch.net.

Page 35: Wallace B. (Wally) McClure Who the heck am I?

Scalable Development, Inc.

• Development.• Training.• Mentoring.• Expert Development Help.

– Database.– User Interface.– AJAX.

[email protected].