Share point apps the good, the bad, and the pot of gold at the end of the rainbow-wn

28
Bill Ayers SharePoint Apps - The Good, the Bad, and the Pot of Gold at the End of the Rainbow

description

It’s tough for us professional SharePoint developers who have spent years perfecting our SharePoint skills, because now Microsoft is telling us we should use techniques like JavaScript on the client side instead. Wait a minute; isn’t JavaScript a sort of front-end hackers’ in-browser scripting language that was written over a weekend? While it’s true that JavaScript was produced in a hurry, and has a name that doesn’t make sense, it has matured a great deal in the last few years. A number of patterns and improvements have emerged to get around some of the shortcomings and support a more professional development model for building responsive client applications. In this talk we are going to see how far we can go with SharePoint Apps using JavaScript and client-side development for Windows, web and mobile applications.

Transcript of Share point apps the good, the bad, and the pot of gold at the end of the rainbow-wn

Page 1: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Bill Ayers

SharePoint Apps - The Good, the Bad, and the Pot of Gold at the End of the

Rainbow

Page 2: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

MCM/MCSM SharePointMCTS, MCITP, MCSD, MCAD, MCSA, MCDBA, MCT etc.

Consultant currently specialising in SharePoint Development and Architecture for Web Content Management and

Collaboration. (I also do some mobile development on the side)

Blog: www.SPDoctor.netE-mail: [email protected]

Twitter: @SPDoctorModerator on SharePoint.StackExchange.com

Page 3: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Why SharePoint Apps? The Bad The Good The pot of gold at the end of the rainbow Conclusions

Agenda

Page 4: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

SharePoint 2001 – forget it SharePoint 2003 – Limited, not aligned with

ASP.NET, complex ALM SharePoint 2007 – Server-side object model (farm

solutions) SharePoint 2010 – Sandboxed solutions SharePoint 2013 – SharePoint Apps.

SharePoint Development Timeline…

Page 5: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Apps for SharePoint

• Development models• SharePoint-hosted• Cloud-hosted

• Interaction• Full page• App part• Command extensions

Web PagesScriptsStyle Sheets

SharePoint Hosted App

Web PagesScriptsStyle SheetsServer-Side CodeDatabases

Cloud Hosted App

Page 6: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Cloud Hosted Apps

Host Web Remote Web

Database

S2S Trust

SharePoint Web Server

Managed CSOM

Cross Domain Library

Page 7: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

“Apps” are everywhere!

Page 8: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

“Use your existing skills to build apps and take advantage of familiar tools, languages, and hosting services. You can use any language, such as HTML, JavaScript, PHP, or .NET, and you can use your favorite web development tools”

MSDN

Opening up to web developers

Page 9: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Easy distribution Self-contained Clean Uninstall Sandboxed Some degree of vetting Marketplace

infrastructure

What are “Apps” anyway?

Page 10: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Apps for SharePoint

• Distribution• Publish to App Catalog• Publish to Office Marketplace

• Self-contained, clean uninstall, sandboxed• No server-side code• All SharePoint artifacts hosted within app web

Page 11: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

JavaScript (done properly) jQuery JavaScript frameworks, e.g. MVVM REST OData HTML5 CSS3.

Skills needed:

Page 12: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Visual Studio 2013 Chrome, IE developer tools (F12) Fiddler JSFiddle (or equivalent) StackOverflow.com JSLint, “use strict” MVVM (Knockout.js)

Tools:

Page 13: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Why REST/JSON?

• Address of the REST API• URLs for Common SharePoint Objects• Using OData Operators

http://intranet.contoso.com

/_api/web/lists/getbytitle("MyList")/items

?$select=ID,Title

&$order=Title

&$filter=startswith(Title,”A”)

$.getJSON(”http://litvs13/_api/web”,

function(data) {

$(“#title”).text(data.d.Title);

});

Page 14: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Demo: Using REST

Page 15: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

How would we do this in traditional SharePoint development?

Page 16: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Rich clients still matter

Source: Morgan Stanley

Page 17: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Mobile (i.e. phones and tablets)

Browsing – normal web site is good solution (channels, responsive design)

Specific tasks – mobile app is better model

In general, mobile users want apps – they don’t want to use a web browser for Wikipedia, they want a Wikipedia “app”

Page 18: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

iOS XCode Objective-C

Android Eclipse Java

Windows Phone Visual Studio C# or VB.NET

Windows 8 Visual Studio C# or VB.NET

Other (Blackberry?)

Mobile Platforms

Page 19: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Native vs. Web

Native WebHTML5Hybrid

Easy deployment

Native look and feel, performance

Web apps

Codegen/cross-compilers

Page 20: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

JavaScript libraries:

jQuery – DOM element selection Twitter Bootstrap – page structure, HTML5/CSS3

framework Knockout.js – data binding/MVVM Underscore.js – collections, iterations Angular.js (alternative to knockout/Durnadal) Require.js Durandal – SPA framework SPServices.js

Page 21: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

jQuery Mobile PhoneGap (Cordova) Kendo UI Mobile (commercial)

JavaScript libraries and frameworks for mobile:

Page 22: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Model-View-ViewModel (MVVM)

View

ViewModel

Model

Data binding REST

Page 23: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Demo: Butterfly project

Page 24: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Web – “native” SharePoint – Visual Studio Windows 8 – Visual Studio (“native” HTML5 apps) Windows Phone 8 – Visual Studio Android, iPhone, Blackberry…

PhoneGap Build (Adobe) Icenium (Telerik) Nomad (Redgate)

Building HTML5 apps for different platforms:

Page 25: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Demo: Cloud Build

Page 26: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Conclusions:

JavaScript – learn it, live it, love it! You need some REST Learn JavaScript libraries, especially jQuery Server-side development is still valid HTML5 Hybrid Apps not perfect, but allow skills

and code re-use for web and mobile

Page 27: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

70-480 http://www.microsoftvirtualacademy.com/training-courses/learn-html5-with-javascript-css3-jumpstart-training

Andrew Connell http://www.andrewconnell.com/blog/my-thoughts-on-the-sharepoint-app-model-office-365-sharepoint-store-and-the-business-of-sharepoint-apps-today

Chris O’Brien http://www.sharepointnutsandbolts.com/2012/08/sharepoint-2013-appsarchitecture.html

Jeremy Thake http://www.jeremythake.com/ SharePoint.StackExchange.com

Resources:

Page 28: Share point apps   the good, the bad, and the pot of gold at the end of the rainbow-wn

Blog: www.spdoctor.net Twitter: @spdoctor Sharepoint.stackexchange.com (moderator) Email: [email protected]

Contact me: