building.net mobile applications mike pelton [email protected] developer & platform group...

40
Building Building .NET .NET Mobile Mobile Applications Applications Mike Pelton Mike Pelton [email protected] [email protected] Developer & Platform Group Developer & Platform Group Microsoft Ltd. Microsoft Ltd.

Upload: roger-barnett

Post on 20-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

BuildingBuilding .NET .NET Mobile Mobile ApplicationsApplications

Mike PeltonMike [email protected]@microsoft.comDeveloper & Platform GroupDeveloper & Platform GroupMicrosoft Ltd.Microsoft Ltd.

Page 2: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

.NET…?.NET…?

Software technology for Software technology for

connecting your world of connecting your world of People,People, Information,Information, Systems, and Systems, and DevicesDevices

Page 3: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Web servicesWeb servicesIndustry standards for interoperability

Enable disparate systems to work togetherEnable disparate systems to work together Across languages, platforms, applicationsAcross languages, platforms, applications Computer to computerComputer to computer Inside/outside the firewallInside/outside the firewall

Based on open, internet standardsBased on open, internet standards XML, SOAP, WSDL, UDDIXML, SOAP, WSDL, UDDI

Broad industry supportBroad industry support Key area of vendor alignmentKey area of vendor alignment

Page 4: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Web ServicesWeb ServicesFactoring Business LogicFactoring Business Logic

Page 5: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

The Ever-The Ever-Broadening Broadening Spectrum of Spectrum of DevicesDevices

New Business ModelsNew Business Models Using XML Web servicesUsing XML Web services New models for user New models for user

interactioninteraction

Page 6: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Hardware TrendsHardware Trends Cheaper, lighter, Cheaper, lighter,

smaller…smaller… More integrated More integrated

wirelesswireless GPRS,GPRS, WiFi…WiFi…

New Form factorsNew Form factors

Page 7: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

DisplayDisplayUSB or SerialUSB or Serial

ProcessorProcessorMemoryMemory

GSM/GPRSGSM/GPRSCDMA/1xRTTCDMA/1xRTT

Device Device HardwarHardwaree

WiFiWiFiBluetoothBluetooth

RadioRadio

DriversDrivers

Windows MobileWindows Mobile CE DBCE DBActiveSyncActiveSync

Pocket OutlookPocket OutlookPocket Internet ExplorerPocket Internet ExplorerWindows Media PlayerWindows Media Player

Windows CEWindows CE

Software Platform (APIs)Software Platform (APIs)

Home ScreenHome ScreenUser User Interface/ShellInterface/ShellHTML ControlHTML Control

GAPIGAPIRemote APIRemote APIConfigurationConfigurationBluetoothBluetooth

Connection ManagerConnection Manager TAPITAPISMS SMS MAPI MAPI POOMPOOM

MultimediaMultimediaCommunicatioCommunicationn

Device ManagementDevice Management PresentationPresentation

ADO CEADO CEXMLXMLCE DBCE DBOLE DBOLE DB

Data AccessData Access

NativeNative

Win32Win32

MFCMFC ATLATL

ManagedManaged

.NET Compact.NET CompactFrameworkFramework

Server sideServer side

ASP .NETASP .NETMobile ControlsMobile Controls

NativeNative

Win32Win32

MFCMFC ATLATL

ManagedManaged

.NET Compact.NET CompactFrameworkFramework

Server sideServer side

ASP .NETASP .NETMobile ControlsMobile Controls

Windows Mobile Development Windows Mobile Development PlatformPlatform

Embedded VC++Embedded VC++ Visual Studio .NETVisual Studio .NET

Page 8: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Building Mobile Web ApplicationsBuilding Mobile Web ApplicationsVisual Studio and Visual Studio and ASP.NET Mobile ControlsASP.NET Mobile Controls

Common Language RuntimeCommon Language Runtime

Base Class LibrariesBase Class Libraries

ADO.NET and XMLADO.NET and XML

ASP.NETASP.NETWeb FormsWeb Forms

Web Web ServicesServices

WindowsWindowsFormsForms

VisualVisualBasicBasic C++C++ C#C# J#J# …… V

isu

al S

tud

io .N

ET

Vis

ual S

