40
©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. 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. Solution Architect,Microsoft

Embed Size (px)

Citation preview

Page 1: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Usama Wahab Khan

Solution Architect ,Microsoft Technical Community Leader,Microsoft Certified Trained ,MCPD ,MCTS , MCTIP. For SharePoint and .NET /AzureVice -President, Technology Middle east and Europe (DAVIGOLD LLC)

Page 2: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

User Groups

Join US

http://uaesharepoint.org/

•Dev Saturday UAE

Page 3: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

©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

• Cloud App.

Page 4: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

• Portals and Collaboration

• Search

• Enterprise Content Management

• Web Content Management

• Social and Communities

• Business Connectivity Services

• Business Intelligence

SharePoint Server 2013 Workloads

Page 5: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

©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

Page 6: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

©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

Page 7: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

©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

Page 8: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

©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

Page 9: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

SharePoint  2013  APIs Improvements  

·         More Web Standards (Odata,Oauth)·         More Client Side Support ·         Improved Rest Model and EndPoint·         Odata URL base Query Engine ·         OAuth Web base identity system. ·         Mobile Templates. 

Page 10: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

SharePoint  2013  APIs Improvements  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 developers

No No Yes

Similarity to non-Windows programming or JavaScript programming

No Yes Yes

Strong typing for list item fields No (except with LINQ) No Yes, from Windows platformNo, from JavaScript

Leveraging jQuery, Knockout, and other JavaScript libraries

No

Page 11: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

The device on which the code runs.

Page 12: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

©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

Page 13: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

2010 CSOM

Page 14: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

SharePoint 2013 CSOM

Page 15: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Changes in SharePoint 2013x

Extended REST Support for Client.svc

New APIs

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

For More Informationhttp://tinyurl.com/SP2013Odata

Client.svc with REST Clients

•Direct Access to client.svc Web Service• Access HTTP GET, PUT, Merge, POST Requests•OData Implementation•Writing Code from NON Microsoft Apps

Page 16: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

New CSOM API Support

E-Discovery

TaxonomySearch

Workflow

Sharing

User Profiles

Analytics

PublishingFeeds

IRMBusiness Data

Lists

Support both Server Side code and REST

Page 17: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

SharePoint 2013 CSOM Architecture

CSilverlight Library

.NET CLR Library

JavaScript Library

_api

Execute Query

Server

Client

OData

Custom Client Code

Page 18: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Changes in SharePoint 2013 CSOM

• Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.RunTime.dll• Available in SharePoint Foundation• contains the core classes

Page 19: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Customization packaging and deployment options

Farm

• Full trust solutions• Customizations to

file system of servers

• Classic model from 2007

Sandbox

• 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

Development & Customization

Page 20: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

DemoManaged Client OM

Page 21: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

DemoJavaScript Client OM

Page 22: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

MVVM

Separation of powers/interestsModel

Holds the informationIndependent of UI

View Formats the informationState representation of the view model

ViewModelEncapsulates behaviorCode representation of data and operations

Page 23: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Knockout.js

JavaScript LibraryFree, Open SourceNo dependencies (other than JavaScript)Compatible with all major browsersUsed to implement Model View ViewModel pattern2-Way Data BindingNotify subscribers about changes

Page 24: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

What’s REST and Why?

Significant Industry Momentum

Simple and Easier to Use• Easier than SOAP Based WS’s•Higher Productivity using JavaScript and JQuery• Results as JSON and ATOM

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

Page 25: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

REST in SharePoint 2010

ListData.svc

Page 26: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

©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

Page 27: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Client OM and OData

Page 28: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

What is OData?

Access to Information Across Platforms

Uses HTTP Verbs Get, Put, Delete, Merge, Post

Support for all kind of Data, RD, FS, CMS or Web

Built on top of HTTP, ATOM and JSON

Web Protocol for Basic CRUD Operations on Data

Brand New Data Access API

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

Page 29: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Page 30: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Methods will be mapped into eitherOData Maps CRUD Operations to HTTP Verbs

OData Implementation Details

Update Mapped to PUT or MERGE

Delete Mapped to DELETE

Service Operation via POST, PUT, MERGE or Delete

Insert Mapped to POST

Read mapped to GETNavigation Operations e.g. List.getByTitle via a GET Request

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

Page 31: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

URLsService Root URI : http://intranet.contoso.com/_api/

Resource Path – SQL Table or Web or List

Query Strings Options – $Filter, $select, $orderby

Page 32: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

©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;

Page 33: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

©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

Page 34: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Summary

CSOMNow Covers More Important for App Development

RESTImproved SyntaxEasy to Use with JavaScript than C#

Page 35: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

©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-1bf3e87d/view/SourceCode#content

http://msdn.microsoft.com/en-us/library/jj860569.aspx

Page 36: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Office 365 Cloud Business AppVisual Studio 2013 introduces a new project template for Office 365 Cloud Business App to enable 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.

Page 37: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Office 365 Cloud Business App

Page 38: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Office 365 Cloud Business App

Page 39: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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

Office 365 Cloud Business App

Page 40: ©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July 2012. Solution Architect,Microsoft

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