client side programming with sharepoint 2010 - sharepoin saturday vietnam

Post on 24-May-2015

1.066 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Presented by Pham Van Trung, this topic introduces the solutions to work with SharePoint 2010 from Client side, including:- SP Client Object Model - SP Silverlight Client Object Model - SP ECMAScript Client Object Model - SP WebServices ; WCF; REST; RPC - Silverlight + JQuery + SP WebServices (http://spservices.codeplex.com/)SharePoint Saturday Vietnam was sponsored by Officience. Visit http://www.officience.com/

TRANSCRIPT

Client side programming with SharePoint 2010

Trung Van PHAM

Client side scenarios Story in SharePoint 2007 SharePoint 2010 Client Object Models

Overview of the Client Object Models .NET Client Object Model Silverlight Client Object Model ECMAScript Client Object Model ADO.NET Data Services

JQuery, SP WebServices and Silverlight

Agenda

Scenarios Web Browsers Microsoft Office Applications Custom Applications

Commonly interaction with SharePoint Display SharePoint data Manipulating with SharePoint data

Client side scenarios

Story in SharePoint 2007

SharePoint Server

SharePoint Content DB

SharePointObject Model

Applications

Web UIs

Web Services,

RPC

Web Browsers

ApplicationsCustom Services

Client Object Model provides complete API instead of more services

Provides an abstraction layer to return results as recognizable SharePoint objects

Consistent developer experience across platforms (.NET, ECMAScript, Silverlight)

Overview of the Client Object Models

SharePoint 2010 Client Object Models

SharePoint

Server

SharePoint Content DB

SharePointObject Model

Applications

Client.svc

Client Apps

Client OMs

How does Client OM work?

SharePoint Server

Client Application

Client.svc

Execute:• Command 1• Command 2• Command n

Send result back

Build sequence commands:

• Command 1• Command 2• Command n

Execute Commands

Process result

XML

JSON

Site Collections and Sites Lists, List Items, Views, and List Schemas Files and Folders Web, List, and List Item Property Bags Web Parts Security Content Types Site Templates and Site Collection Operations

Supported Areas

Consistency

Server (Microsoft.SharePoint)

.NET Managed(Microsoft.SharePoint.Client)

Silverlight(Microsoft.SharePoint.Client.Silverlight)

ECMAScript(SP.js)

SPContext ClientContext ClientContext ClientContext

SPSite Site Site Site

SPWeb Web Web Web

SPList List List List

SPListItem ListItem ListItem ListItem

SPField Field Field Field

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI

Files Microsoft.SharePoint.Client.dll (282KB) Microsoft.SharePoint.Client.Runtime.dll (146

KB) Compare to SharePoint Server OM

Microsoft.SharePoint.dll (16.2 MB)

.NET Client Object Model

DEMO 1Getting Started

.NET Client Object Model (cont)

Think about efficiency All the properties are loaded in DEMO1 Specify the properties you need:

ctx.Load(web, w=>w.Title);ctx.Load(list,l=>l.Title, l=>l.ItemCoun);ctx.ExecuteQuery();

.NET Client Object Model (cont)

DEMO 2Specifying properties to load

.NET Client Object Model (cont)

Loading List Items List Items are always loaded using a CAML

Query[[Code]] - tbd

.NET Client Object Model (cont)

DEMO 3Loading List Items

.NET Client Object Model (cont)

DEMO 4Creating and Updating List Items

.NET Client Object Model (cont)

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ClientBin

Files: Microsoft.SharePoint.Client.Silverlight.dll

(266K) Microsoft.SharePoint.Client.Silverlight.Runtime.

dll (142K)

Silverlight Client Object Model

[[tbd]] Code

Silverlight Client Object Model (cont)

DEMO 5Creating the Silverlight Web Part

Silverlight Client Object Model (cont)

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS

Files: SP.js (381 KB) Debug version: SP.debug (561 KB)

ECMAScript Object Model

[[tbd]] Code

ECMAScript Object Model (cont)

DEMO 6ECMAScript Object Model

ECMAScript Object Model (cont)

LINQ to SP not implemented in Silverlight ListData.svc provides RESTful access

ADO.NET Data Services

ListData.svcLoads ADO.NET Data Services handler assembly

DEMO 7REST demo

ADO.NET Data Services (c0nt)

SPServices: JQuery Library for SharePoint Web Services Site Url: http://spservices.codeplex.com/

SPServices

DEMO 8JQuery, SPServices and Silverlight

SPServices (cont)

Q & A ?THANK YOU!

Summary

top related