tud

io .N

ET

Mobile Web Mobile Web ProgrammabiliProgrammabilityty

• Integrated IDEIntegrated IDE

• Visual design Visual design and debuggingand debugging

• Simple Simple integration with integration with data and XMLdata and XMLASP.NET Mobile ASP.NET Mobile Controls Controls

• Feature of Feature of ASP.NETASP.NET

• Adaptive Adaptive rendering for rendering for device propertiesdevice properties

• Uses full .NET Uses full .NET FrameworkFramework

Page 9: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Key ConceptsKey ConceptsTwo Sides of the Same CoinTwo Sides of the Same Coin

Adaptive renderingAdaptive rendering Mobile controls and device adapters Mobile controls and device adapters

generate an appropriate rendering for generate an appropriate rendering for each device each device automaticallyautomatically

CustomisationCustomisation Programmatic model to customise the Programmatic model to customise the

rendering for a particular device.rendering for a particular device. Why?Why?

Page 10: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Building Mobile Web ApplicationsBuilding Mobile Web ApplicationsThe Adaptive Rendering ProcessThe Adaptive Rendering Process

1. HTTP1. HTTPrequestrequest

2. ASP.NET 2. ASP.NET processingprocessing

3. ASP.NET 3. ASP.NET resultresult

4. Adaptive4. Adaptive

responseresponse

Returned as Returned as proper browser proper browser protocolprotocol• HTMLHTML• cHTMLcHTML• WMLWML• XHTMLXHTML

Render ASPX Render ASPX pagepage• Process pageProcess page• Each control Each control builds its own builds its own layoutlayout

Discover Discover device device capabilitiescapabilities• Height and Height and widthwidth• ColorColor• ImagesImages• Phone call Phone call abilityability

Page 11: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

A Brief Aside…A Brief Aside…Cookieless SessionsCookieless Sessions

Session State no longer requires client Session State no longer requires client cookie support for SessionIDcookie support for SessionID Can optionally track SessionID in URLCan optionally track SessionID in URL

Requires no code changes to the Requires no code changes to the applicationapplication All relative links continue to workAll relative links continue to work

Page 12: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Cookieless SessionsCookieless SessionsHow To…How To…1.1. Create/Edit “web.config” file in the Create/Edit “web.config” file in the

vrootvroot

2.2. Add following text:Add following text:<configuration>

<system.web>

<sessionState cookieless=“true”/>

</system.web>

</configuration>

Page 13: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Adaptive RenderingAdaptive Rendering

Page 14: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Device Support – 200+ DevicesDevice Support – 200+ Devices

ACCESS Compact: ACCESS Compact: NetFront 2.0, Fujitsu F503i, Mitsubishi D502i, Mitsubishi D503i, NEC N210i, NetFront 2.0, Fujitsu F503i, Mitsubishi D502i, Mitsubishi D503i, NEC N210i, NEC N502i, Sony SO503iNEC N502i, Sony SO503i

Ericsson 2.0:Ericsson 2.0: Ericsson R380, Ericsson R320, Ericsson R520m, Ericsson T20s Ericsson R380, Ericsson R320, Ericsson R520m, Ericsson T20s GoAmerica Go.Web:GoAmerica Go.Web: Compaq iPAQ H3650, Palm Vx, RIM Blackberry 857, RIM Blackberry 950, Compaq iPAQ H3650, Palm Vx, RIM Blackberry 857, RIM Blackberry 950,

RIM Blackberry 957, RIM Blackberry 957, Microsoft Mobile Explorer:Microsoft Mobile Explorer: Sony CMD-Z5, Sony CMD-J5, Benefon Q, Sony CMD-Z5, Sony CMD-J5, Benefon Q, Microsoft Pocket Internet Explorer:Microsoft Pocket Internet Explorer: Casio Cassiopeia E-125, Compaq iPAQ H3630, Compaq Casio Cassiopeia E-125, Compaq iPAQ H3630, Compaq

