4 livefx framework .net api kit

Upload: sivadon-chaisiri

Post on 30-May-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    1/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    2/41

    Introducing the Live Framework APIKits

    Live Framework Kit for .NET Overview

    Key Concepts Accessing Live

    Managing applications data

    Sharing your data

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    3/41

    .NET developers the .NET ClientLibraries to build their applications

    Provides a .NET friendly development

    environment Consistent with the Resource Model

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    4/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    5/41

    A set of libraries which can be used toprogram using Live fx

    .NET, Silverlight and JavaScript

    Libraries available today Work on various platforms and

    programming languages

    .NET FX 3.5

    APIs

    Silverlight

    APIs

    JavaScript

    APIs

    Client

    Controls

    Web Controls

    Libraries

    Live Framework

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    6/41

    Expose the core Live service in a cohesive and consistentway with .NET

    Make it easy and natural for .NET developer to consumeLive Services

    Have a symmetrical programming model

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    7/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    8/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    9/41

    Authenticate as myself Use web authentication Web site has no access to my mesh

    Authenticate as a user on my site Use delegated authentication User controls access to his mesh

    Mesh enabled web sites authenticate same

    as before

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    10/41

    Use either local or cloud mesh

    Local mesh is already authenticated

    Cloud Mesh

    App must get username and password

    Use those credentials to authenticate to

    the cloud

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    11/41

    Local connection Local data cache

    Use it when ofine capability required

    Automatically syncs with the cloud

    Cloud connection No local data cache

    Use it when ofine capability not needed

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    12/41

    LiveOperatingEnvironment class Connect your application to the LOE

    Cloud Connection

    Local Connection Uses default user credentials

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    13/41

    LiveOperatingEnvironment

    NewsItems

    Members

    DataFeeds

    DataEntries

    Devices NewsMeshObjects

    Contacts Profiles . . .Mesh

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    14/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    15/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    16/41

    Contacts

    Profiles

    Mesh Objects

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    17/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    18/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    19/41

    Returns IQueryAble - No count returned

    Returns IEnumerable - Count is returned

    Returns List - Count is returned

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    20/41

    Parameter Description

    Orderby Sort the output by the values in the given element arg,where arg is a string.

    Skip Skip the first arg results, where arg is a positive integer.

    Take Return the next arg results, where arg is a positive

    integer.Expand Prefetch the specified resources in arg, where arg is a

    property of the returned object. More than one resource

    Returns the second dozen MeshObject entries that are folders, andsorts them by their Title element values.

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    21/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    22/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    23/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    24/41

    LiveOperatingEnvironment

    NewsItems

    Members

    DataFeeds

    DataEntries

    Devices NewsMeshObjects

    Contacts Profiles . . .Mesh

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    25/41

    DataFeed Stores application information

    Metadata and blobs

    Receive update information

    Has Replication and synchronization capabilities

    A mesh object can have any number of data feeds

    Remember to add a DataFeed to a newly createdMeshObject

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    26/41

    // Read the file.

    FileStream input = new FileStream(path + filename, FileMode.Open);

    DataEntry dataEntry = df.DataEntries.Add(input, filename);

    input.Close();

    // Required to see user data on all devices/Live Desktop/Data Model Browser

    dataEntry.Update();

    // Make sure everyone is synchronized

    df.SyncEntries.Synchronize();

    df.Update();

    DataEntry Data Entries and stored in a DataFeed

    Lowest level of storage in a mesh object

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    27/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    28/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    29/41

    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 eciency

    Extend the Request processing pipelinewith custom business logic

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    30/41

    Declarative modeling 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

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    31/41

    SequenceStatement

    Sequentially executes child statements

    InterleaveStatement

    Executes child statements in parallel ConditionalStatement

    If Else execution

    CRUD statements

    Operate on resources

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    32/41

    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

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    33/41

    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 isremoved

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    34/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    35/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    36/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    37/41

    Members

    Represents a Windows Live IDsmembership in the MeshObject.

    New members have to be invited to bepart of the Resource

    Has a role based on the object. Full, Author Writer, Reader

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    38/41

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    39/41

    Live Framework

    Allows you to integrate the cloud in acohesive and consistent way

    Enables you to move to the next inflectionpoint in the software industry

    .NET developers can use the clientLibraries to build their applications

    Start using it today, we want yourfeedback !!

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    40/41

    Start using the Mesh today

    http://lx.azure.microsoft.com

    Download The Mesh SDK and the LiveFramework Client

    https://developer.mesh-ctp.com/Developers/Developers.aspx

    Build an application

  • 8/14/2019 4 LiveFX Framework .NET API Kit

    41/41