building effective enterprise mobile applications nick randolph development manager autumncare...

80
Building Effective Building Effective Enterprise Mobile Enterprise Mobile Applications Applications Nick Randolph Nick Randolph Development Manager Development Manager AutumnCare AutumnCare Microsoft MVP - .NET CF Microsoft MVP - .NET CF CLI309

Upload: phillip-obrien

Post on 23-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Building Effective Building Effective Enterprise Mobile Enterprise Mobile ApplicationsApplications

Nick RandolphNick RandolphDevelopment ManagerDevelopment ManagerAutumnCareAutumnCareMicrosoft MVP - .NET CFMicrosoft MVP - .NET CF

CLI309

AgendaAgenda

Session FocusSession Focus““Enterprise” Mobile Software (EMS)Enterprise” Mobile Software (EMS)

AgendaAgendaEnterprise Mobile ArchitectureEnterprise Mobile ArchitectureMicrosoft Mobility RoadmapMicrosoft Mobility RoadmapNew Features in Visual Studio 2005 for EMSNew Features in Visual Studio 2005 for EMS

Development ToolDevelopment ToolCompact Framework 2.0Compact Framework 2.0SQL Sever 2005 and it’s mobile versionSQL Sever 2005 and it’s mobile version

Tips, Tricks and Guidance on Building EMSTips, Tricks and Guidance on Building EMSPrescriptive GuidancePrescriptive Guidance

ResourcesResources

Audience ProfileAudience Profile

Who has written mobile apps before?Who has written mobile apps before?

Who has written production Microsoft Who has written production Microsoft Mobile Application?Mobile Application?

Who has worked with Compact Who has worked with Compact Framework v1.1?Framework v1.1?

Who’s looking at Mobile application Who’s looking at Mobile application development for the first time?development for the first time?

Enterprise Mobile ArchitectureEnterprise Mobile Architecture

What is Mobile?What is Mobile?Away from the desk out of the officeAway from the desk out of the officeOn the road travelingOn the road travelingOn the factory floor – always movingOn the factory floor – always movingEngaging face to face with your Engaging face to face with your customerscustomers

What is Mobile Software?What is Mobile Software?A device in your hands that helps you with A device in your hands that helps you with your processyour processE.g. Capturing data, looking up dataE.g. Capturing data, looking up dataDoesn’t mean wireless!Doesn’t mean wireless!Concept of offline/onlineConcept of offline/online

What is Mobile Software?What is Mobile Software?

Why develop mobile software?Why develop mobile software?Information/data at your fingertipsInformation/data at your fingertips

Make decisions on the spotMake decisions on the spot

Perform your process on the spotPerform your process on the spot

What make mobile software What make mobile software “Enterprise” mobile software“Enterprise” mobile software

Access and integration to enterprise Access and integration to enterprise information and software assetsinformation and software assets

E.g. Lookup: Customer, Product and Stock E.g. Lookup: Customer, Product and Stock informationinformation

E.g. Capture Data: New Customer Order, E.g. Capture Data: New Customer Order, Customer Visit information Customer Visit information

Why Mobile Software?Why Mobile Software?

Reduce paper costs Reduce paper costs

Reduce communication costsReduce communication costs

Processes automationProcesses automation

Increase ProductivityIncrease Productivity

Increase Service turn aroundIncrease Service turn around

It is fundamentally about:It is fundamentally about:Saving costsSaving costs

Making more moneyMaking more money

Capturing data more efficientlyCapturing data more efficiently

Providing data back more efficientlyProviding data back more efficiently

The Benefits of Mobile SoftwareThe Benefits of Mobile Software

CouriersCouriersDispatch, Pickup and SignDispatch, Pickup and Sign

Territory ManagersTerritory ManagersView products/stock, Place ordersView products/stock, Place orders

Auditors/InsuranceAuditors/InsuranceComplete audits, print report & quotesComplete audits, print report & quotes

TouristsTouristsWhy can I find information about places in Why can I find information about places in this city?this city?

Usage ExamplesUsage Examples

What problem(s) are you trying to What problem(s) are you trying to solve?solve?

What system(s) are involved?What system(s) are involved?

What data do you need from these What data do you need from these systems?systems?

How will you secure your mobile How will you secure your mobile system?system?

How will you connect your mobile How will you connect your mobile users?users?

Some Thoughts on Design Goals for Some Thoughts on Design Goals for MobileMobile

What is Mobile Software?What is Mobile Software?

