seamlessly interacting with web and l ocal data l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Seamlessly interacting with web and l ocal data PowerPoint Presentation
Download Presentation
Seamlessly interacting with web and l ocal data

Loading in 2 Seconds...

play fullscreen
1 / 47

Seamlessly interacting with web and l ocal data - PowerPoint PPT Presentation


  • 168 Views
  • Uploaded on

PLAT-894T. Seamlessly interacting with web and l ocal data. Manav Mishra Principal Group Program Manager Microsoft Corporation. Windows 8 allows seamless access to files wherever it lives – local , devices , network, web or contained within other apps. Files.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Seamlessly interacting with web and l ocal data' - Lucy


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
seamlessly interacting with web and l ocal data
PLAT-894T

Seamlessly interacting with web and local data

Manav Mishra

Principal Group Program Manager

Microsoft Corporation

slide2
Windows 8 allows seamless access to files wherever it lives – local, devices, network, web or contained within other apps
files
Files
  • We use and create files everyday
  • Files live in various places
  • Each place has unique restrictions and access models
agenda
Agenda
  • File access in Windows 8
  • Compelling views of local files in your app, easily
  • Seamless interchange of web and local file representations
  • App-to-app file exchange with contracts

You’ll leave with examples of how to

Get started with file access in Windows 8

files in windows 8
Files in Windows 8

Web

(via manifest)

1

Drives & network

(via Picker)

Local files

(via manifest)

App data

(free)

windows 8 file access building blocks
Windows 8 file access building blocks

Metro style Apps

ListView Control

Windows 8 file access

File data source

File access API

File picker

App-to-app contracts

2

4

1

Trust broker

3

Type interchange

Windows Core OS Services

File system

File system indexer

slide7

1. Accessing the file system

“It’s the PC reimagined”

file access
File access
  • Declarative access to the most-used system places– music, videos, pictures and documents libraries, using the manifest
    • Enables programmatic access
  • File picker gets full-fidelity file system access for free, with user-consent
    • Enables programmatic access
file actions
File actions
  • Full enumeration of files and folders
  • Rich search and metadata pivots of user files
  • Access to thumbnails and properties of files
  • Core file actions like new, copy, delete, rename and move
slide11

Brokered file access

  • Declare access to the music library in the app manifest
    • <Capabilities>
    • <Capability Name= "musicLibrary" />
    • </Capabilities>
brokered file access
Brokered file access

Get all the music in the music library

var picturesLibrary = Windows.Storage.KnownFolders.musicLibrary;

musicLibrary.getFilesAsync().then(function (file) { …

brokered file access13
Brokered file access

Delete a file

sampleFile.deleteAsync().then(function (file) { …

file picker full fidelity file system access for free
File pickerFull-fidelity file system access for free
  • System control optimized for rich browsing of file locations
  • Enables opening & saving files for all local and network locations
  • Offers photos and attachment views
  • Apps choose file types they want the picker to filter-by
  • Supports ‘basket’ for multiple selection scenarios
slide16

File picker

  • Show the file picker with filters
    • var openPicker = new Windows.Storage.Pickers.FileOpenPicker();
    • openPicker.fileTypeFilter.replaceAll([".png", ".jpg", ".jpeg"]);
    • openPicker.pickSingleFileAsync().then(function (file) { …
slide17

File picker

Show the file picker in multiselect mode

openPicker.pickMultipleFilesAsync().then(function (file) { …

slide18

File picker

Show the file picker in thumbnail mode

openPicker.viewMode = Windows.Storage.Pickers.PickerViewMode.thumbnail;

file broker and picker offer apps full access to the file system while keeping the user in control
File broker and picker offer apps full access to the file system while keeping the user in control
building compelling views
Building compelling views

ListView data-source adapter

  • Communicates between the file system and the ListView control
  • Uses system indexer to populate metadata in the view
  • Automatic support for virtualized views for fast scrolling
  • Automatically loads thumbnails in reading order
  • Automatically handles change notifications
slide23

ListView data-source adapter

  • Define library to access
  • var pics = Windows.Storage.KnownFolders.picturesLibrary;
  • Configure data-source
  • var dsOptions = {
  • mode: Windows.Storage.FileProperties.ThumbnailMode.picturesView,
  • requestedThumbnailSize: 192,
  • synchronous: false
  • };
slide24

ListView data-source adapter

  • Configure ListView
  • var lvOptions = {
  • dataSource: new WinJS.UI.StorageDataSource(pics, dsOptions),
  • layout: new WinJS.UI.GridLayout(),
  • };
slide25

ListView data-source adapter

Create ListView

new WinJS.UI.ListView(document.getElementById("listviewDiv"), lvOptions);

interchanging web and local file representations
Interchanging web and local file representations
  • Bring forward existing knowledge, expertise and scenarios for interacting with any content abstraction, be it web or local
  • Seamless interchange between local and web representations
data types interchange
Data typesInterchange

http://

Playback a video…

…that was transcoded on the fly …

…after being uploaded to a service…

…from a file which was picked from the file picker

URL

URI

Stream

Blob

File

Stream

Blob

File

seamless interchange between web and local file representation for your scenarios
Seamless interchange between web and local file representation, for your scenarios
app to app contracts better with more apps
App-to-app contractsBetter with more apps
  • Users think about their content in an app-centric way“My pictures are on my photo sharing service”
  • File picker contract enables
    • Seamlessly integration with the system file picking experience
    • Delight users with a rich view that only your app can produce
file picker contract better with more apps
File Picker contractBetter with more apps

Web files

Socialite

File picker contract

Tweet@rama

App data

User files

slide37

File picker contract

  • Register in Manifest
    • <Extensions>
    • <Extension Category="windows.filePicker“
    • StartPage="filePicker.html">
slide38

File picker contract

  • Connecting to the File Picker basket
    • function onActivated(e) {
    • if (e.kind === Windows.ApplicationModel.ActivationKind.FilePicker) {
    • var basket = e.basket;
    • basket.addEventListener("fileRemoved", onFileRemoved);
    • }
    • }
slide39

File picker contract

  • Add & remove files from the File Picker basket
    • function onItemIndicated(myItem) {
    • if (basket.containsFile(myItem.id)) {
    • basket.removeFile(myItem.id);
    • } else {
    • basket.addFile(myItem.id, myItem.storageFile);
    • }
    • }
recap
Recap
  • File broker and picker offer apps full access to the file system while keeping the user in control
  • Building compelling gallery views of local files very easy, with the data-source adapter
  • Seamless interchange between web and local file representations, for your scenarios
  • App-app contracts make the experience better as more apps are installed
related sessions
Related sessions
  • [PLAT-891T] Using files: accessing, searching and acting on files
  • [PLAT-892T] Building great Metro style gallery apps today
  • [APP-398T] How to declare your app’s capabilities
  • [APP-405T] Share: your app powers the Windows 8 share experience
  • [PLAT-282T] File type associations and AutoPlay
further reading and documentation
Further reading and documentation
  • Accessing files and data
  • Adding file picker controls
  • Accessing files and data
  • Windows application contracts
  • Contact info –
    • Manav Mishra
    • http://forums.dev.windows.com (mention PLAT-894T)
    • Find me at the booth right after the talk
feedback and q uestions http forums dev windows com session f eedback http bldw in sessionfeedback
thank you

Feedback and questions http://forums.dev.windows.com

Session feedbackhttp://bldw.in/SessionFeedback

slide46

© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.