24
Relearning SharePoint Development The New Way to Develop Solutions and Apps @BASPUG @Bob1German Develop Outside the Box

Relearning SharePoint Development

  • Upload
    bgerman

  • View
    317

  • Download
    0

Embed Size (px)

DESCRIPTION

Presentation at Boston Area SharePoint Users Group

Citation preview

Page 1: Relearning SharePoint Development

Relearning SharePoint DevelopmentThe New Way to Develop Solutions and Apps

@BASPUG @Bob1German

Develop Outside the Box

Page 2: Relearning SharePoint Development

About the Speaker

Bob GermanPrincipal Architect at BlueMetal Architects

Developer and architect on the SharePoint platform since it was called “Site Server 3.0”

Co-author of SharePoint 2010 Development with Silverlight for Addison-Wesley

http://blogs.msdn.com/BobGerman

BlueMetal Architects We are experts at building solutions that exactly meet

the needs of our customers by apply the right people, processes and platforms.

Our focus is on modernizing applications through expertise in Creative, Social, Development and Data.

We have offices in Boston, New York, and Chicago.

@Bob1German

@BASPUG @Bob1German

Page 3: Relearning SharePoint Development

A Brief History of SharePoint Development

2007 • Well documented model with “Features” and “Solutions”

2010 • Added Sandbox• Added Client APIs

2013 • Deprecated Sandbox• Added App Model, more Client APIs

2003 • First .NET version; limited API• No documented deployment model

20032001 • ASP Classic “Digital Dashboard”• CAML is born

Key concept:Microsoft wants us to start developing outside of SharePoint• Similar to Facebook and other online service “apps”• Code runs in browser or an external web site;

access SharePoint via Client API’s• Works in Office 365 and other hosted services• Helps with stability, upgradability on-premises as

well

Page 4: Relearning SharePoint Development

approaches to SharePoint development:

2007 • Well documented model with “Features” and “Solutions”

2010 • Added Sandbox• Added Client APIs

2013 • Deprecated Sandbox• Added App Model, more Client APIs

2003 • First .NET version; limited API• No documented deployment model

20032001 • ASP Classic “Digital Dashboard”• CAML is born

A Brief History of SharePoint Development

Farm Solution Sandboxed App

Hosting: On-prem On-prem, O365

On-prem, O365

Code runs: In browser orOn SharePoint servers

In browser orIn SP user code service process

In browser orOn external site, out of SharePoint

Capability: Unlimited Very Limited Emerging

API: Server Server (limited)

Client

Security: Code can be omnipotent

Code runs as a user

Code runs as app or user

1 2 3

@BASPUG @Bob1German

Page 5: Relearning SharePoint Development

Welcome to the App Model

ExternalHosting

HostWeb

App Web

The Maturing of SharePoint Development• Complete App isolation• Isolated execution (outside of SharePoint)• Isolated storage (SharePoint “App Web”)• SharePoint can completely clean up when

app is removed• Granular App Permissions – Control

what each app can do on behalf of users

Page 6: Relearning SharePoint Development

Welcome to the App Model

HostWeb

App Web

SharePointHosted App

Provider or Auto-Hosted App

App Azureor other provider

HostWeb

App Web(optional)

App is installed

here

App runs here

@BASPUG @Bob1German

Page 7: Relearning SharePoint Development

HostWeb

AppWeb

Using the App Web and the Cloud

Provisioned by SharePoint on app installation

Code in Javascript on browserNo Server Code – period!(though you can leverage installed ASP.NET controls)

May contain declarative, web-scoped features (lists, site pages, client script, images, css)

Access host web via cross-domain library

Auto-hosted apps are provisioned by Office 365 on app installation(Office 365 only; not yet released)

Any hosted web site can work; pretty much anything goes

Access host and app webs via OAuth – run under: End user’s permissions App permissions

App Web “Cloud”(Provider or Autohosted)

Page 8: Relearning SharePoint Development

App Isolation

App Azureor other provider

HostWeb

App Web(optional)

http://myserver/sites/myweb/

http://app12345/sites/myweb/

http://whatevs.com/somepath/

Different domain names leverage browsers’ same-origin policy

@BASPUG @Bob1German

Cross-DomainLibrary

OAuth

Page 9: Relearning SharePoint Development

The App Model Today

Complete isolation Apps can’t interfere with the

operating system Apps can’t interfere with other apps Apps have granular permissions –

no more omnipotent code

Central distribution Vet and control apps

No more messes The system can clean remove an

app completely App isolation should make upgrades

easier

Applications are restricted Can’t take advantage of server APIs More difficult to interact with other

apps Can’t elevate privileges –

no more omnipotent code

Central distribution Need to configure, host apps

Version 1 Challenges No auto-hosted apps on prem or in

Store Limited functionality

Can’t change host web page (e.g. branding)

Client API’s much better but not complete

Can’t be provisioned in site templates

Most solutions need to be rewritten

The Good The Bad and The Ugly

Page 10: Relearning SharePoint Development

