32
1 An Overview Of Microsoft's .NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist [email protected]

1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist [email protected]

Embed Size (px)

Citation preview

Page 1: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

1

An Overview Of Microsoft's .NET Mobility Technologies

Presentation By:

Derek Ferguson, Chief Technology Evangelist

[email protected]

Page 2: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

2

Presentation Overview

• The .NET Compact Framework

• The Mobile Internet Controls Runtime

Page 3: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

3

Mobile .NET in a nutshell

.NET Framework.NET Framework

Mobile InternetControls Runtime

Mobile InternetControls Runtime

Mobile Web Browser

Mobile Web Browser

.NET CompactFramework

.NET CompactFramework

CAB FileCAB File

Page 4: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

4

Development Computer Requirements

• Hardware• Pentium III @ 600 MHz

• 150 MB Hard Disk Space

• 800 x 600 @ 256 colors

• 256 MB RAM

• Software• Windows XP or 2000

• ActiveSync 3.5

Page 5: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

5

Device Requirements

• Operating System• Pocket PC

• Pocket PC 2002

• Windows CE .NET

• RAM Space• 2 MB

Page 6: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

6

Architecture

Page 7: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

7

Application Domains

• Benefits of OS processes without the overhead• Fault isolation

• Security

• Performance

• Partial support under the Compact Framework• Can create multiple application domains

• No domain-neutral code area

Page 8: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

8

Security

• An open programming environment is assumed…• No role-based security

• No zone-based security

• No AllowPartiallyTrustedCallersAttribute

• No declarative permission requests

• pInvoke can execute whatever native code it likes

• You can, however, verify code identity…• Assemblies can be given strong names before deployment

• Assembly names can be verified at run time

Page 9: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

9

Tools

• C# is nearly identical

• Visual Basic is different• /netcf switch required to target the Compact Framework syntax

• /sdkpath switch required to point to…‒ mscorlib.dll‒ microsoft.visualbasic.dll

• Debugging is only possible from within the VB device project

Page 10: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

10

Application Types

• Windows Applications

• Class Libraries

• Windows Control Libraries

• Console Applications (Windows CE only)

Page 11: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

11

Debugging

• The Emulators• Run real Windows CE bits

• Still x86 processors

• Real Devices• USB or serial connections are OK

• Ethernet or 802.11 are better

• In either case…• No way to debug from managed into unmanaged

• No edit and continue

• No attaching to existing processes

• Need a “Loopback Adapter” before VS.NET 2003

• Map a shared drive to move files

Page 12: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

12

What you have, and what you don’t have…

SystemSystem

System.DataSystem.Data System.XmlSystem.Xml

System.WebSystem.Web

GlobalizationGlobalization

TextText

SecuritySecurity

CollectionsCollections

ResourcesResources

ReflectionReflection

NetNet

IOIO

ThreadingThreading

DiagnosticsDiagnostics

ServiceProcessServiceProcess

ConfigurationConfiguration

DesignDesign

ADO.NETADO.NET

SqlServerCeSqlServerCe

SqlClientSqlClient

Xslt/XPathXslt/XPath

XmlDocumentXmlDocument

RuntimeRuntimeInteropServicesInteropServices

RemotingRemoting

SerializationSerialization

SerializationSerialization

ConfigurationConfigurationSessionStateSessionStateCachingCaching

ServicesServicesDescriptionDescription

DiscoveryDiscovery

ProtocolsProtocols

UIUIHtmlControlsHtmlControls

WebControlsWebControls

System.DrawingSystem.Drawing

ImagingImaging

Drawing2DDrawing2D PrintingPrinting

System.WinFormsSystem.WinForms

DesignDesign ComponentModelComponentModel

Reader/WritersReader/Writers

Page 13: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

13

Demo #1

A mobile Web Service client

Page 14: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

14

Question & Answer

Page 15: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

15

Windows CE Fundamentals

• One of Microsoft’s three flavors of Windows for devices• Windows CE and CE.NET are for devices

• Windows NT Embedded and XP Embedded for “serious” appliances

• Really a smorgasbord of OS components• OEM’s choose their favorite bits

• Platform Builder is the tool for doing the choosing

• Microsoft sets standards or CE “flavors” – such as Pocket PC OS• Some components must be chosen under Platform Builder

• Some hardware specifications must be met

• OEM’s are free to add whatever else they like

Page 16: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

16

Windows CE Popularity

• Pocket PC is the Windows CE poster child• Already beaten Palm OS in terms of PDA revenues