ArchitecturesArchitectures Real Time vs. SynchronizedReal Time vs. Synchronized

TelecommunicationsTelecommunications

DevicesDevices System IntegrationSystem Integration

Why is Mobile Software Unique?Why is Mobile Software Unique?

You can’t always trust the mobile networkYou can’t always trust the mobile network

Devices have limited foot printsDevices have limited foot prints

Languages and development Languages and development environments are often proprietaryenvironments are often proprietary

ButButYou still need good software designYou still need good software design

You still need good software architecturesYou still need good software architectures

The Spectrum of ArchitecturesThe Spectrum of Architectures

In mobile it’s all about transactionsIn mobile it’s all about transactions

But how do you do these transactions?But how do you do these transactions?

Real TimeReal TimeReal time over a permanent networkReal time over a permanent network

Process Data in Real timeProcess Data in Real time

Otherwise known as “Always Connected”Otherwise known as “Always Connected”

SynchronisedSynchronisedProcess and store data on the deviceProcess and store data on the device

Synchronise when neededSynchronise when needed

Otherwise know as “Cached”Otherwise know as “Cached”

Real Time ArchitecturesReal Time Architectures

ProsProsInformation is always up to dateInformation is always up to date

Data gets processed in the backend fasterData gets processed in the backend faster

ConsConsPoorer user experience on low bandwidth Poorer user experience on low bandwidth networks. networks.

Doesn’t cope well with large amounts of Doesn’t cope well with large amounts of datadata

Working ExamplesWorking ExamplesWarehouse Management SystemsWarehouse Management Systems

High Bandwidth / Discrete TransactionsHigh Bandwidth / Discrete Transactions

Synchronized ArchitecturesSynchronized ArchitecturesProsPros

Good for dealing with unreliable networksGood for dealing with unreliable networksData is either synchronised or not Data is either synchronised or not Only changes are synchronised Only changes are synchronised User experience is much fasterUser experience is much fasterUser does not need to be online to processUser does not need to be online to process

ConsConsData can become stale if synchronisation does Data can become stale if synchronisation does not often enoughnot often enoughData is pumped into backend system “batch Data is pumped into backend system “batch based”based”

Working ExamplesWorking ExamplesSales Force applicationsSales Force applicationsRoute Management applicationsRoute Management applicationsAnything with large amounts of reference dataAnything with large amounts of reference data

Smart ClientsSmart ClientsRun locally on the deviceRun locally on the deviceUses local processing powerUses local processing powerUses local resourcesUses local resourcesUI rendered on the deviceUI rendered on the deviceReal time / Synchronized applicationsReal time / Synchronized applicationsKey focus for Enterprise Mobile SoftwareKey focus for Enterprise Mobile Software

Mobile Web ApplicationsMobile Web ApplicationsServer Side execution – HTML, WAP etcServer Side execution – HTML, WAP etcRenders to specific device capability Renders to specific device capability UI rendered on the serverUI rendered on the serverReal time applications onlyReal time applications only

Types of Mobile ApplicationsTypes of Mobile Applications

Multi-device applications issuesMulti-device applications issues• Different form factorsDifferent form factors

• Different device capabilitiesDifferent device capabilities

• Different browser standardsDifferent browser standards

Local CodeLocal CodeMobile Web PagesMobile Web Pages

Types of Mobile Application ContinuedTypes of Mobile Application Continued

Device Operating SystemDevice Operating System

Mobile Web Mobile Web BrowserBrowser

Cross platform issuesCross platform issues• Different platformsDifferent platforms

• Different APIsDifferent APIs

• Different languagesDifferent languages

What about writing for multiple devices?What about writing for multiple devices?

Low end mobile phones & pagersLow end mobile phones & pagers

Smart DevicesSmart Devices

Full Computer ExperienceFull Computer Experience

Device separated according to Device separated according to Processor Ability Processor Ability

Memory / Storage CapacityMemory / Storage Capacity

User input methodsUser input methods

Mobile Application DevicesMobile Application Devices

Mobile Application DevicesMobile Application DevicesLow End - Mobile Web ExperienceLow End - Mobile Web Experience

Mobile Phones and PagersMobile Phones and Pagers

Micro browsersMicro browsersWAP, HTML, XML, cHTMLWAP, HTML, XML, cHTML

Key based user inputKey based user input

Many different devicesMany different devices

Mobile Application DevicesMobile Application DevicesSmart DevicesSmart Devices

Application on DeviceApplication on Device