iPAQ H3650, HP Jornada 720, Compaq iPAQ H3670iPAQ H3650, HP Jornada 720, Compaq iPAQ H3670 Nokia:Nokia: Nokia 3330, Nokia 6210, Nokia 7110, Nokia 9110i Nokia 3330, Nokia 6210, Nokia 7110, Nokia 9110i Openwave UP.Browser 3.x:Openwave UP.Browser 3.x: Audiovox CDM-9000, Ericsson R280LX, Hitachi C407H, Kyocera Audiovox CDM-9000, Ericsson R280LX, Hitachi C407H, Kyocera

QCP 2035A, Kyocera QCP 3035, LG V111, Mitsubishi T250, Motorola StarTAC 7868W, QCP 2035A, Kyocera QCP 3035, LG V111, Mitsubishi T250, Motorola StarTAC 7868W, Motorola TimePort P8767, Samsung SCH-6100, Samsung SCH-850, Samsung SCH-8500, Motorola TimePort P8767, Samsung SCH-6100, Samsung SCH-850, Samsung SCH-8500, Samsung UpRoar M100, Sanyo C401SA, Sanyo SCP-4500, Sanyo SCP-5000, Sprint Samsung UpRoar M100, Sanyo C401SA, Sanyo SCP-4500, Sanyo SCP-5000, Sprint Touchpoint, Sprint Touchpoint 2200, Sprint Touchpoint 3000Touchpoint, Sprint Touchpoint 2200, Sprint Touchpoint 3000

Openwave UP.Browser 4.x:Openwave UP.Browser 4.x: Alcatel One Touch 701, Audiovox CDM-135, Audiovox CDM-9100, Alcatel One Touch 701, Audiovox CDM-135, Audiovox CDM-9100, Motorola i1000plus, Motorola i2000plus, Motorola i50sx, Motorola i85s, Motorola T2288, Motorola i1000plus, Motorola i2000plus, Motorola i50sx, Motorola i85s, Motorola T2288, Motorola TimePort P7382i, Motorola TimePort P7389, Motorola V100, Motorola V120c, Motorola TimePort P7382i, Motorola TimePort P7389, Motorola V100, Motorola V120c, Motorola V2288, Motorola V60c, Siemens C35i, Siemens S35i, Siemens SL45Motorola V2288, Motorola V60c, Siemens C35i, Siemens S35i, Siemens SL45

Miscellaneous Browsers:Miscellaneous Browsers: Handspring Visor Platinum (Qualcomm Eudora Internet Suite 2.1; Handspring Visor Platinum (Qualcomm Eudora Internet Suite 2.1; Blazer 1.0 and Omnisky 2.1.0.15), IBM WorkPad c505 (ilinx Xiino 1.01J), Kyocera QCP 6035 Blazer 1.0 and Omnisky 2.1.0.15), IBM WorkPad c505 (ilinx Xiino 1.01J), Kyocera QCP 6035 (Qualcomm Eudora 2.0), Nokia 9210 (Symbian Crystal 6.0), Palm VII (MyPalm 1.0), Palm Vx (Qualcomm Eudora 2.0), Nokia 9210 (Symbian Crystal 6.0), Palm VII (MyPalm 1.0), Palm Vx (AU-Systems 2.12181.1 and Omnisky 2.0.04), Palm m505 (MyPalm 1.1), Panasonic P210i, (AU-Systems 2.12181.1 and Omnisky 2.0.04), Palm m505 (MyPalm 1.1), Panasonic P210i, Panasonic P502i, Sharp J-SH04 (Original Equipment Manufacturer's Version 3.0), Sharp Panasonic P502i, Sharp J-SH04 (Original Equipment Manufacturer's Version 3.0), Sharp Zaurus MI-E1 (Original Equipment Manufacturer's Version 6.1), Sony CLIE PEG-N700C (ilinz Zaurus MI-E1 (Original Equipment Manufacturer's Version 6.1), Sony CLIE PEG-N700C (ilinz Palmscape 4.0SJ), Toshiba J-T05 (Original Equipment Manufacturer's Version 3.0), Palmscape 4.0SJ), Toshiba J-T05 (Original Equipment Manufacturer's Version 3.0),

Page 15: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

IISIIS.NET Framework.NET Framework

Mobile Internet ToolkitMobile Internet ToolkitDevelopment Development EnvironmentEnvironment ProductionProduction

CreateCreate mobile Web Formmobile Web Form

