Você está na página 1de 40

Usama Wahab Khan

Solution Architect ,Microsoft Technical Community Leader,


Microsoft Certified Trained ,MCPD ,MCTS , MCTIP. For SharePoint and .NET
/Azure
Vice -President, Technology Middle east and Europe (DAVIGOLD LLC)
2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

User Groups
http://uaesharepoint.org/
Dev Saturday UAE

Join US
2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Agenda
OVERVIEW NEW API SHAREPOINT
CSOM JSOM INTRODUCTION
REST IMPROVEMENT
New JS based Modern Frameworks (JS
Knockout)
DEMO
New tools
2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

SharePoint Server 2013 Workloads


Portals and Collaboration
Search
Enterprise Content Management
Web Content Management
Social and Communities
Business Connectivity Services
Business Intelligence
2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Entry Points for Developers in SharePoint


2013
Server-side object model
Managed code
Windows PowerShell
Client.svc
Client-side object models
REST/OData clients

Declarative customizations

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

What's New in SharePoint 15


Cloud App Model

Familiar programming model using web standards

Development tools

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

What's New in SharePoint 15


Core platform enhancements

Mobility

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

What's New in SharePoint 15


Business Connectivity Services

Application services

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

APIsImprovements

More Web Standards (Odata,Oauth)


More Client Side Support
Improved Rest Model and EndPoint
Odata URL base Query Engine
OAuth Web base identity system.
MobileTemplates.

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

APIsImprovements
By Features
Feature

.NET Framework or Silverlight object


models

JavaScript object model

REST/OData endpoints called from a


Windows platform or JavaScript

Object-oriented programming

Yes

Yes

No

Batch processing

Yes

Yes

No

APIs for conditional processing and


exception handling

Yes

No

No

Availability of LINQ syntax

Yes

No

No

Combining list data from different


SharePoint web applications

Yes

No

Yes

Familiarity to experienced REST/OData


No
developers
Similarity to non-Windows programming No
or JavaScript programming

No

Yes

Yes

Yes

Strong typing for list item fields

No (except with LINQ)

No

Yes, from Windows platform


No, from JavaScript

Leveraging jQuery, Knockout, and other


JavaScript libraries

No

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

The device on which the code runs.

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Preview us CSOM
Everything WAS
client.svc

Issues with
CSOM

No Direct Access to
client.svc Web
Service
Must use a Proxy or
Supported End Points
Supports .NET
Silverlight &
JavaScript
2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

2010 CSOM

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

SharePoint 2013 CSOM

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

x
Changes
in SharePoint 2013
Extended REST Support for Client.svc
Client.svc with REST
Clients

New APIs
New APIs for Server
Functionality
API for Windows Phone
Development

Direct Access to client.svc Web


Service
Access HTTP GET, PUT, Merge, POST
Requests
OData Implementation
For More Information
http://tinyurl.com/SP2013Odata
Writing
Code from NON Microsoft
2012Apps
Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

New CSOM API Support


User
Profiles

Search

Taxono
my

Sharing

Workflo
w

EDiscovery

Feeds

Publishi
ng

Lists

IRM

Analytic
s

Busines
s Data

Support both Server Side code and REST


2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

SharePoint 2013 CSOM Architecture


_api
Server
Client

Execute
Query

.NET CLR
Library

Silverligh
C
t Library

JavaScrip
t Library

Custom Client Code


2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

OData

Changes in SharePoint 2013


CSOM

Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.RunTime.dll


Available in SharePoint Foundation
contains the core classes
2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Customization packaging and deployment


options

Development &
Customization

Farm

Sandbox

Full trust solutions


Customizations to
file system of
servers
Classic model
from 2007

Declarative
elements
Partially trusted
code service still
included for
limited server side
support

SP Apps
New Apps model
Deployed from
corporate catalog
or office market
place
Manage
permission and
licenses
specifically
Preferred option

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Demo
Managed Client
OM
2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Demo
JavaScript Client
OM
2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

MVVM
Separation of powers/interests
Model
Holds the information
Independent of UI

View
Formats the information
State representation of the view model

