“ winfs” future directions: building data-centric applications using windows presentation...
TRANSCRIPT
““WinFS” Future Directions:WinFS” Future Directions: Building Data-Centric Applications Using Windows Building Data-Centric Applications Using Windows Presentation Foundation “Avalon” and Windows Presentation Foundation “Avalon” and Windows FormsForms
Ramesh NagarajanRamesh NagarajanDAT310DAT310Program ManagerProgram ManagerMicrosoft CorporationMicrosoft Corporation
2
Data Access ChallengeData Access ChallengeDesktop DevelopersDesktop Developers
Building data centric applications is overly difficultBuilding data centric applications is overly difficultRequires object framework design skillsRequires object framework design skills
Requires performance and scalability tuning skillsRequires performance and scalability tuning skills
Requires UI skillsRequires UI skills
More time spent on plumbing than on app itself!More time spent on plumbing than on app itself!
3
Data Access ChallengeData Access ChallengeNow imagine if…Now imagine if…
You could manipulate data as objects You could manipulate data as objects but query it as relationalbut query it as relational
Flexible query definition and compositionFlexible query definition and compositionBuild Rich Dynamic scalable UIBuild Rich Dynamic scalable UI
You could model your business data You could model your business data as objectsas objects
Share your data types with other Share your data types with other applicationsapplications
You could sync data to make it You could sync data to make it available offlineavailable offline
Provides two-way synchronizationProvides two-way synchronization
ADO.NETADO.NET
WinFSWinFS
Item Data Model
Query
Services
File Services Metadata Handlers,…
OperationsBackup, AV,…
Item Association Extension
Schemas
Tasks Media
Docs …
SyncAdapters, …
People Mail
File Services Metadata Handlers,…
OperationsBackup, AV,…
SyncAdapters, …
Update
Logic
“DLinq”
File Services Metadata Handlers,…
OperationsBackup, AV,…
SyncAdapters, …
Database Engine
NTFS CLR
WinFS for DevelopersWinFS for Developers
11
22
Leveraging a rich data Leveraging a rich data platformplatformUsing the next generation ADO.NET Using the next generation ADO.NET API on WinFS to query for data and API on WinFS to query for data and build great applications, without build great applications, without building your own data storebuilding your own data store
Building shared data Building shared data applicationsapplicationsUse schemas to extend and relate Use schemas to extend and relate Windows types, build your own Windows types, build your own types, and extend with logic and types, and extend with logic and behaviorsbehaviors
33 Building smart connected Building smart connected applicationsapplicationsBuild sync adapters to bring your Build sync adapters to bring your data into WinFSdata into WinFS
11
22
33
Simple retrievalSimple retrieval
6
StorageViewStorageView
Provides feature rich access to WinFS Provides feature rich access to WinFS datadata
Data Virtualization and PagingData Virtualization and Paging
Grouping, Sorting, Filtering and Grouping, Sorting, Filtering and AggregationAggregation
NotificationsNotifications
NOT a UI control or a SQL ViewNOT a UI control or a SQL View
Implements Data Binding interfacesImplements Data Binding interfaces
BindingBinding
User User InterfaceInterface
objectobject
PropertyProperty
Data objectData object
PropertyProperty
Data binding demosData binding demos
8
Sync AdaptersSync Adapters
Canonical way to synchronize data Canonical way to synchronize data with WinFSwith WinFS
Change tracking built into the storeChange tracking built into the store
Conflict detection and resolution Conflict detection and resolution
WinFS SyncAdapters
class MyAdapter : SyncAdapter class MyAdapter : SyncAdapter {{ public void Initialize(SyncProfile profile)public void Initialize(SyncProfile profile) public override void Synchronize()public override void Synchronize() public override void Cancel()public override void Cancel() private void ReceiveSync()private void ReceiveSync() private void SendSync()private void SendSync() ......}}
Inside A Sync AdapterInside A Sync AdapterReceive SyncReceive Syncusing System.Storage.Sync;
// InitializationSyncService syncService = (SyncService) winfsData.Context.GetService(typeof(SyncService));
Guid remotePartnerId = ...; syncService.Initialize(profile.LocalEndpoint.ReplicaId,
remotePartnerId);
syncService.ConflictPolicy = profile.ConflictPolicy;
// Set baseline for conflict detectionsyncService.RemoteKnowledge = LookupMetadataFromLastSync();
// Provide changes like you would for WinFS API CUD operationsPerson p = new Person();p.DisplayName = remotePerson.Name; // Schema transformation...// Applies changes: does conflict detection and handling, syncService.SaveContextChanges(); // Save updated baselineSaveMetadataForNextSync(syncService.RemoteKnowledge);
Using Sync Using Sync namespacenamespace
11
InitializeInitializeSyncServiceSyncService
22
Set-upSet-upConflict Policy Conflict Policy and Baselineand Baseline
33
Provide andProvide andApply ChangesApply Changes
44
Save UpdatedSave UpdatedBaselineBaseline
55
Inside A Sync AdapterInside A Sync AdapterSend SyncSend Sync// Send Sync – Enumerating Changes// Set baseline for change enumerationsyncService.RemoteKnowledge = LookupMetadataFromLastSync();
using (ChangeReader reader = syncService.GetChangeReader()){ foreach (CompoundItemChange cic in reader) { // CompoundItemChange internally contains
// WinFS API data objects for changed Entities
switch (cic.RootItemChange.ChangeType) { case ChangeType.Create: case ChangeType.Update: case ChangeType.Delete:
...; // Schema transform WinFS change // and apply to remote store
}
// Updates change enumeration baseline reader.AcknowledgeChange(change, true /*success*/); }} // Save updated baselineSaveMetadataForNextSync(syncService.RemoteKnowledge);
Process Change Process Change and Apply Remotelyand Apply Remotely
33
Get ChangeReaderGet ChangeReader
11
Read ChangesRead Changes
22
Report Change Report Change AppliedApplied
44
Save UpdatedSave UpdatedBaselineBaseline
55
Partner demo – AdessoPartner demo – Adesso
12
Partner Demo - AdessoPartner Demo - AdessoAdesso ServerAdesso Server
Demo PCDemo PC
WinFSStore
SynchronizationSynchronization
Back OfficeBack OfficeDataData
StoreSpyAdesso
Designer
PocketPC PocketPC clientclient
13
WinFS: Raising the WinFS: Raising the Productivity BarProductivity Bar
You CAN manipulate data as objects You CAN manipulate data as objects but query it as relationalbut query it as relational
Flexible query definition and compositionFlexible query definition and composition
Build Rich Dynamic scalable UIBuild Rich Dynamic scalable UI
You CAN model your business data as You CAN model your business data as objectsobjects
Share your data types with other Share your data types with other applicationsapplications
You CAN sync data to make it You CAN sync data to make it available offlineavailable offline
Provides two-way synchronizationProvides two-way synchronization
14
Community ResourcesCommunity Resources
At PDCAt PDCFor more information, go seeFor more information, go see
DAT209 (again!): Repeated Thurs 515pmDAT209 (again!): Repeated Thurs 515pmDAT312: “WinFS” and ADO.NET: Future DAT312: “WinFS” and ADO.NET: Future Directions for Data Access Scenarios (Wed Directions for Data Access Scenarios (Wed 5pm)5pm)Labs: DAT-HOL07: Getting started with WinFSLabs: DAT-HOL07: Getting started with WinFSDAT Track loungeDAT Track loungeAsk the Experts: Thursday nightAsk the Experts: Thursday night
After PDCAfter PDCMSDN dev center: MSDN dev center: http://msdn.microsoft.com/data/winfs/http://msdn.microsoft.com/data/winfs/Channel 9 tag: Channel 9 tag: http://channel9.msdn.com/tags/WinFShttp://channel9.msdn.com/tags/WinFS Blog: Blog: http://blogs.msdn.com/winfshttp://blogs.msdn.com/winfs Newsgroup: Newsgroup: news://microsoft.public.windows.developnews://microsoft.public.windows.developer.winfx.winfser.winfx.winfs
15
© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.