IntegrateIntegrateBusiness LogicBusiness Logic

Mobile Mobile PresentationPresentation

Layer (controls)Layer (controls)

Test Test Target DevicesTarget Devices

Post toPost toWeb ServersWeb Servers

HTTPHTTPRequestRequest

DeviceDeviceCapabilitiesCapabilities

Mobile Controls Mobile Controls andand

Device AdaptersDevice Adaptersgenerate displaygenerate display

AddAddDevice AdaptersDevice Adapters

Update DeviceUpdate DeviceCapabilitiesCapabilities

HTTPHTTPResponseResponse

Mobile.aspxMobile.aspxPagesPages

The LifecycleThe Lifecycle

Page 16: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Customising for Particular Customising for Particular DevicesDevicesWhy?Why?

Optimise the generated renderingOptimise the generated rendering

Per device or class of devicePer device or class of device

Used on a per application basisUsed on a per application basis

Comparison- or Evaluator-based filtersComparison- or Evaluator-based filters

Control the exact display Control the exact display

Ability to override default behaviorAbility to override default behavior

Page 17: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Customisation - TemplatesCustomisation - TemplatesObjectList ControlObjectList Control

Header Header TemplateTemplate

Item TemplateItem Template

AlternateItemAlternateItemTemplateTemplate

FooterFooterTemplateTemplate

SeparatorSeparatorTemplateTemplate

Pocket PC CustomisationPocket PC Customisation

Cell Phone Limited Cell Phone Limited CustomisationCustomisation

ItemDetailsItemDetailsTemplateTemplate

DataBinder.Eval(((ObjectListItem)Container).DataItem, “FirstName”)

Page 18: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Using XML Web Services and Using XML Web Services and the Object Listthe Object List

Page 19: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Case Study: Tesco.comCase Study: Tesco.com

Re-use of existing skillsRe-use of existing skills Very rapid deliveryVery rapid delivery New business modelNew business model Increased customer Increased customer

satisfaction satisfaction and and profitabilityprofitability

Page 20: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Building Smart Device ApplicationsBuilding Smart Device ApplicationsVisual Studio .NET and Visual Studio .NET and .NET Compact Framework.NET Compact Framework

Common Language RuntimeCommon Language Runtime

Base Class LibrariesBase Class Libraries

ADO.NET and XMLADO.NET and XML

ASP.NETASP.NETWeb FormsWeb Forms

Web Web ServicesServices

WindowsWindowsFormsForms

VisualVisualBasicBasic C++C++ C#C# J#J# …… V

isu

al S

tud

io .N

ET

Vis

ual S

tud

io .N

ET

Smart Device Smart Device ProgrammabilitProgrammabilityy• Targets .NET Targets .NET Compact Compact FrameworkFramework• Integrated IDEIntegrated IDE• EmulatorsEmulators• Remote Remote debuggingdebugging

.NET Compact .NET Compact FrameworkFramework• Managed codeManaged code• Web servicesWeb services• Rich subset Rich subset of .NET of .NET Framework Class Framework Class LibrariesLibraries

Page 21: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Execution Engine OverviewExecution Engine Overview

Verifiable type safe executionVerifiable type safe execution

Garbage collectionGarbage collection

JIT compilationJIT compilation

Error handling with exceptionsError handling with exceptions

Common type systemCommon type system

Platform InvocationPlatform Invocation

Page 22: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

XML Web Services SupportXML Web Services Support

Calling XML Web servicesCalling XML Web services

All encoding typesAll encoding types

Synchronous and asynchronous invocationSynchronous and asynchronous invocation

Basic and Digest authenticationBasic and Digest authentication

Secure Sockets Layer support for encryption Secure Sockets Layer support for encryption

(SSL)(SSL)

Custom SOAP headersCustom SOAP headers

SOAP Extension FrameworkSOAP Extension Framework

Page 23: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Building Smart Device AppsBuilding Smart Device Apps Remote DebuggingRemote Debugging

Same user experience as desktopSame user experience as desktop Compile application for deviceCompile application for device Automatically deploys to selected device Automatically deploys to selected device Output Window used for deployment messagesOutput Window used for deployment messages