ViewModel
Encapsulates behavior
Code representation of data and
operations

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Knockout.js
JavaScript Library
Free, Open Source
No dependencies (other than JavaScript)
Compatible with all major browsers
Used to implement Model View ViewModel pattern
2-Way Data Binding
Notify subscribers about changes
2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Whats REST and Why?


Significant
Industry
Momentum

Simple and
Easier to Use

Easier than SOAP


Based WSs
Higher Productivity
using JavaScript and
JQuery
Results as JSON and
ATOM

How to Query
Everything is URL
Results can be
cached on Proxy
Servers.

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

REST in SharePoint 2010


ListData.svc

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

REST in SharePoint 2013


NEW : CSOM URLS can go through /_api/folder
Replace
http://intranet/_vti_bin/client.svc/
web with
http://intranet/_api/web/

Lot more simple URL


Helps in 256 Character
Limit of URLs in browser
ListData.svc is still there
for backword
compatiability
OLD Aps will still work but
needs to be updated

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Client OM and OData

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

What is OData?
Web Protocol for Basic CRUD
Operations on Data

Brand New Data Access API

Built on top of HTTP, ATOM


and JSON

Uses HTTP Verbs Get, Put,


Delete, Merge, Post

Support for all kind of Data,


RD, FS, CMS or Web

Access to Information Across


Platforms

More Information @ http://www.odata.org/


2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

OData Implementation Details


OData Maps CRUD Operations to HTTP Verbs

Methods will be mapped into either

Read mapped to GET

Navigation Operations e.g.


List.getByTitle via a GET
Request

Insert Mapped to POST

Service Operation via POST,


PUT, MERGE or Delete

Update Mapped to PUT or


MERGE
Delete Mapped to DELETE
More Information @ http://www.odata.org/
2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

URLs
Service Root URI : http://intranet.contoso.com/_api/
Resource Path SQL Table or Web or List
Query Strings Options $Filter, $select, $orderby

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

REST Return ATOM XML vs. JSON


Control data format response with ACCEPT
header
ATOM-PUB XML
Verbose
Easier to Read
ACCEPT = application/atom+xml

JSON
Condensed notation
Smaller payload
ACCEPT =
application/json;odata=verbose
;

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Managing Objects to Resources


Example REST URLS
http://Intranet.consoto.com/_api/web/
http://Intranet.consoto.com/_api/web/Lists
http://Intranet.consoto.com/_api/web/Lists/
getByTitle(Customers)
http://Intranet.consoto.com/_
api/web/getAvailableWebTemplates(lcid=1033
http://Intranet.consoto.com/_api/web/
http://intranet.consoto.com/_api/web/Lists/
getByTitle(Customers)/Items(0)/?$select
CustomerName,CustomerId,Address

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Summary
CSOM
Now Covers More
Important for App Development

REST
Improved Syntax
Easy to Use with JavaScript than C#

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Some Great Resources


http://msdn.microsoft.com/en-us/library/jj164060.aspx
http://msdn.microsoft.com/en-us/library/jj163201.aspx
http://msdn.microsoft.com/en-us/library/jj164022.aspx
http://msdn.microsoft.com/en-us/library/jj163800.aspx
http://msdn.microsoft.com/en-us/library/fp142385.aspx
http://msdn.microsoft.com/en-us/library/fp142380.aspx
http://msdn.microsoft.com/en-us/library/fp142386.aspx
http://msdn.microsoft.com/en-us/library/jj193034(v=office.15).
aspx
http://
code.msdn.microsoft.com/office/SharePoint-2013-Perform-a-1
bf3e87d/view/SourceCode#content
http://msdn.microsoft.com/en-us/library/jj860569.aspx

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Office 365 Cloud Business App


Visual Studio 2013 introduces a new project template for Office 365 Cloud Business App toenable
developers to quickly build modern business applications that can integrate with and extend the
Office 365 platform experience. The Cloud Business App template provides a rich set of tools and
built-in functionality that make it easy to work with data and leverage Office 365 services such as
identity and social.

Build Supper Quick Apps.


Connect SQL Server based Data Sources.
Create Multiple Screens for all Devices.
Use Workflow with Cloud Business App.
Essay debugging.
Field Validation.

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Office 365 Cloud Business App

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Office 365 Cloud Business App

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Office 365 Cloud Business App

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012.

Você também pode gostar