Stylus InputStylus Input

Online/Offline CapabilityOnline/Offline Capability

Local processing powerLocal processing power

Mobile Application DevicesMobile Application DevicesFull PC ExperienceFull PC Experience

Full processing powerFull processing power

Full screen displayFull screen display

Tablet PC / LaptopTablet PC / Laptop

Build your architectures to support Build your architectures to support TCP/IPTCP/IP

And you can use any of these And you can use any of these technologies!technologies!

But test, test, test!But test, test, test!Synchronized architectures work better Synchronized architectures work better over slower connectionsover slower connectionsReal time architectures tend to need faster Real time architectures tend to need faster connections for good user experience.connections for good user experience.Always check for timeoutsAlways check for timeoutsApplications need to handle “no network” Applications need to handle “no network” gracefullygracefully

TelecommunicationsTelecommunications

All this data is great but what about?All this data is great but what about?Integrating to / from existing systems? Integrating to / from existing systems?

Where does the data go?Where does the data go?

Where do you need to get data from?Where do you need to get data from?

ExamplesExamplesWhere is your master customer list?Where is your master customer list?

Where do your mobile orders get Where do your mobile orders get processed?processed?

System IntegrationSystem Integration

Fully integrated vs. Print-outsFully integrated vs. Print-outs

System Integration can make or break a System Integration can make or break a mobile applicationmobile application

Concept of a central mobile databaseConcept of a central mobile databaseMerge all information required for devices Merge all information required for devices into one placeinto one place

Consolidate all mobile data captured into Consolidate all mobile data captured into one place and integrate back in one goone place and integrate back in one go

Shouldn’t matter whether synchronized Shouldn’t matter whether synchronized or real time architectureor real time architecture

System IntegrationSystem Integration

Design IssuesDesign Issues

User Interface is critical User Interface is critical For user adoptionFor user adoption

Must be simple yet powerfulMust be simple yet powerful

Data resilience is imperativeData resilience is imperativeSynchronisation must be seamlessSynchronisation must be seamless

It either works or it doesn’t with nothing in It either works or it doesn’t with nothing in betweenbetween

Data partitioning simplifies overheadsData partitioning simplifies overheadsDeliver data to the users that need itDeliver data to the users that need it

Design Issues cont.Design Issues cont.

Data partitioningData partitioninge.g. don’t get every sales person every e.g. don’t get every sales person every other sales person’s clientsother sales person’s clients

This is horizontal partitioning. This is horizontal partitioning.

Each mobile device has only the data it Each mobile device has only the data it needsneeds

Static (All) vs. Static (Personal)Static (All) vs. Static (Personal)

Vertical partitioning is about only pushing Vertical partitioning is about only pushing the data types on need on a devices the data types on need on a devices

Always determine how much data you Always determine how much data you need and not more.need and not more.

ScalabilityScalability

To support thousands of users you must To support thousands of users you must considerconsider

Network / telecoms usage for all your usersNetwork / telecoms usage for all your users

Multiple synchronisation points Multiple synchronisation points

Over the air update frameworksOver the air update frameworks

Data storage capacityData storage capacity

Keep your audit logs smallKeep your audit logs small

Seamless DeploymentSeamless Deployment

Seamless SynchronisationSeamless SynchronisationOne ButtonOne Button

Incorporate over–the–air updatesIncorporate over–the–air updates

Removable Media Card InstallRemovable Media Card Installe.g. Secure Digital, Compact Flashe.g. Secure Digital, Compact Flash

Lower network costsLower network costs

Enterprise Device Deployment ToolEnterprise Device Deployment Tool

Data IntegrityData Integrity

Data SynchronisationData SynchronisationInitialisation Initialisation

Delta based updatesDelta based updates

A synchronisation is transactionalA synchronisation is transactionalEither works or not!Either works or not!

Test power failure scenariosTest power failure scenarios

Reinitialise data over the air if requiredReinitialise data over the air if required

Microsoft Mobility RoadmapMicrosoft Mobility Roadmap

What do we need? - ConceptsWhat do we need? - Concepts

Online/Offline CapabilityOnline/Offline CapabilityOffline – Replicated Data (Main Function)Offline – Replicated Data (Main Function)

Online – Real time LookupsOnline – Real time Lookups

SecuritySecuritySecurity access through firewall tunnelSecurity access through firewall tunnel

ScalabilityScalabilityThe ability to scale to 1000s of usersThe ability to scale to 1000s of users