Supported features includeSupported features include On-device debuggingOn-device debugging BreakpointsBreakpoints Multi-language debuggingMulti-language debugging Call Stack, Watch windowsCall Stack, Watch windows Command window – ImmediateCommand window – Immediate

Page 24: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

A Simple Compact Framework A Simple Compact Framework ApplicationApplication

Tim Sneath
Replace "Demonstration Title" with a title for the demonstration.
Page 25: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Building Smart Device Applications Building Smart Device Applications SQL ServerSQL Server™™ Windows Windows®® CE Edition 2.0 CE Edition 2.0

On-device data engine for Windows CE-On-device data engine for Windows CE-powered devicespowered devices

Rich replication and synchronisation Rich replication and synchronisation with SQL Serverwith SQL Server

Designed for high performance in Designed for high performance in resource-constrained environmentsresource-constrained environments

Managed .NET Compact Framework Managed .NET Compact Framework providerprovider

Page 26: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

OLEDB CEOLEDB CE

CLR / .NET CFCLR / .NET CF

QP/Cursor Engine/ES QP/Cursor Engine/ES

Data Access Storage ArchitectureData Access Storage Architecture

Client Client Agent: Agent:

ReplicatiReplicationon

andandRDARDA

OLEDB / OLEDB / Replication APIReplication API

IISIIS

CLIENTCLIENTSERVERSERVER

Storage Engine / Repl Storage Engine / Repl TrackingTracking

SQL CE Edition v2.0SQL CE Edition v2.0

OLEDBOLEDB

OLEDBOLEDB

Server Server Agent: Agent:

ReplicatiReplicationon

andandRemote Remote

Data Data AccessAccess

HTTPHTTP

XML/BizTalk/CS 2002XML/BizTalk/CS 2002

802.11b,802.11b,Cellular Digital Packet Cellular Digital Packet Data,Data,Global System Mobile Global System Mobile Comms,Comms,Code Division Multiple Code Division Multiple Access,Access, Time Division Multiple Time Division Multiple Access,Access,

etc.etc.

DataCentreDataCentre

SQL Server SQL Server CE Data CE Data ProviderProvider

Data ProviderData Provider

SQL Server SQL Server Client Data Client Data Provider Provider

ADO.NETADO.NET

