Download presentation
Presentation is loading. Please wait.
1
Occasionally Connected Smart Clients
12/24/2017 3:50 PM Occasionally Connected Smart Clients Steve Lasker Program Manager Visual Studio Microsoft Corporation blogs.msdn.com/SmartClientData ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
2
What Is: Occasionally Connected
12/24/2017 3:50 PM What Is: Occasionally Connected Empowering users to leverage their computer, applications, data and files regardless of network availability Application proactively retrieves necessary data necessary to work offline As the network comes available, the application will automatically sync their work and log conflicts for the user to resolve Network operations occur in the background so the user can stay focused on their task Example: Outlook 2003 Burping Netowrk – Product Studio goes down, you should be able to continue working Working in the field: Take you laptop and work for extended periods of time ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
3
Agenda Resources for working offline
12/24/2017 3:50 PM Agenda Resources for working offline Occasionally Connected Systems Common Architecture Demo Scenario Demo Architecture Database Options Sync Options Application Updates Running Background Tasks Asynchronously ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
4
Resources Needed Offline
12/24/2017 3:50 PM Resources Needed Offline Data A subset of the data from the server(s) Heterogeneous Sync (SQL Server, Oracle, DB2, …) Files Not all data exists within the database Media files, Office Files, … Application Messaging (Web Services, WCF, …) Ability to queue outbound messages Ability to async process inbound messages Read Only Informational/Reference Data Services Ability to pre-fetch data from existing services ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
5
Occasionally Connected Smart Client Smart Client Application / UI
12/24/2017 3:50 PM Occasionally Connected Smart Client Visual Studio Smart Client Application / UI Background Tasks Canned UI Controls Data Sync Services File Sync Services Network Resources Data Access API Message Queuing Need to update this with a consistent feel to Connected Systems and WinFX overview Message Caching Data Store Files Application Updates Microsoft Windows / Windows Mobile ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
6
Adventure Works Sales Field Sales Multi-level marketing
12/24/2017 3:50 PM Adventure Works Sales Field Sales Multi-level marketing Consumers sell Adventure Works Products Need for the app to run disconnected Sellers are independent Hardware not owned by Adventure Works Many platforms Browser Desktop Tablet PC Pocket PC Smart Phone ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
7
Adventure Works Sales Architecture
12/24/2017 3:50 PM Adventure Works Sales Architecture Weather Services Adventure Works Corp Adventure Works Sales Smart Client Background Tasks Desktop TabletPC PocketPC Smart Phone Sync Services Services Sync App Logic Data Server Weather Caching Data Store Network Services Order Services Order Submission Queue Promo Videos Product Catalog My Customers Order Scratchpad My Inventory App Updates ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
8
Which Local Data Store? Microsoft Database Technologies
12/24/2017 3:50 PM Which Local Data Store? Microsoft Database Technologies SQL Server 2005 SQL Server Express Edition SQL Server Mobile Edition Jet (Access) Microsoft Visual FoxPro (.dbf) Excel XML WinFS Something new ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
9
SQL Server Express Great improvements over MSDE
12/24/2017 3:50 PM SQL Server Express Great improvements over MSDE Simple install from web or local MSI ClickOnce will BootStrap SSE if not installed Connect w/File Path Connection String User Instance feature for File Path Connecitons Great for VS Development ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
10
Deploying SSE For Occasionally Connected Scenarios
12/24/2017 3:50 PM Deploying SSE For Occasionally Connected Scenarios Base Install of SSE ClickOnce Bootstrapper Requires Admin Rights Replication w/SSE Replication not supported w/User Instances Enable SQL Server Authentication Add DBO Privileged Account Script creation of database Verify / Create / Attach database at startup Deploy SQL Server Replication .Dlls ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
11
Occasionally Connected Devices
12/24/2017 3:50 PM Occasionally Connected Devices Servers Desktops Laptops Tablet PC’s Windows CE Pocket PC Smart Phone ? Sweet spot Win 32 ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
12
Local Database Options
12/24/2017 3:50 PM Local Database Options Server Multi User Single User Scenarios SQL Server Workgroup Desktop SQL Server Express Laptop Tablet PC Win 32 Windows CE Device SQL Mobile SQL Mobile App needs are partitioned by single user/multi-user. Not by platform support. Pocket PC Smart Phone ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
13
Deploying SQL Server Mobile
12/24/2017 3:50 PM Deploying SQL Server Mobile SQL Server Mobile Engine Add runtime dlls to project (sqlce*.dll) C:\Program Files\Microsoft Visual Studio 8\Common7\IDE File size <1.4mb Set files to Copy to Output Directory = Copy if newer ADO for SQL Server Mobile Add reference to Microsoft SQL Mobile Located in: C:\Program Files\Microsoft Visual Studio 8\ _ Common7\IDE\PublicAssemblies\System.Data.SqlServerCE.dll File Size ~224k ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
14
Deploying SQL Server Mobile
12/24/2017 3:50 PM Deploying SQL Server Mobile ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
15
SQL Server Mobile Runtime
12/24/2017 3:50 PM SQL Server Mobile Runtime .dll file Functionality sqlcese30.dll SQL Server Mobile Engine. sqlceqp30.dll SQL Server Mobile Query Processor. Required for all SQL Server Mobile applications. sqlceme30.dll Required for ADO.net, System.Data.SqlServerCe.dll sqlceer30[language].dll Contains error strings for SQL Server Mobile-generated errors. Required for all SQL Server Mobile applications. sqlceca30.dll The SQL Server Mobile Client Agent. Required for applications that connect to SQL Server by using replication or remote data access. sqlcecompact30.dll Provides the compact database functionality. sqlceoledb30.dll Provides OLE DB connectivity to SQL Server Mobile databases. Required only if your application uses OLE DB to connect to the SQL Server Mobile database. Used by RDA. Total File Size 1.34mb ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
16
How - To Sync Roll your own Merge Replication
12/24/2017 3:50 PM How - To Sync Technology Roll your own Merge Replication Remote Data Access XML - DataSets SQL Server Express SQL Server Mobile Roll your own Ultimate in flexibility Highest cost to develop and maintain Merge Replication Most power, broadest features for different data partitions, spans all devices Need DBO/DBA privileges, must “own” server Remote Data Access (RDA) Easy entry point for well partitioned data, no config to database Limited to SQL Server Mobile ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
17
RDA Sync Architecture Local App UI IIS w / Sync ISAPI dll RDA Sync DAL
12/24/2017 3:50 PM RDA Sync Architecture Local App UI IIS w / Sync ISAPI dll Server Data DAL RDA Sync Engine Out In Database Engine SQL Server Mobile ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
18
RDA: Initializing Reference Data
12/24/2017 3:50 PM RDA: Initializing Reference Data RDA.Pull(“Products", _ "SELECT ProductId, Name, Description, Category, UnitPrice " & _ "FROM Products", _ My.Settings.ServerOleDBConnectionString, _ RdaTrackOption.TrackingOff) Reference Data Product Catalog ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
19
RDA: Initializing Updatable Data
12/24/2017 3:50 PM RDA: Initializing Updatable Data Rda.Pull(“Customers", _ "SELECT CustomerId, Name, Address, Phone, Fax" & _ "FROM Customers", _ My.Settings.ServerOleDbConnectionString, _ RdaTrackOption.TrackingOn) Updateable Data Customers ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
20
RDA: Pushing Changes Back
12/24/2017 3:50 PM RDA: Pushing Changes Back Rda.Push(“Customers", _ My.Settings.ServerOleDbConnectionString, _ SyncBatching.BatchingOn) Updateable Data Customers In ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
21
Incorporating WCF w/RDA
12/24/2017 3:50 PM Incorporating WCF w/RDA Smart Client Accounting Transport Logic Controls Queue WCF Validation Logic* Transport Sales Logic Logic Rules Cache WCF Inventory Logic Logic Rules Rules Local Data Store Client Sync Fulfillment Sync Logic Rules ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
22
Remote Data Access (RDA)
12/24/2017 3:50 PM Remote Data Access (RDA) ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
23
Configuring RDA Configure Web Sync Point Write client side code
12/24/2017 3:50 PM Configuring RDA Configure Web Sync Point Write client side code Dim rda As New SqlCeRemoteDataAccess() rda.InternetUrl = " rda.LocalConnectionString = "Data Source =.\AdventureWorksSales.sdf" rda.Pull("LocalTableName", _ "Query To Execture on the Server", _ "OLEDB ConnectionString from Web Server to SQL Server", _ RdaTrackOption.TrackingOnWithIndexes, _ "Local Table for Errors on Push") Dim rda As New SqlCeRemoteDataAccess() rda.InternetUrl = " rda.LocalConnectionString = "Data Source =.\AdventureWorksSales.sdf" rda.Pull("Customer", _ "SELECT CustomerID, Name, FROM Customer ", _ "Provider=SQLOLEDB.1;Data Source=YourSQLServer;" & _ "User ID=YourServerUserName;Password=YourServerPassword;" & _ "Initial Catalog=AdventureWorksSales", _ RdaTrackOption.TrackingOnWithIndexes, _ "Customer_Errors") ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
24
RDA Limitations Based on Snapshot Push, Push, Push
12/24/2017 3:50 PM RDA Limitations Based on Snapshot Push, Push, Push Changes at server aren’t pulled down until next snapshot Limits the Product Catalog scenarios Updates are limited to last client wins Comparison based on PK only ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
25
App Updates With ClickOnce
12/24/2017 3:50 PM App Updates With ClickOnce ClickOnce Background API’s Imports System.Deployment.Application.ApplicationDeployment ... Private Function CheckForAppUpdates() As UpdateCheckInfo If ApplicationDeployment.IsNetworkDeployed Then Dim updateInfo As UpdateCheckInfo updateInfo = CurrentDeployment.CheckForDetailedUpdate() If updateInfo.UpdateAvailable Then ' download the update If ApplicationDeployment.CurrentDeployment.Update() Then ' Update Downloaded End If Return updateInfo End Function ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
26
App Updates - ClickOnce
12/24/2017 3:50 PM App Updates - ClickOnce ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
27
BackgroundTasks / Steps
12/24/2017 3:50 PM BackgroundTasks / Steps Runs on a background thread of the application Executes collection of steps Start / Stop similar to Windows Services Executes in a loop based on a Timer Can be triggered by Network Resources Marshals progress / completed info to UI thread ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
28
Background Tasks 12/24/2017 3:50 PM
©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
29
Summary Smart Client Advantages Leverage, embrace reference data
12/24/2017 3:50 PM Summary Smart Client Advantages Ability to work offline Ability to work on behalf of the user Leverage, embrace reference data Leverage Microsoft local data stores SQL Server Express Edition SQL Server Mobile Edition Build sync APIs as background tasks Composable Sync APIs are coming… Leverage Occasionally Connected Systems Architectures to be well positioned Leverage ClickOnce APIs for updates ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
30
12/24/2017 3:50 PM Resources Data Designers & Occasionally Connected Systems Discussions: Drag Once Databinding: Drag Once w/Custom Controls: Windows Forms: Data Runtime: Patterns & Practices: Removed the URLs: And moved them to the resources page ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
31
Community Resources At PDC For more information, go see
12/24/2017 3:50 PM Community Resources At PDC For more information, go see Wed 1pm & 3:15pm PRS402 Erik Ellis Harnessing the Power and Flexibility of Windows Forms 2.0 Thur 11:30am PRS321 Mark Boulter Windows Forms: Integrating Windows Forms and Windows Presentation Foundation ("Avalon") Fri 10:30am PRS334 Chris Sells, Doug Purdy Windows Presentation Foundation ("Avalon") + Windows Communications Foundation ("Indigo") = Magic Fri 1pm FUN222 Jamie Cool What’s New in Software Installation for Windows Vista: Exploring the Windows Installer (MSI) and ClickOnce Options Labs: FUNHOL15 ClickOnce Deployment PRSHOL17 New UI Features in Windows Forms PRSHOL18 New Data Features in Windows Forms PRSHOL19 Windows Forms: Advanced Layout Ask The Experts ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
32
© 2005 Microsoft Corporation. All rights reserved.
12/24/2017 3:50 PM © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
33
Presentation Overview (hidden)
12/24/2017 3:50 PM Presentation Overview (hidden) Speaker: Steve Lasker Timeslot: 9/14/05 11:00am-12:15 Objectives: Technologies covered: Occasionally Connected Systems Windows Forms SQL Server 2005, SQL Mobile 2005 ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
34
Existing Architectures
12/24/2017 3:50 PM Existing Architectures ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
35
Standalone Application Evolution
12/24/2017 3:50 PM Standalone Application Evolution Local Data App UI Validation Logic DAL Local Database Central Database ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
36
Data Island Shared Data
12/24/2017 3:50 PM Data Island Shared Data Users lose offline functionality Applications aren’t typically written with multi-user in mind Rearchitecture typically required to make multi-user ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
37
DataSets Over Web Services
12/24/2017 3:50 PM DataSets Over Web Services Smart Client Accounting SELECT * FROM Customers Logic Controls Web Service Validation Logic* Sales Web Service Client Orders Customers Logic Logic Rules Inventory Logic XML XML Rules Fulfillment Logic Rules ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
38
DataSet Caching Excellent for serialization and change tracking
12/24/2017 3:50 PM DataSet Caching Excellent for serialization and change tracking Contain different views of the same data Storage is based on XML / Binary Querying requires loading the entire dataset into memory * Updating the local dataset requires loading the entire dataset into memory Transaction support * Query processor * No canned, E2E, sync technology Has change tracking w/DataAdapters XML DiffGram based ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
39
Message Based Queuing / Caching
12/24/2017 3:50 PM Message Based Queuing / Caching Smart Client Accounting SELECT * FROM Customers Logic Controls Service Validation Logic* Sales Service Client Customers Orders Logic Logic Rules Inventory Cache Service Logic Rules Fulfillment Logic Rules ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
40
Message Based Caching Similar to DataSet Caching
12/24/2017 3:50 PM Message Based Caching Similar to DataSet Caching Blobs are now stored in queues No ability to query on uncommitted data ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
41
Logical Queuing Sending mail in outlook Submitting Expense Reports
12/24/2017 3:50 PM Logical Queuing Sending mail in outlook Pressing send a little too quickly Submitting Expense Reports Found a receipt in the bottom of your bag ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
42
12/24/2017 3:50 PM Logical Queuing ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
43
Occasionally Connected Systems Services Message Pre-Fetch Items
12/24/2017 3:50 PM Sync Components Occasionally Connected Systems Services Sync Groups Sync Group Items Database Items File Items Message Items Message Pre-Fetch Items App Update Items ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.