- Day Two
- James McClutcheon
- 9AM
- The security tokens I was given enables me to access http://connection.microsoft.com/
- I can do the labs later (only need Visual Studio, the tokens and download the CTP of Mesh)
- Background
- What is Live Framework
- Example Experience
- People are increasingly “on-the-go”
- They are using more devices
- Connectivity is proliferating
- Life-styles and work-styles are blending
- They are working and playing together more digitally
- => Increasingly Expecting – Demanding – Complete End-to-end Experiences…
- “Experience first” clients
- iTunes/ITMS
- Live Photo Gallery / Flickr
- Live Mail / Photo Mail
- Office / Office Live Workspace
- Outlook / Salesforce Outlook Edition
- Platform point solutions
- Cloud storage
- Offline application
- Device synch and access
- 3rd party extensibility
- What if you had one integrated platform designed to support the rich client experience in a standard, open way?
- Connected experience through services and devices working together
- Connectivity and communication is everything
- => Live Framework: Connecting devices, data and applications through a consistent, approachable framework
- User-centric data:
- Identity
- Contacts
- Files
- Calendar
- …
- User-centric services:
- Resource Model: Extensible, user-centric data store
- Sync: User centric data synchronization
- App Mgmt: Discover, provision & share apps
- Device Mgmt: Management of a user’s devices
- Live fx is the uniform way for programming Live Services
- Any platform
- Any programming language
- Any application or device
- Live fx makes it easy to build software + service applications
- .NET developers can use the Live fx API Kits to build applications
- User-centric to the core
- Software plus Services distributed platform
- Universal reach + “experience first”
- Design for humans and code
- Internet scale
- Re-use proven assets
- Platform
- Data model and API for a S+S system
- Integration and symmetry between devices and cloud
- Service
- Microsoft’s hosted instance of the Live Framework
- Software
- Client runtime for mesh-aware applications
- Servers for federated Live Framework components
- Sample application
- Demonstrating depth of Live Framework enabled by the platform
- Integrate Live Services into your applications
- Opt in to as much of the Live Framework as you like
- Expose your applications as Mesh Applications
- => Rich + Reach Applications
- https://developer.mesh-ctp.com/
- Blockbuster favourites
- Cloud Services
- Client Runtime
- Key benefits
- Distributed system for data replication
- Designed for “optimize online, enable offline” experience
- Symmetric API for serviceรณservice and app<->service
- Flexible data model to suit application needs
- Microsoft-hosted data-centre and operations
- Guaranteed communications regardless of topology
- Great tool-ability
- Target platform applications
- Traditional client applications (e.g. Office, Photo Gallery, Media Player)
- New classes of connected applications (e.g. Media Centre, Zune)
- Rich interactive applications (e.g. New York Times Reader, MetaCafe)
- Cloud services and universal web applications (e.g. SkyDrive, Flickr)
- APIs: REST
- Resource Model: Feeds
- Symmetric client/cloud programming model
- Strongly typed managed code wrappers for simplified access
- Pub/sub support for pushing notifications on most resources
- Share file across devices
- Access apps across the internet
- Extend windows to the web and web to windows
- Live Folders: Share and synchronize your information automatically across all your connected devices
- Live Remote: Access to any application or device
- Live PC: Browser based experience that enables access to your applications and information from anywhere
- Symmetric programming model
- Protocol based
- Resource oriented
- Simple infoset
- Entities
- Collections
- Relationships
- Standards based
- Unified model for all Live types
- Consists of resources and their relationships
- Resources
- Uniquely addressable
- Based on a simple infoset
- Can be rendered to various wire representations
- Relationships
- Navigatable, can be inlined
- Uniform access to all Windows Live resources types
- Contacts, Profiles, News, Activities, Friends
- MeshObjects (includes Files, Folders, Photos)
- Devices
- Applications
- Top level container
- Contains
- Contact Collection
- Profiles
- Mesh
- Possibly other Live data
- Available online/offline
- Owned/Controlled by the user
- Contains all the information about: Devices, Data, Applications, News aggregation
- Top level resource container
- All contained resources are related
- Unit of permission/distribution
- Contains: DataFeeds, Mappings, Members, News
- Unit of synchronization
- Container for: DataEntry, FeedSync, MediaResource
- Can contain other DataFeeds to create hierarchy
- Smallest unit of data
- Specifies the actual data being stored
- Can contain enclosures of application defined schema
Authentication
- How do I identify myself?
- Cookie token
- Obtained from Windows Live ID
- Connects as the user
- Delegated Authentication
- Token based
- User provides consent
- Has expiration
- Is Revokable
- Provides ACL like restrictions
- Local Mesh is already authenticated
- Cloud Mesh
- App must provide log in dialog
- App must provide credentials to cloud API
Live fx Cloud APIs Resource Access
- Relative URI
- Optimistic Concurrency
- HTTP verbs
- GET
- PUT
- OPTIONS
- DELETE
- Retrieves the feed for the resource
- Common return codes
- OK
- Internal Server Error
- Request Headers
- Accept
- ContentLength
- ContentType
- IfModifiedSince
- Authorization
- Cookie
- Updates the resource
- Common return codes
- OK
- InternalServerError
- PreconditionFailed
- Request Headers
- IfMatch
- ContentLength
- ContentType
- Authorization
- Cookie
- Deletes a resource
- Common return codes
- OK
- InternalServerError
- PreconditionFailed
- Request Headers
- IfMatch
- Authorization
- Cookie
- Returns information about the resource
- Authentication model
- Concurrency model
- Whether the resource is subscribe-able
- Whether the resource is extensible
- List of supported media types
- Life of supported query parameters
- List of relationships for the resource
- List of supported methods (Verbs)
- XML Schema Definition (XSD) for the resource
- Common return codes
- OK
- InternalServerError
- PreconditionFailed
- Request Headers
- IfMatch
- Authorization
- Cookie
- The Resource Browser is your friend!
- But I don’t know ATOM!
- No problem
- Feed types available today
- ATOM
- RSS
- JSON
- POX
But I have a lot of data!
- No problem
- Don’t pull all the data down
- Pre-sort the data
- Use the power of the server
- Used only on GETs
- Add clauses to regular queries
- Equivalence: eq, ne, gt, lt
- Boolean: and not, or
- Output Parameters: orderby, skip, take, top
Can I automate it?
- Resource Scripts
- What are they?
- Small domain specific language
- Declarative way to interact with LOE
- Logical equivalent of batched procedures
- Why use them?
- Frees you from the lower level details of the HTTP protocol
- Improves efficiency
- Extend the Request processing pipeline with custom business logic
- Declarative modelling for
- Control Flow Statements: Sequence, Interleave, Conditional, CRUD
- Data Flow Statements: Bind statements
- Run locally or on the server
- Can run as triggers
- Serialized as POX or JSON
- SequenceStatement: Sequentially executes child statements
- InterleaveStatement: Executes child statements in parallel
- ConditionalStatement: If… Else… execution
- CRUD statements: Operate on resources
- Server Side Execution
- Script.RunAtServer(credentials)
- Single HTTP request/response
- Client Side (In Process) Execution
- Script.Run(credentials)
- Multiple HTTP requests/responses
- Each statement generates request
- Attach to a resource instance
- Pre and post logic on Create, Update and Delete
- Examples:
- Create a thumbnail after an image resource is created
- Remove a folder if the last child object is removed
- Create the statement DOM
- Compile the DOM and generate the ResourceScript instance
- Execute the ResourceScript instance
- If a trigger, attach to the resource
- Understand the Resource Model
- Use standard HTTP requests
- Use the format you are comfortable with
No comments:
Post a Comment