VS .NET (VB.NET, C#)VS .NET (VB.NET, C#)..NET CF / ManagedNET CF / Managed

StackStack

TDSTDS

EthernetEthernet

Well Well ConnectConnect

eded

Occasionally Occasionally ConnectedConnected

Page 27: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Setting up ReplicationSetting up Replication

Create a Publication in SQL ServerCreate a Publication in SQL Server

Configure a virtual root using the SQL CE Configure a virtual root using the SQL CE toolstools

Create a subscription database on the smart Create a subscription database on the smart devicedevice Use the Use the SqlCeReplicationSqlCeReplication class class

Create a subscription to the published dataCreate a subscription to the published data Call .AddSubscriptionCall .AddSubscription

Call .SynchronizeCall .Synchronizehttp://smartdevices.microsoftdev.com/Learn/Articles/619.aspxhttp://smartdevices.microsoftdev.com/Learn/Articles/619.aspx

Page 28: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Synchronising off-line data:Synchronising off-line data:The “IBuySpy Delivery” The “IBuySpy Delivery” applicationapplication

Tim Sneath
Replace "Demonstration Title" with a title for the demonstration.
Page 29: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

New MSDN Articles: Compact FrameworkNew MSDN Articles: Compact Framework

Accessing Phone APIs from the Microsoft .NET Compact FrameworkAccessing Phone APIs from the Microsoft .NET Compact Frameworkhttp://http://msdn.microsoft.com/library/default.asp?urlmsdn.microsoft.com/library/default.asp?url=/library/en-us/=/library/en-us/dnnetcomp/html/netcfPhoneAPI.aspdnnetcomp/html/netcfPhoneAPI.asp

Obfuscating Smart Device ApplicationsObfuscating Smart Device Applicationshttp://http://msdn.microsoft.com/library/default.asp?urlmsdn.microsoft.com/library/default.asp?url=/library/en-us/=/library/en-us/dnnetcomp/html/netcfObfuscation.aspdnnetcomp/html/netcfObfuscation.asp

Marshalling Types During Platform Invoke on the Microsoft .NET Marshalling Types During Platform Invoke on the Microsoft .NET

Compact FrameworkCompact Frameworkhttp://http://msdn.microsoft.com/library/default.asp?urlmsdn.microsoft.com/library/default.asp?url=/library/en-us/=/library/en-us/dnnetcomp/html/netcfMarshallingTypes.aspdnnetcomp/html/netcfMarshallingTypes.asp

Microsoft .NET Compact Framework Multi-threading TipsMicrosoft .NET Compact Framework Multi-threading Tipshttp://http://msdn.microsoft.com/library/default.asp?urlmsdn.microsoft.com/library/default.asp?url=/library/en-us/=/library/en-us/dnnetcomp/html/netcfMultiThreadedApp.aspdnnetcomp/html/netcfMultiThreadedApp.asp

Writing Unmanaged Functions for Microsoft .NET Compact Framework-based Writing Unmanaged Functions for Microsoft .NET Compact Framework-based ApplicationsApplications

http://http://msdn.microsoft.com/library/default.asp?urlmsdn.microsoft.com/library/default.asp?url=/library/en-us/=/library/en-us/dnnetcomp/html/unmanagedFuncs.aspdnnetcomp/html/unmanagedFuncs.asp

Programming Merge Replication with the Microsoft .NET Compact FrameworkProgramming Merge Replication with the Microsoft .NET Compact Frameworkhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfMergeReplication.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfMergeReplication.asp

Microsoft .NET Compact Framework-based DateTimePicker ControlMicrosoft .NET Compact Framework-based DateTimePicker Controlhttp://http://msdn.microsoft.com/library/default.asp?urlmsdn.microsoft.com/library/default.asp?url=/library/en-us/=/library/en-us/dnnetcomp/html/netcfDateTimePicker.aspdnnetcomp/html/netcfDateTimePicker.asp

Page 30: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Mobile Application ApproachesMobile Application Approaches Architectural AdvantagesArchitectural Advantages

Offline functionalityOffline functionality Local executionLocal execution Local dataLocal data

Rich user experienceRich user experience MultimediaMultimedia Elaborate UIElaborate UI

Integration with assets Integration with assets on the deviceon the device Credit card readersCredit card readers Barcode scannersBarcode scanners GPS receiversGPS receivers

Adaptive renderingAdaptive rendering Dynamic support for Dynamic support for

many device/browser many device/browser combinationscombinations

Support for low-end Support for low-end browser devicesbrowser devices

Single code baseSingle code base Simplified maintenanceSimplified maintenance Natural extension to Natural extension to

existing Web sitesexisting Web sites

Server-side executionServer-side execution No client deploymentNo client deployment No client executionNo client execution

Advantages of mobile Web appsAdvantages of mobile Web apps Advantages of smart device appsAdvantages of smart device apps

Page 31: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Architecture GuidanceArchitecture GuidanceMicrosoft patterns and practicesMicrosoft patterns and practices

ProvenProven Based on field and partner experienceBased on field and partner experience

AuthoritativeAuthoritative Best advice availableBest advice available

AccurateAccurate Technically validated and testedTechnically validated and tested

ActionableActionable Provide the steps to successProvide the steps to success

RelevantRelevant Address real world scenariosAddress real world scenarios

Available onlineAvailable online http://www.microsoft.com/practiceshttp://www.microsoft.com/practices

Page 32: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

No-Touch DeploymentNo-Touch DeploymentPatterns and Practices Self-UpdatePatterns and Practices Self-Update

1.01.0

AppStart.exeAppStart.exe

MyAppMyApp

1.11.1

AppStart.exeAppStart.exe

AppStart.configAppStart.config

MyApp V1 MyApp V1 DomainDomain

Web ServerWeb Server

Check manifestCheck manifestfor updatesfor updates

Download updatesDownload updatesusing BITSusing BITS

MyApp V1.1 MyApp V1.1 DomainDomain

HTTPHTTP

Page 33: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Patterns and Practices Patterns and Practices Online/OfflineOnline/Offline

Application XML Web

service

Smart Client ApplicationSmart Client Application

Offline Application BlockOffline Application Block

ServiceServiceAgentAgent

ManagementManagement

ConnectionConnectionStateState

ManagementManagement

ReferenceReferenceDataData

ManagementManagement

MessageMessageDataData

ManagementManagement

Page 34: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Connection DetectionConnection Detection

UI LayerUI Layer(view)(view)

ConnectionConnectionManagerManager(model)(model)

ControllerControllerConnectionConnectionDetectionDetectionStrategyStrategy

CreateCreatess

Registers for Registers for notification notification fromfrom

UtilizesUtilizes

DetermineDetermines Physical s Physical ConnectioConnection n PresencePresence

State State Changed: Changed: Going Going OfflineOffline

ServiceAgent

ConnState

RefData

MessageData

Page 35: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

The Other End of the Spectrum - The Other End of the Spectrum - Tablet PCTablet PC

Windows XP Tablet PC EditionWindows XP Tablet PC Edition Windows XP ProfessionalWindows XP Professional Windows Journal UtilityWindows Journal Utility Handwriting Reco EngineHandwriting Reco Engine Text Input PanelText Input Panel Speech Reco Engine Speech Reco Engine Sticky NotesSticky Notes Gesture APIs Gesture APIs Gesture Reco engine Gesture Reco engine Stylus DriversStylus Drivers Ink ControlsInk Controls

Home Pro MediaCenter

TabletPC

Tablet PC code

Media Center code

Professional code

Home code

Page 36: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

InkInk Ink as InkInk as Ink

Ink is not a bitmapInk is not a bitmap Serialise asSerialise as

Binary (ISF)Binary (ISF) XMLXML ImageImage RTF (Clipboard)RTF (Clipboard)

Always stored as InkAlways stored as Ink

Use the Ink CollectorUse the Ink Collector

Ink as TextInk as Text Controls convert inputControls convert input

Input saved as textInput saved as text

Page 37: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

ControlsControls

InkEditInkEdit Super-class of Rich Edit controlSuper-class of Rich Edit control Win32, .NET, ActiveX versionsWin32, .NET, ActiveX versions Intended for text and ink-to-text scenarios Intended for text and ink-to-text scenarios Works well in Forms scenariosWorks well in Forms scenarios

InkPictureInkPicture Similar to InkCollectorSimilar to InkCollector Allows ink annotations on images in .jpg, .bmp, .png, or .gif Allows ink annotations on images in .jpg, .bmp, .png, or .gif

formatformat .NET, ActiveX version.NET, ActiveX version

Can be hosted in WinForms or IECan be hosted in WinForms or IE

Page 38: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

Understanding GesturesUnderstanding Gestures What is a gesture? What is a gesture?

Anything you can do with a penAnything you can do with a pen Similar to keyboard shortcuts – e.g. ”Ctrl C”Similar to keyboard shortcuts – e.g. ”Ctrl C”

System GesturesSystem Gestures Gestures supported by the Operating System by defaultGestures supported by the Operating System by default

To be notified subscribe to the ‘SystemGesture’ eventTo be notified subscribe to the ‘SystemGesture’ event 14 gestures, examples: Tap, Double-tap, Drag14 gestures, examples: Tap, Double-tap, Drag

Application GesturesApplication Gestures Gestures your application can choose to supportGestures your application can choose to support To be notifiedTo be notified

Subscribe to the ‘Gesture’ eventSubscribe to the ‘Gesture’ event Advise the platform of the specific gestures your app wantsAdvise the platform of the specific gestures your app wants

38 gestures, examples: Scratchout, Scroll up, Scroll down38 gestures, examples: Scratchout, Scroll up, Scroll down Gestures have confidence levelsGestures have confidence levels

Page 39: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

The Tablet PC SDK:The Tablet PC SDK:ControlsControlsGesturesGestures

Tim Sneath
Replace "Demonstration Title" with a title for the demonstration.
Page 40: Building.NET Mobile Applications Mike Pelton MPelton@microsoft.com Developer & Platform Group Microsoft Ltd

© 2003 Microsoft Limited. All rights reserved.© 2003 Microsoft Limited. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summaryThis presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary..