Anywhere Access to Data - PowerPoint PPT Presentation

1 / 48
About This Presentation
Title:

Anywhere Access to Data

Description:

Tablet PC 'Influential' Today's Agenda. Accessing File-Based Data ... 'File-based' almost always means accessing files either on a local drive or on a ... – PowerPoint PPT presentation

Number of Views:76
Avg rating:3.0/5.0
Slides: 49
Provided by: eliot3
Category:

less

Transcript and Presenter's Notes

Title: Anywhere Access to Data


1
Anywhere Access to Data
  • Markus Egger
  • President, EPS Software Corp.
  • Publisher, CoDe Magazine

2
About Me
  • Markus Egger
  • President and Chief Software ArchitectEPS
    Software Corp.
  • Publisher CoDe and CoDe Focus Magazines
  • International Author and Speaker
  • Microsoft MVP C
  • Tablet PC Influential

3
Todays Agenda
  • Accessing File-Based Data
  • Synchronization Manager for Offline Data
  • Data Access Scenarios
  • Data Access Architecture for Anywhere Access
  • Accessing Data in Databases
  • Client-Side Caching
  • Service Oriented Architecture
  • SQL Server and SQL CE
  • ADO.NET

4
  • Accessing File-Based Data
  • Markus EggerEPS Software Corp.CoDe Magazine
  • markus_at_eps-software.com

5
File-Based Data Scenarios
  • File-based almost always means accessing files
    either on a local drive or on a local network
    share.
  • Note Technologies for distributed file access
    are available (and can be implemented manually),
    but we are not concerned with these technologies
    in this talk.
  • For distributed scenarios, files generally have
    to be synchronized for offline consumption.
  • Microsoft provides everything needed for offline
    file caching and synchronization on computers as
    well as mobile devices.

6
Synchronization Manager
  • Centralized, standard technology for
    synchronizing files for offline use.
  • Files are synchronized independently of the
    protocol.
  • Intended for applications that run primarily on
    mobile computers.
  • This technology is not just for files!
  • More about that later

7
Mobile Computing Configurations
  • Synchronization Manager is useful for computers
    configured as follows
  • Mobile computer in docking station but
    occasionally used over a dial-in connection.
  • Mobile computer used mostly over a dial-in
    connection.
  • Desktop computer used strictly over a dial-in
    connection, such as a computer used by a
    telecommuter.
  • Desktop computer used strictly over a high
    bandwidth network.

8
Application Scenarios for Synch Manager
  • Microsoft Office applications that need to
    prepare files for offline use.
  • Client-side caching that lets you cache files
    locally.
  • Browsers that can cache HTML pages locally.
  • Mail programs that can cache e-mail messages
    locally.
  • Databases that can store information locally.

9
Synchronization Manager Architecture
  • End user can
  • Schedule applications for synchronization.
  • Set up automatic synchronization to occur in
    conjunction with specified system events.
  • Programming interface can
  • Enable applications to register for
    synchronization features.
  • Process errors.
  • Receive progress information and notifications
    during the synchronization process.

10
(No Transcript)
11
Programmable Interface
  • To use the Synchronization Manager
    programmatically, you must implement COM
    interfaces
  • Your object must implement
  • ISyncMgrSynchronize
  • ISyncMgrEnumItems
  • SyncMgr implements
  • ISyncMgrSynchronizeCallback
  • ISyncMgrSynchronizeInvoke

12
Longhorn Application Sync
  • Centralized and consistent sync experience for
    applications, services, and devices.
  • Users are in control.
  • Clear what is being synchronized to and from the
    computer.
  • Consistent experience for status, errors, and
    conflicts.
  • Frequent synchronization tasks at most two clicks
    away.
  • Synchronization is not obtrusive.

13
Longhorn Synchronization Manager
XP Sync Man
14
  • Database Scenarios
  • Markus EggerEPS Software Corp.CoDe Magazine
  • markus_at_eps-software.com

15
Data Access Scenarios
  • Applications must work well in LAN scenarios.
  • Basically, all types of applications support
    basic networking.
  • Applications must work in distributed scenarios.
  • ASP.NET Web applications are an obvious choice
    here.
  • Smart Client applications now also work well over
    protocols such as HTTP.
  • Applications must work in disconnected or
    partially connected scenarios.
  • Smart Client applications (running on various
    devices or operating systems) are the only choice
    here.