Integrated ApproachIntegrated ApproachConsolidate data to/from Backend SystemsConsolidate data to/from Backend Systems

What do we need? - LayersWhat do we need? - Layers

User Interface LayerUser Interface Layer

Telecommunications LayerTelecommunications Layer

Application / Web ServerApplication / Web Server

Data RepositoryData Repository

Integration LayerIntegration Layer

Backend SystemsBackend Systems

Physical ArchitecturePhysical Architecture

Users IntegrationMiddleware

Windows2003

Mobile

Mobile Laptop

TabletPC

SmartPhone

Backend Systems

OtherSystems

Database andInformation

Repositories

Core Systems, ERP, CRM etc

Data Repository

SQL Server 2000 BizTalk

Application / WebServer

Web Service

Telecoms Layer

The Template EMSThe Template EMS

Client Application – online/offlineClient Application – online/offlineCompact Framework for a rich applicationCompact Framework for a rich application

SQL Server Mobile + ReplicationSQL Server Mobile + Replication

Web Services for Real timeWeb Services for Real time

SQL Server for Centralised Data storeSQL Server for Centralised Data store

Real time InformationReal time InformationWeb ServicesWeb Services

Repository for Mobile DataRepository for Mobile DataSQL ServerSQL Server

System IntegrationSystem IntegrationSQL Server to Backend via Microsoft BizTalk ServerSQL Server to Backend via Microsoft BizTalk Server

MManagementanagementTToolsools

CCommunicationsommunications& & MMessagingessaging

Device Update Agent

Software Update Services

Live Communications Server

Exchange Server

Internet Security and Acceleration Server

Speech Server

Image Update

LLocation ocation SServiceservices

MMultimediaultimedia

MapPoint

DirectX

Windows Media

Visual Studio 2005DDevelopment evelopment TToolsools

MFC 8.0, ATL 8.0

Win32NNativeative

MManagedanaged

SServer erver SSideide

LLightweightightweight

RRelationalelationalSQL Server 2005 Express EditionEDB

DDa

taata

PPro

gra

mm

ing

ro

gra

mm

ing

MM

od

el

od

el

DDevice evice BBuilding uilding TToolsools

HHardware/ardware/DDriversrivers

Windows XP DDK

Windows Embedded Studio

Platform Builder

OEM/IHV SuppliedBSP

(ARM, SH4, MIPS)OEM Hardware and Standard Drivers

Standard PC Hardware and Drivers

SQL Server 2005SQL Server 2005 Mobile Edition

ASP.NET Mobile Controls ASP.NET

.NET Compact Framework .NET Framework

Microsoft Operations Manager

Systems Management Server

New Features in Visual Studio New Features in Visual Studio 2005 for Enterprise Mobile 2005 for Enterprise Mobile SoftwareSoftware

OverviewOverviewTalking about new featuresTalking about new features

Enterprise FocusedEnterprise FocusedEverything in Visual Studio 2003 would require Everything in Visual Studio 2003 would require another session!another session!

Development ToolsDevelopment ToolsVisual Studio 2005Visual Studio 2005Previously Visual Studio 2003Previously Visual Studio 2003

Client ArchitectureClient Architecture.NET Compact Framework 2.0.NET Compact Framework 2.0Previous 1.1 in Visual Studio 2003Previous 1.1 in Visual Studio 2003Libraries across Display, Layout, Controls, Libraries across Display, Layout, Controls, NetworkingNetworking

Data ArchitectureData ArchitectureSQL Mobile 2005SQL Mobile 2005Previous SQL CE 2.0 (VS2003, SQL2K3) Previous SQL CE 2.0 (VS2003, SQL2K3)

Visual Studio 2005 for DevicesVisual Studio 2005 for DevicesVisual Studio 2005Visual Studio 2005

Enhanced project wizard Enhanced project wizard Target Pocket PC or Target Pocket PC or

SmartphoneSmartphone

Enhanced designersEnhanced designers

Emulator supportEmulator supportBased on ARM processorBased on ARM processor

Save multiple statesSave multiple states

Visual Studio 2005 for DevicesVisual Studio 2005 for DevicesVisual Studio 2005Visual Studio 2005

CAB and Setup projectsCAB and Setup projects

Integrated device and Integrated device and

Emulator debuggingEmulator debugging

Remote toolsRemote toolsProcess viewer, file Process viewer, file

viewer, Heap walker, viewer, Heap walker,

and more…and more…

DemonstrationDemonstration

