Your SlideShare is downloading. ×
  • Like
All about data persistence in Windows 8
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

All about data persistence in Windows 8

  • 1,237 views
Published

Learn how to access and manipulate files on local and removable drives, how to roam settings between devices and how to store data in the cloud. …

Learn how to access and manipulate files on local and removable drives, how to roam settings between devices and how to store data in the cloud.

To learn more about Windows 8 data storage visit http://lunarfrog.com/blog/category/file-system/

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,237
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
5
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. All about datapersistence in Windows8Andrei Marukovichcontact@lunarfrog.comtwitter: @amarukovich
  • 2. Windows Runtime Desktop applications Windows Store appsWPF SL HTML DX HTML5 XAML DirectXC# / VB JavaScript JavaScript C# / VB C++ C++ .NET IE IE Engine .NET Windows Runtime Services and APIs Storage Sensors Media Win32 APIs Metadata UI XAML Controls Network …
  • 3. Windows RuntimeSandboxed environment• No direct communications between the apps• Brokered access to system resourcesFile system direct access• Local data• Temporary data• Installation folder• Downloads
  • 4. .NET FrameworkWindows Store profile• Subset of client profile .NET framework• No File / FileInfo• No Directory / DirectoryInfo
  • 5. File system entitiesFile system items• StorageFolder• StorageFileHelper classes• PathIO• FileIO
  • 6. Demo: Local data• Windows.Storage.ApplicationData • Folders • Settings• StorageFolder, StorageFile• PathIO, FileIO• ms-appx:///, ms-appdata:///local|temp|roaming/
  • 7. RoamingRoamingFolderRoamingSettings SkyDrive
  • 8. Roaming APIvar roamingFolder = ApplicationData.Current.RoamingFolder;StorageFile file = await roamingFolder.CreateFileAsync("dataFile.txt");await FileIO.WriteTextAsync(file, “some text");ulong quota = ApplicationData.RoamingStorageQuota;ApplicationData.DataChanged += DataChangedHandler;
  • 9. Roaming• Files• SettingsDO• Small data set synchronization between devicesDON’T• Real-time communication
  • 10. LibrariesWindows.Storage.KnownFolders• PicturesLibrary• MusicLibrary• VideosLibrary• DocumentsLibrary• HomeGroup• RemovableDevices
  • 11. Demo: Libraries• Libraries• App Manifest• Windows Property System
  • 12. Demo: Pickers• FolderPicker, FilePicker• AccessCache• Picker Contract
  • 13. Files and settingsApplication data• Local/Roaming folder and settingsUser data• LibrariesOther folders and files• Pickers
  • 14. DatabasesCurrent state• No System.DataOptions• SQLite• ESENT• Azure Mobile Servces• Web/Cloud services of you choice
  • 15. SQLite• SQLite for Windows Runtime extension• Managed SQLlite library, e.g. sqlite-netusing (var db = new SQLite.SQLiteConnection(dbPath)){ db.CreateTable<City>(); db.RunInTransaction(() => { db.Insert(new City() { Name = "Toronto" }); });}
  • 16. ESENTExtensible Storage Engine• Indexed sequential access data storage• Used by Windows 8 Zune Music and VideoManaged wrapper• ManagedEsent.codeplex.comOverviewhttp://lunarfrog.com/blog/2012/09/23/extensible-storage-engine/
  • 17. Demo: Azure Mobile Serviceshttps://manage.windowsazure.com/
  • 18. App-to-app data sharingShare Contract• Text• HTML• URI• Bitmap• File• Custom data • schema.org formats • https://github.com/AndreiMarukovich/Transhipment
  • 19. DataLocal storages• XML, SQLite, ESENT, etc.Cloud storages• SkyDrive, Azure Mobile Services, custom services
  • 20. Thank you!Andrei Marukovichcontact@lunarfrog.comtwitter: @amarukovich