16
Data Access Goals
  • Top priority Create an application that can be
    used anywhere and any time.
  • Create an architecture that can be used in many
    scenarios and over an extensive period of time.
  • The architecture needs to be OS-independent and
    device-independent.
  • The architecture should carry us well into new
    operating systems and device generations.
  • Applications should also support flexible
    deployment scenarios.

17
Therefore Smart Clients Rule!
  • Smart Client applications cover all the different
    scenarios and goals.
  • Smart Client applications are great for known
    permanent users.
  • These are users that are known to us and use our
    application extensively.
  • We may supplement Smart Clients with HTML-based
    Web applications.
  • These are great for occasional users and
    public users.
  • We need to make sure our data access strategy
    works well in this scenario too.

18
Architectural Overview
Database(SQL Server) Business Logic(The
App) User Interf. ServiceInterface
19
Core Application Architecture
Deployment Boundary
20
Data Access Architectural Goals
  • Disconnected from database
  • Flexible access to different back ends
  • Automatic failover when needed
  • Simple usage approach (for developers)
  • Easy to extend

21
Data Access Architecture
  • Note A production implementation will probably
    feature a lot more methods.

22
Implementing the Data Service
Markus EggerEPS Software Corp.CoDe
Magazine markus_at_eps-software.com
23
Data Service Recap
  • Abstracted object that takes care of the details
    of talking to a database
  • Instantiated by a Factory object
  • Can be extended through fundamental interface
    (IDataService)

24
Business Object Architectural Goals
  • Scalability
  • Database Independence
  • Simple to Use
  • Simple to Program
  • Stateless
  • Reusable

25
Business Object Architecture
Business Object
GetList( )
IBusinessObject
Verify( )
Save( )
GetList( )
GetSingleRecordByPK( )
Verify( )
GetInstance( )
Save( )
GetSingleRecordByPK( )
CustomerBO
OrderBO
XyzBO
GetCustomersByCompanyName( )
GetOrdersByCustomerID( )
26
Implementing the Business Object
Markus EggerEPS Software Corp.CoDe
Magazine markus_at_eps-software.com
27
Business Object Recap
  • A fundamental business object (BO) implementation
    provides default functionality.
  • New BOs can be easily created by subclassing the
    base implementation.
  • A generic interface provides great flexibility.
  • Static GetInstance() helper provides great
    deployment flexibility.
  • Abstract away all access to the data layer!

28
Related Topics
  • Security refresher
  • SQL Injection!
  • Use Stored Procedures and Parameters!
  • Execution rights and CAS
  • Make sure your distributed access is secure
  • Replay attacks, data interception, command
    interception, data tampering,

29
Related Topic DataSets
  • Topic of heated discussion -)
  • DataSets provide lots of functionality, but
  • They are not always efficient.
  • Think, for example, of serialization.
  • Who knows? They might change in the future.
  • Strongly typed DataSets provide type-safety and
    compile-time verification.

30
DataSets (continued)
  • Custom data objects can be strongly typed and
    more efficient, but they are more work.
  • Custom data objects provide full control (for the
    developer) and independence from potential .NET
    Framework changes
  • My recommendation combine the two approaches!
  • Create a custom wrapper for DataSets.
  • Wrappers provides strong typing and other
    functionality.
  • Since the DataSet is not exposed, you can always
    change these implementation details.

31
  • Implementation Details
  • Markus EggerEPS Software Corp.CoDe Magazine
  • markus_at_eps-software.com

32
Different Data Services
  • LAN data services simply access local database
    instances and servers.
  • Distributed data services perform the same basic
    task, but have to use in between technologies
  • Web Services
  • Remoting
  • Isnt that outdated?
  • No, not really, but it needs to be handled as a
    replaceable technology.
  • Microsoft Code Name Indigo

33
Different Data Services (cont.)
  • Offline Data
  • Needs to store data in a local database such as
    MSDE or SQL CE.
  • XML can be used as a poor mans database.
  • Offline copies of data can be created
    automatically when data is accessed.
  • The Synchronization Manager can be used to
    trigger and handle synchronization.

34
Offline Update Scenarios
  • Upload scenarios can get tricky!
  • Database applications tend to be more
    interconnected than applications such as Outlook.
  • Example Updating one item (address) can change
    other data (shipping fee on an unprocessed
    invoice).