Visual Studio 2005 Development Visual Studio 2005 Development EnvironmentEnvironment

SkinsSkins

New Device ManagerNew Device Manager

EmulatorsEmulators

.NET CF 2.0.NET CF 2.0Compatibility and PerformanceCompatibility and Performance

Think of .NET CF 2.0 of a superset Think of .NET CF 2.0 of a superset of .NET CF 1.0of .NET CF 1.0

Compatible with full .NET FrameworkCompatible with full .NET FrameworkInteroperability – Type must be in .NET CFInteroperability – Type must be in .NET CF

Protocols – Web Services, Datasets etcProtocols – Web Services, Datasets etc

Compatible with .NET CF 1.0Compatible with .NET CF 1.0Side-by-side executionSide-by-side execution

Application compatibilityApplication compatibility

Essentially separate frameworksEssentially separate frameworks

.NET CF 2.0.NET CF 2.0Compatibility and Performance Cont.Compatibility and Performance Cont.

Enhanced performanceEnhanced performanceUnified JIT for All processorsUnified JIT for All processors

2 in .NET CF 1.02 in .NET CF 1.0

Improved string handlingImproved string handlingString Class, StringBuilderString Class, StringBuilder

XML improvementsXML improvementsXMLTextReader, XMLTextWriter – Faster than XMLTextReader, XMLTextWriter – Faster than XMLDocumentXMLDocument

XMLSerializationXMLSerialization

Improved ADO.NET with SQL MobileImproved ADO.NET with SQL MobileSQLCEResultSet – Direct Scrollable CursorSQLCEResultSet – Direct Scrollable Cursor

.NET CF 1.0.NET CF 1.0

.NET CF .NET CF 2.02.0

.NET Compact Framework 2.0.NET Compact Framework 2.0Displays and LayoutDisplays and Layout

Orientation supportOrientation supportDocking and anchoringDocking and anchoring

AutoScroll property – forms, panelsAutoScroll property – forms, panels

ChangeOrientation – portrait or ChangeOrientation – portrait or landscapelandscape

Resolution supportResolution supportAutomatic scalingAutomatic scaling

Lo to Hi Res ScreensLo to Hi Res Screens

Graphics Graphics DpiXDpiX

DpiYDpiY

.NET Compact Framework 2.0.NET Compact Framework 2.0New Windows Forms ControlsNew Windows Forms Controls

DateTimePickerDateTimePicker

MonthCalendarMonthCalendar

DocumentListDocumentList

LinkLabelLinkLabel

NotificationNotification

HelpHelp

WebBrowserWebBrowser

.NET Compact Framework 2.0 .NET Compact Framework 2.0 System.Drawing NamespaceSystem.Drawing Namespace

BitmapsBitmapsAccess Bitmap PixelsAccess Bitmap Pixels

Bitmap.LockBits(…)Bitmap.LockBits(…)

Better Image SupportBetter Image SupportImage.Save(…)Image.Save(…)png, jpg, bmp, tif, gifpng, jpg, bmp, tif, gif

Bitmap pattern brushesBitmap pattern brushesDrawing Images on ContainersDrawing Images on Containers

Direct 3D support in Visual Studio Direct 3D support in Visual Studio 20052005

.NET Compact Framework 2.0 .NET Compact Framework 2.0 System.Xml NamespaceSystem.Xml Namespace

Improved performanceImproved performance

Schema validation supportSchema validation supportXSDXSD

No DTD or XDR Validation SupportNo DTD or XDR Validation Support

Static creation methods for Static creation methods for XmlTextReader and XmlTextWriterXmlTextReader and XmlTextWriter

XML searching and processing XML searching and processing through XPaththrough XPath

XmlSerializationXmlSerialization

.NET Compact Framework 2.0 .NET Compact Framework 2.0 System.Messaging NamespaceSystem.Messaging Namespace

Support for message queuingSupport for message queuingSend and receive messagesSend and receive messages

Inter-application communication without Inter-application communication without a live connectiona live connection

Communication using unreliable Communication using unreliable connectionsconnections

Administer, connect, and monitor Administer, connect, and monitor network message queuesnetwork message queues

• Enhanced VB.NET features– "My" namespace support

• Enhanced C# features– Iterators– Anonymous methods

• Cross language features– Generics– Partial classes

.NET Compact Framework 2.0 .NET Compact Framework 2.0 Language and Runtime SupportLanguage and Runtime Support

Future Windows Mobile PlatformFuture Windows Mobile PlatformKey FeaturesKey Features

