Developer Day What's new for developers using SharePoint Server 2013 Thomas J. Palmié Architect, Microsoft [email protected].

Download Report

Transcript Developer Day What's new for developers using SharePoint Server 2013 Thomas J. Palmié Architect, Microsoft [email protected].

Developer Day
What's new for developers using
SharePoint Server 2013
Thomas J. Palmié
Architect, Microsoft
[email protected]
Session Objective(s):
Build
Windows Client
Consumerization
Of IT
Business
Productivity
On Premises
Business
Productivity
In the Cloud
Run
Plan
Dynamic
Workplace
Solutions
Datacenter
Solutions
Business and
Mission Critical
solutions
IaaS
IaaS
CRM/ERP
Custom
Enterprise
Applications
Private Cloud
Hybrid Cloud
Lifecycle Services
Business
Intelligence
The solutions enable productive work styles through flexible and secure access to information, social connections and
collaboration, maximizing individual and team productivity. These solutions focus on people, place and Microsoft
technologies to provide a secure and flexible productivity platform for our customers business.
SharePoint Development Tools
Apps and the cloud app model
CSOM
REST
Agenda
SharePoint
Development Tools
 SharePoint 2013 Investment is with SharePoint
Apps
 SharePoint Solution Development is Still Possible
 Visual Studio project templates for 2 different styles
App
Development
Classic Solutions
Development
 Created using SharePoint 2013 Project Template
 You can add many types of items to "Classic"
project
 Project Items to create Custom List Schema
 Visual Studio provides new Content Type Editor
 Adding List provides new customization option
Demo
SharePoint List Designer
Apps and the cloud
app model
 Custom code on server
 Sandbox
 In both, developers must know SharePoint
API





SharePoint applications no longer live in SharePoint
Custom code executes in the client, cloud or on-prem
Apps are granted permissions to SharePoint via OAuth
Apps communicate with SharePoint via REST / CSOM
Acquire apps via centralized Marketplace
 SharePoint hosted apps wholly reside in SharePoint
 Uses SharePoint artifacts (lists/libraries)
 Business logic executes or on the client
Demo
SharePoint hosted App
Apps are a very different philosophical change to
extending SharePoint
 More scenario-focused
 Robust
 Apps are for End Users
 Cloud & Web-Oriented
 Everything in a SharePoint site is an app
 Formerly known as View All Content, the Site Contents
link shows all apps in a site & links to the SharePoint
Store (public) and App Catalog (internal)
 Selecting an app redirects to the app’s start page
 No custom code on the SharePoint server
 Reduces the ramp-up time for those building apps
 Leverage hosting platform features in new apps
 Enables taking SharePoint apps to different levels –
further than what can be done with farm / sandbox
solutions
 Isolation – private vs. public clouds
Full-Trust
Solutions
Sandboxed
Solutions
Apps
Use Client-Side SharePoint API
X
X
X
Use Server-Side SharePoint API
X
(X)
Use Remote Services
(X)
App-based Permissions (OAuth2)
On-Premise Deployment Friendly
Hosted Deployment Friendly
X
X
X
X
X
X
X
Distribution via Marketplace
X
SharePoint Provided Schematics for Install
/ Upgrade / Uninstall
X
Provider-Hosted App
“Bring your own server hosting infrastructure”
Cloud-based Apps
Get remote events from
SharePoint
Use CSOM/REST +
OAuth to work with SP
Autohosted App
Windows Azure + SQL Azure
provisioned invisibly as apps are
installed
SharePoint-Hosted App
Provision an isolated sub web on a parent
web
• Reuse web elements
(lists, files, out-of-box web parts)
• No server code allowed; use client
JavaScript for logic, UX
SharePoint
Web
Your Hosted
Site
SharePoint
Web
Windows
Azure
Websites
Parent
Web
App Web
(from WSP)
 Cloud hosted apps primarily execute outside of
SharePoint
 May use SharePoint artifacts (lists/libraries)
 Business logic lives & executes outside of SharePoint
Demo
Cloud hosted App (Provider hosted App)
Cloud Hosted Apps
SharePoint Hosted Apps
Preferred hosting model for almost all
types of apps
Good for smaller apps & resource
storage
Full power of web – choose your
infrastructure & technology
SharePoint-based; no server-side code
May require your own hosting
Automatically hosted in SharePoint
May require you own handling of
multitenancy & permission
management
Inherent multitenancy & isolation
Shape
Description
Example
Immersive Full Page
App
App that implements a new
scenario for customers
Resource Tracking,
Budgeting
App Part
Provides new parts you can
add to your sites
Weather,
Team Mascot, News
Extension App
Add new actions for
documents and items
Display Document
Visualization, Print to
Print Service Vendor
Web Scope
Tenant Scope
 When apps are provisioned, new SPWeb (AppWeb)
created within hosting SPWeb
 Each App hosted on it’s own unique URL because:
 Applications can be acquired multiple ways
 Public Marketplace
 App Catalog
 Custom Deployment Process
CSOM and REST
CSOM Made Accessible through client.svc
Managed CSOM easier to use than from
JavaScript
_vti_bin/client.svc
Server
Execute
Query
Client
.NET
Library
Microsoft.SharePoint.Client.dll.
Silverlight Library
Microsoft.SharePoint.Client.Silverlight.dll
Custom Client Code
JavaScript Library
sp.js
The client.svc service extended with REST
capabilities
CSOM Extended new APIs
New APIs with SharePoint Server functionality
_api is new alias for _vti_bin/client.svc
Server
Client
Execute
Query
REST uses
OData
JavaScript
Library
Silverlight
Library
Custom Client Code
.Net CLR Library
ListData.svc carried over from SharePoint 2010
Your JavaScript Code
Browser
JavaScript OM
Proxy
Proxy
Managed OM
JSON Response
Server OM
XML Request
XML Request
Client.svc
Content
database
JSON Response
Managed Client
Your C# and VB.NET Code
SharePoint Web Server
In SharePoint Foundation
In SharePoint Server
Demo
CSOM with JavaScript
Significant Industry Momentum
Simpler and Easier to Use
Each query is submitted with a unique URL
“THE” New Data Access API for HTTP-based Clients
OData maps CRUD operations to HTTP verbs
Methods will be mapped into either…
URI has three significant parts
CSOM URLS can go through _api folder
You can replace this URL
_vti_bin/client.svc
With this URL
_api
Example REST URLs targeting SharePoint sites
Demo
REST Interfaces
Review
Session Objective(s):
Understand the core developer investment areas in SharePoint Server 2013
Understand the SharePoint development tools, App development, CSOM and REST
Training for Developers
http://msdn.microsoft.com/en-US/office/apps/fp123626
Agenda
http://spo.com/site/
http://tenant-xyz.spo.com/site/
Browser hosted
from SP Domain
Browser hosted
from App Domain
Your app JavaScript never
runs in this domain
client
server
http://nonSpDomain/
Browser hosted
on non SP domain
doesn’t work due to browser crossdomain, or does it?
web services hosted
from SP domain
restricted set of web services
hosted from app domain
SharePoint Server
(no custom server code)
you can’t put code here!
Azure Server
http://spo.com/site/
Browser hosted
from SP Domain
http://tenant-xyz.spo.com/site/
Browser hosted
from App Domain
http://nonSpDomain/
Browser hosted
on non SP domain
CSOM/REST via
POSTMESSAGE to
IFRAMES
SP.RequestExecutor.js
proxy.aspx
client
server
web services hosted
from SP domain
restricted set of web services
hosted from app domain
SharePoint Server
(no custom server code)
Azure Server