?Will Sandboxed solutions

really go away, and when?

Where are we supposed to host provider-hosted apps?

Will Auto-hosted apps be available on premises?

And if they are – will they run on premises or in Windows Azure?

Will the app modelbe another flash in the

pan like Sandboxed Solutions or Silverlight?

Will Microsoft stop supporting Farm Solutions

some day?

Will my organization wantto run SharePoint in

the cloud?

What’s a SharePointProfessional to do?

Is my organization ready for SharePoint 2013?

@BASPUG @Bob1German

Page 11: Relearning SharePoint Development

Develop Outsidethe Box

Instead of… Start to…

Running code on the server

Run code in the browser

Using the Server API Use the Client APIDesigning solutions the traditional way

Design solutions that are structured like apps

Buying products that work only on premises

Buy products that work in Office 365

Office365?

Pretend you might be going to Office 365…• It’s a good bet Microsoft will invest in development

approaches that work on Office 365• You will enjoy the stability and ease of

administration that Office 365 requires

Page 12: Relearning SharePoint Development

Real World Scenario: IT Issues Dashboard

Visual tracking of issues across a large department Common uses:

Track service requests (help desk, etc.) Track workflow performance (used with an audit list) Dashboard to display SharePoint list data

The challenge:

The solution: Run it all in a Content Editor Web Part(or in a SharePoint Hosted App)

Dev

elop

Out

side

the

Box

@BASPUG @Bob1German

Page 13: Relearning SharePoint Development

Develop Outside the Box

1. Develop in the BrowserBrowser Programming and SharePoint Hosted Apps

2. Develop in the CloudProgramming in Azure and External Web Sites

3. Develop in Workflow ManagerSharePoint 2013 and Workflow Foundation 4.5

Page 14: Relearning SharePoint Development

1. Developing on the

Client

Page 15: Relearning SharePoint Development

Site Provisioning Tool

Lists and provisions child sites using a customWeb Template

Common uses: Manage sites within a department site collection Manage project sites Automatic navigation to child sites

Began its life humbly as a sandboxed solutionNow living a dual life:

In a Content Editor Web Part in SharePoint 2010 In an App in SharePoint 2013

@BASPUG @Bob1German

Page 16: Relearning SharePoint Development

Code Walk-through

2010 2013

1HTML and CSS

1

1

2Get SP Context

2

24

Find WebTemplate

5Create Child Site

3Get and display sites

3, 4, 5

3, 4, 5

Page 17: Relearning SharePoint Development

2. Developing in the

Cloud

Page 18: Relearning SharePoint Development

Location Mapping Tool

Geocodes list items and displays them on a map

Common uses: Display store or customer locations Adapt to plot events or photos on a map Get ready for the new GeoLocation features in SharePoint

2013

This one started as a SharePoint Provider Hosted App

Now moonlighting: As a server-side event handler and

Visual Web Part in SharePoint 2010 As a remote event handler and Client Web Part

in a SharePoint Provider Hosted App

@BASPUG @Bob1German

Page 19: Relearning SharePoint Development

Code Walk-through2010 2013

4

4

4Handle List Event

2Locations List

2

2

3HTML and CSS

3 3

5Geocode; Update list

5

5

6Get SP Context

6

6

7Display Map

7

7

1GeoLocation Field

1

1

Page 20: Relearning SharePoint Development

3. Developing for

Workflow Manager

Page 21: Relearning SharePoint Development

Workflow in SharePoint 2013

SharePoint 2013

SharePoint Designer 2013

Visual Studio 2012

SharePoint 2010Workflow Engine

WorkflowManager

1.0

SQL Server andWindows Server

ClientOMREST Services

Workflow Manager hosts WF 4.5 workflows

Workflows are 100% declarative

Extend via web services, not installed assemblies

Page 22: Relearning SharePoint Development

Microsoft Moved the Cheese

Traditional SharePoint Development(Code runs on

SharePoint servers)

New AppModel

(Code runs outside of SharePoint)

Old PackagingNew Approach

(Code runs outsideof SharePoint)

SharePointDeveloper

Page 23: Relearning SharePoint Development

Summary and Call to Action

Prepare for the future:Pretend you might be going to Office 365

Update Development Skills Learn client side development (Javascript, jQuery, Client OM, etc.) Learn SharePoint App design patterns Learn Azure and Oauth

Develop more in the browser, less on the serverFavor client APIs over server APIs

@BASPUG @Bob1German

Architectural Overview http://bit.ly/FutureProof-A

SP-Hosted – Site Creation Sample http://bit.ly/FutureProof-B

Provider-Hosted – Locations Sample http://bit.ly/FutureProof-C

Workflow – Site Creation with REST http://bit.ly/SiteCreationWorkflow

Slides

Page 24: Relearning SharePoint Development

Thank You!

BOSTON | NEW YORK | CHICAGO

44 Pleasant Street, Watertown, MA 02472

www.bluemetal.comBlog.bluemetal.com

@bluemetalinc