• Enhanced services and device support– Messaging – SMS, POOM, and telephony– Notifications – signal, battery,

connections– Location and Camera APIs

• Peripherals support– Microdrvs, cameras, keyboards, second

displays

• Not part of the core .NET CF 2.0– APIs embedded in operating system – Accessed through forthcoming SDK

Notifications Broker Notifications Broker

Access to Important events that may Access to Important events that may occur on the device.occur on the device.

Centralized publish and subscribe Centralized publish and subscribe mechanism mechanism

Store as well as detect the state of a Store as well as detect the state of a device an application, or a service. device an application, or a service.

Easier access via managed object Easier access via managed object model. model.

State and Notifications Broker State and Notifications Broker Development ScenariosDevelopment Scenarios

Register for notifications Register for notifications You choose the notifications to which you respondYou choose the notifications to which you respond

ExamplesExamplesConnect to a server when GPRS is availableConnect to a server when GPRS is availableInitiate a synchronization event Initiate a synchronization event

When fast connectivity is availableWhen fast connectivity is available

Synchronize offline storeSynchronize offline storeWhen device is cradledWhen device is cradled

Persist application settings across sessionsPersist application settings across sessionsRespond to low battery notificationRespond to low battery notificationSchedule device management behaviorSchedule device management behavior

Create custom notification eventsCreate custom notification events

Networking SupportNetworking Support

SocketsSocketsSynchronous and Synchronous and asynchronousasynchronousMultiple protocolsMultiple protocols

StreamsStreamsBuilt on top Built on top of socketsof sockets

HTTP request HTTP request and responseand response

Use stream modelUse stream modelRequires no user Requires no user knowledge of HTTPknowledge of HTTP

Common Language RuntimeCommon Language Runtime

.NET Compact Framework.NET Compact Framework

Web ServicesWeb Services

HTTP Req/Resp, Network StreamHTTP Req/Resp, Network Stream

SocketsSockets

ApplicationsApplications

Data Access – SQL ServerData Access – SQL Server

Direct SQL Server AccessDirect SQL Server Access

Local SQL Mobile AccessLocal SQL Mobile Access

ADO.NET Providers included with .NET ADO.NET Providers included with .NET CFCF

System.Data.SqlClientSystem.Data.SqlClient

System.Data.SqlServerCeSystem.Data.SqlServerCe

Data AccessData AccessDirect Database AccessDirect Database Access

SQL ServerSQL Server

Windows Windows ServerServer

ADO.NETADO.NET

Data ProviderData Provider.NET Compact .NET Compact

FrameworkFramework

ADO.NETADO.NET

WindowsWindowsFormsForms

ConsConsMust be constantly Must be constantly connected connected

Not scalable on server; Not scalable on server; classic “two tier” classic “two tier” designdesign

No synchronization No synchronization model for typical model for typical dynamic datadynamic data

ProsProsRich query into a large Rich query into a large data sourcedata source

Access to Access to entireentire data data source; device queries source; device queries for and uses what’s for and uses what’s relevantrelevant

System.Data.SqlClientSystem.Data.SqlClient

Useful when data size is too large to be Useful when data size is too large to be replicated to device memory, but must replicated to device memory, but must be accessiblebe accessible

Useful for directly connected realtime Useful for directly connected realtime application as in previous slideapplication as in previous slide

SQL Server must always be thereSQL Server must always be there

What is SQL Mobile?What is SQL Mobile?

Next version of “SQL CE” (3.0)Next version of “SQL CE” (3.0)

SQL Server “Compact Edition”SQL Server “Compact Edition”

SQL CE General Design GoalsSQL CE General Design GoalsWork on mobile devicesWork on mobile devices

Small Footprint (2.0 had 1.5 Megs)Small Footprint (2.0 had 1.5 Megs)

Extensive SQL Query supportExtensive SQL Query support

Indexing and fast data accessIndexing and fast data access

Easy of programmability Easy of programmability

Simple to hook up to a SQL Server Simple to hook up to a SQL Server Database – Merge ReplicationDatabase – Merge Replication

SQL Server / SQL Mobile ReplicationSQL Server / SQL Mobile Replication

SQL MobileSQL Mobile

Replication Replication (HTTP)(HTTP).NET Compact .NET Compact

FrameworkFramework

SQL MobileSQL Mobile

ADO.NETADO.NET

WindowsWindowsFormsForms

SQL ServerSQL Server