• iPaqs are, by far, the leading Pocket PCs

• Twice the cost of a Palm device – but 10 times the functionality!

• CE.NET is the champion of new computing• These devices will be first to ship Compact Framework (Beta 1)

• Handheld PCs and Palm PCs were also Windows CE

Page 17: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

17

Windows CE Web Development

• Pocket Internet Explorer is the CE browser

• First version was very limited, but you don’t see it much

• Next version of Pocket PC’s had good functionality:• Some DHTML support

• HTML 3.2

• Integrated with some custom Java implementations

• ECMAScript

• Newest version on Pocket PC 2002 is even better:• ActiveX downloading

• Some ability to be hosted in other applications

Page 18: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

18

i-Mode Fundamentals

• Developed by NTT DoCoMo

• Involved investing in more powerful phones

• Marketed exclusively in Japan

• Only now starting to show up in some US and Europe markets

Page 19: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

19

i-Mode Popularity

• Over 20 million subscribers in Japan since 1996

• Cultural differences help• Long commutes

• Expensive dedicated Internet connections

• One of the few wireless services to turn a good profit

Page 20: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

20

i-Mode Web Development

• Compact HTML• Medium-sized subset of HTML 3.2

• Specification is on-line…‒ http://www.w3.org/TR/1998/NOTE-compactHTML-19980209/

• All HTML is well-formed XML in this standard

• Only one font and one color (black)

• Frames and Tables

• Images

• All kinds of INPUT tags (including file uploads)

• Links and clickmaps

• Have to put your content on the right network for access

Page 21: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

21

WAP Fundamentals

• Direct successor to the very first markup language for mobile devices – HDML

• HDML was developed by Phone.com, which merged with Software.com to become OpenWave (www.openwave.com)

• HDML was a subset of HTML, but introduced the concept of “cards”

• WAP was created as HDML evolved and became an “open standard” (www.wapforum.org)

• WAP consists of many parts:• WDP – Transport Layer

• WTLS – Security Layer

• WTP – Transaction Layer

• WSP – Session Layer

• WAE – Application Layer

Page 22: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

22

WAP Popularity

• At the end of 2000, WAP looked like the “next big thing”

• Unfortunately:• WAP’s markup language (WML) is very restrictive

• Using software on WAP devices has failed to appeal to US culture

• WAP security is typically insufficient

• By the end of 2001, people were commonly asking: “Is WAP crap?”

Page 23: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

23

WAP Web Development

• WML is the markup language sent from servers to WAP devices

• 100% XML

• A single WML page can contain multiple screens, known as “cards”• This dramatically reduces number of server hits and latency

• Because XML describes data rather than presentation, WML offers very little in the way of formatting

• Input buttons will be mapped the way that a given device deems appropriate under various circumstances

• WBMP is the only supported image format

Page 24: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

24

Fundamental controls

• MobilePage

• Form

• Label

• Textbox

• Command

Page 25: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

25

System Requirements

• Windows NT 4, 2000, or XP

• .NET Framework

Page 26: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

26

Validators

• CompareValidator

• RangeValidator

• RegularExpressionValidator

• RequiredFieldValidator

• CustomValidator

Page 27: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

27

Special Controls

• Calendar

• Link

• Phone Call

• Ad Rotator

• TextView

Page 28: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

28

Lists

• List

• SelectionList

• ObjectList

Page 29: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

29

Error Handling

• Error messages will be automatically formatted for mobile devices

• Mobile device errors only show:• Exception raised

• Method that raised the exception

• MICR lies about the HTTP response code when it has to.

• To use custom error pages with WAP, you must specify UseFullyQualifiedRedirectURL in web.config

Page 30: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

30

Debugging

• Same as any other ASP.NET application

• No client-side breakpoints in VS.NET

• In web.config, “debug” attribute of “compilation” node:• True for debugging

• False for performance

• Tracing:• Can be enabled

• Won’t show up on mobile devices

• Will show up when viewed separately with Internet Explorer

Page 31: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

31

Summary

• .NET provides two main technologies for mobile computing

• The .NET Compact Framework• Provides a platform for code you can take with you

• Has some very steep device resource requirements

• Complete UI flexibility

• The MICR• Adapts Web markup to differing device requirements

• Requires a constant Internet connection

• Limited UI richness

Page 32: 1 An Overview Of Microsoft's.NET Mobility Technologies Presentation By: Derek Ferguson, Chief Technology Evangelist derek.ferguson@XB.com

32

Demo #2

A Mobile Web Application