35
Offline Update Scenarios (cont.)
  • Often, local data needs to duplicate almost all
    server-side structures and referential integrity
    as well as business rules (checks and
    processing).
  • Sometimes additional consideration needs to be
    given to business scenarios that are unique to
    the offline-cache situation.
  • Applications may need to handle a special
    unprocessed state for items that may still have
    to change or may not yet have triggered other
    actions.

36
  • Case Study Outlook 2003
  • Markus EggerEPS Software Corp.CoDe Magazine
  • markus_at_eps-software.com

37
Outlook 2003
  • Major re-write of the application
  • Builds on
  • Cached Exchange
  • Improved Synchronization
  • Conflict Resolution
  • RPC over HTTP
  • PST/OST Enhancements

38
Cached Mode Shields Users From Network
Conditions
  • Outlook runs against a local copy of the users
    mailbox (OST).
  • Uses the Offline Address Book (OAB) for basic
    addressing functions .
  • The OST and OAB are automatically kept in sync
    with server.
  • Classic Online features are available
    (Calendaring, Public Folders, Delegate Access).

39
Cached Mode Uses Improved Synchronization
  • Fewer bytes over the wire and less roundtrips
  • Bi-directional data compression
  • Increased buffer sizes
  • Partial item upload
  • These changes plus others yielded 50 reduction
    in BoW
  • More robust synchronization
  • Check-pointing
  • Skip bad item
  • Deliver most important data first
  • Synchronizations initiated on user navigation
  • Most recent items first (LIFO) within a folder

40
Cached Mode Handles Connectivity Changes
  • Outlook just keeps working when the network goes
    away.
  • Few annoying error messages
  • Users data is available
  • User can create new items and modify existing
    items
  • Outlook automatically re-connects to the Exchange
    server.

41
Cached Mode Bandwidth Aware
  • On fast networks
  • Downloads full items on all folders and address
    book updates.
  • On slow networks ( lt 128 Kb)
  • Synchronizes only headers on all folders.
  • Headers small but contain sufficient information
    to render views.
  • Users can triage their mail download important
    messages and delete junk mail.

42
Questions?
  • Feel free to send me email!
  • Markus Egger
  • EPS Software Corp.
  • CoDe Magazine
  • markus_at_eps-software.com

43
MEDC Mobile PC Talks
  • CLI204 - Tablet PC Development Overview
  • Speaker - Dave Hale
  • Time Tuesday 5/10 1130 AM
  • CLI208 Anywhere Access to Data
  • Speaker Markus Egger
  • Time Tuesday 5/10 300 PM
  • CLI324 - Advanced Tablet PC Development Topics
  • Speaker Todd Landstad
  • Time Wednesday 5/11 800 AM
  • CLI325 - In Depth - Ink Data Management
  • Speaker Stefan Wick
  • Time Wednesday 5/11 930 AM
  • CLI329 - Network Awareness
  • Speaker Dr. Neil Roodyn
  • Time Thursday 5/12 800 AM

44
Mobile Hands On Labs at MEDC
  • Building Network-Aware Mobile PC Applications
  • Build a network-aware application using the
    Windows Network Location Awareness (NLA) API.
  • Building Power-Aware Mobile PC Applications
  • Learn how to tune your applications to save
    power, extend battery life, and enhance the
    user's mobile PC experience.
  • Building Managed Applications with Microsoft
    Windows XP Tablet PC SDK
  • Create a cool Tablet application using the
    Windows XP Tablet PC Edition SDK 1.7.

45
The Tablet and Mobile PC Developer
Center http//msdn.microsoft.com/mobilepc
46
Mobile PC Developer Center
  • The latest technical articles
  • Downloads
  • Developer resources
  • Regular columns
  • .
  • Newsgroups
  • Featured partners
  • and more

47
Tablet PC Developer Center
  • The latest technical articles
  • Downloads
  • Developer resources
  • Regular columns
  • .
  • Newsgroups
  • Featured partners
  • and more

48
Attend a free chat or web cast http//www.microsof
t.com/communities/chats/default.mspx
http//www.microsoft.com/usa/webcasts/default.asp
List of newsgroups http//communities2.microsof
t.com/communities/newsgroups/en-us/default.aspx
MS Community Sites http//www.microsoft.com/comm
unities/default.mspx Locate Local User Groups
and Community Sites http//www.microsoft.com/commu
nities/usergroups/default.mspx http//www.microso
ft.com/communities/related/default.mspx
Write a Comment
User Comments (0)
About PowerShow.com