ConsConsServer configuration Server configuration requiredrequired

Engine footprint on Engine footprint on devicedevice

ProsProsVery robust local storeVery robust local store

Complex SQL queryingComplex SQL querying

Synchronized Synchronized

Utilizes HTTPUtilizes HTTP

System.Data.SqlServerCeSystem.Data.SqlServerCe

Useful for synchronised scenariosUseful for synchronised scenarios

Namespace contains two types of API Namespace contains two types of API for two different functionsfor two different functions

ADO.NET Data Provider for ADO.NET Data Provider for SQL Server CESQL Server CE

SQL Server CE specific API for replicationSQL Server CE specific API for replication

SQL MobileSQL MobileArchitecture Improvements in the version 3.0Architecture Improvements in the version 3.0

Storage engineStorage engineMulticonnection supportMulticonnection support

Row level locking of data Row level locking of data

Shares common memory pool Shares common memory pool

Auto-shrink supportAuto-shrink support

Improved query processorImproved query processorCost-based optimization (Query Cost-based optimization (Query Efficiency!)Efficiency!)

Show plan and query hintsShow plan and query hints

Scrollable, updatable cursor – Scrollable, updatable cursor – SqlCeResultSetSqlCeResultSet

SQL MobileSQL MobileSynchronization ImprovementsSynchronization Improvements

Improved synchronization controlImproved synchronization controlMultiuser synchronization (No app Multiuser synchronization (No app disconnection!)disconnection!)

Progress notificationsProgress notifications

Multiple subscriptions in the same Multiple subscriptions in the same databasedatabase

Synchronization performance (w/SQL Synchronization performance (w/SQL 2005)2005)

Partitioned groupsPartitioned groups

Download-only tablesDownload-only tables

SQLCEResultSetSQLCEResultSet

Development FeaturesDevelopment FeaturesIncluded in Visual Studio 2005, so you can Included in Visual Studio 2005, so you can use with IntelliSense use with IntelliSense

Takes full advantage of SQL Server 2005 Takes full advantage of SQL Server 2005 Mobile Edition local capabilitiesMobile Edition local capabilities

Extended FeaturesExtended FeaturesScrolling accessScrolling access

Update in place, CommitUpdate in place, Commit

Random accessRandom access

SynchronizationSynchronizationGoals of SynchronizationGoals of Synchronization

Simplify development of synchronization Simplify development of synchronization logiclogic

Sync becomes a single line of codeSync becomes a single line of code

Conflict resolution happens on the server Conflict resolution happens on the server through SQL Server modelthrough SQL Server model

Share a common data sourceShare a common data sourceAllow multiuser access to the same data sourceAllow multiuser access to the same data source

Improve performance and data concurrencyImprove performance and data concurrency

More end-user versatilityMore end-user versatilityAllows end users to change devices and still Allows end users to change devices and still access the data sourceaccess the data source

Merge ReplicationMerge ReplicationOverviewOverview

Changes reconciled on next Changes reconciled on next synchronizationsynchronization

Local SQL Mobile changes sent to SQL Local SQL Mobile changes sent to SQL ServerServer

SQL Server changes sent to SQL SQL Server changes sent to SQL Mobile Edition Mobile Edition

SQL Server Management Studio wizardsSQL Server Management Studio wizards

Publishers created in studioPublishers created in studio

Subscribers create in studioSubscribers create in studio

.NET CF managed wrapper.NET CF managed wrapper

SqlCeReplicationSqlCeReplication

Merge ReplicationMerge ReplicationMinimizingMinimizing thethe CostsCosts forfor DeviceDevice ApplicationsApplications

Key to success for device apps is Key to success for device apps is minimizing communicationminimizing communication

Take only what you needTake only what you need

Apply filtersApply filters

Reduce the amount of data sent between Reduce the amount of data sent between devices and serverdevices and server

Reduces timeReduces time

Improves responsivenessImproves responsiveness

Tips, Tricks and Guidance for Tips, Tricks and Guidance for Enterprise Mobile SoftwareEnterprise Mobile Software

Tips and Tricks OverviewTips and Tricks Overview

Practices for Real time ApplicationsPractices for Real time Applications

Practices for Synchronised ApplicationsPractices for Synchronised Applications

Pocket TaskVisionPocket TaskVision

User Interface GuidelinesUser Interface Guidelines

Data Architecture GuidelinesData Architecture Guidelines

Real time ApplicationsReal time ApplicationsBest PracticesBest Practices

Useful for applications whereUseful for applications whereData are very dynamic and caching doesn’t make Data are very dynamic and caching doesn’t make sensesenseData on backend is always availableData on backend is always availableApplication depends on the network; can’t Application depends on the network; can’t function without itfunction without it

Detect network connectivity status, and Detect network connectivity status, and display feedback on status to user where display feedback on status to user where possible – Graceful if failspossible – Graceful if failsUse asynchronous network requests and Use asynchronous network requests and keep UI responsivekeep UI responsiveHandle network errors as gracefully as Handle network errors as gracefully as possible using Try/Catch/Finallypossible using Try/Catch/Finally

Synchronized ApplicationsSynchronized ApplicationsBest PracticesBest Practices

Useful for applications whereUseful for applications whereApplication needs to work without a Application needs to work without a networknetwork

User interfaceUser interface““Sync Button or Screen”Sync Button or Screen”

Provide feedback to the user on the Provide feedback to the user on the processprocess

Especially where connecting over a Especially where connecting over a networknetwork

Good to show how many changes were Good to show how many changes were upload and downloadedupload and downloaded

Synchronized / Caching AppsSynchronized / Caching AppsImplementationImplementation

To retrieve dataTo retrieve dataXML Web servicesXML Web services

SqlClientSqlClient

HttpWebReqest/ResponseHttpWebReqest/Response

SocketsSockets

Synchronization functionality in SQL Server CE or Synchronization functionality in SQL Server CE or third-party databasethird-party database

To persist dataTo persist dataXML files (custom format, or DataSet)XML files (custom format, or DataSet)

SQL Server CE or third-party databaseSQL Server CE or third-party database

Application Example from MSApplication Example from MSPocket TaskVisionPocket TaskVision

Online/Offline Online/Offline modesmodes

Select projects for Select projects for offline storageoffline storage

SynchronizationSynchronization

Conflict DetectionConflict Detection

SQL Server CESQL Server CEhttp://tinyurl.com/5lbtnhttp://tinyurl.com/5lbtn

User Interface GuidelinesUser Interface Guidelines

UI ConsistencyUI ConsistencyApplication TitleApplication Title

Standard SIP and New MenuStandard SIP and New Menu

Button/Menu OrderButton/Menu Order

Icons and NotificationIcons and Notification

POOM FunctionalityPOOM Functionality

WaitCursor and InputPanelWaitCursor and InputPanel

Designed for Pocket PC HandbookDesigned for Pocket PC Handbook

Data Architecture GuidelineData Architecture Guideline

Emphasied SQL Mobile to this point but Emphasied SQL Mobile to this point but some others for considerationsome others for considerationDevice Stand alone optionsDevice Stand alone options

In MemoryIn MemoryFile (plain text, XML, CSV)File (plain text, XML, CSV)SQL Mobile (You don’t need SQL Server)SQL Mobile (You don’t need SQL Server)

Server Server File – pull down from SQL ServerFile – pull down from SQL ServerSQL MobileSQL MobileOther tools for other enterprise sourcesOther tools for other enterprise sources

SynchronisationSynchronisationReplication Replication WebservicesWebservicesActiveSyncActiveSync

Application BlocksApplication Blocks

OpenNETCFOpenNETCFConfigurationConfiguration

CachingCaching

Exception ManagementException Management

Smart Client OfflineSmart Client Offline

www.opennetcf.orgwww.opennetcf.org

SummarySummary

Enterprise Mobile ArchitectureEnterprise Mobile ArchitectureConsider and Plan your architectureConsider and Plan your architecture

Spend time getting to know:Spend time getting to know:Visual Studio 2005Visual Studio 2005

Compact FrameworkCompact Framework

SQL Server MobileSQL Server Mobile

Prototype your architecturesPrototype your architectures

The tools are all there and ready for The tools are all there and ready for you to build enterprise mobile systemsyou to build enterprise mobile systems

ResourcesResources

ResourcesResources

Mobility Developer Centre: http://msdn.microsoft.com/mobility/

.NET Compact Framework FAQ: http://msdn.microsoft.com/smartclient/community/cffaq/default.aspx

OpenNETCF:

http://www.opennetcf.org/

We invite you to participate in ourWe invite you to participate in our online evaluationonline evaluation on CommNet,on CommNet,

accessible Friday onlyaccessible Friday only

If you choose to complete the evaluation online, If you choose to complete the evaluation online, there isthere is no need to complete the paper evaluationno need to complete the paper evaluation

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