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

Post on 06-May-2015

6.070 views 3 download

Tags:

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

Bill Ayers

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

Rainbow

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: BillA@flosim.com

Twitter: @SPDoctorModerator on SharePoint.StackExchange.com

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

Agenda

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…

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

Cloud Hosted Apps

Host Web Remote Web

Database

S2S Trust

SharePoint Web Server

Managed CSOM

Cross Domain Library

“Apps” are everywhere!

“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

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

infrastructure

What are “Apps” anyway?

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

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

Skills needed:

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

Tools:

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

});

Demo: Using REST

How would we do this in traditional SharePoint development?

Rich clients still matter

Source: Morgan Stanley

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”

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

Native vs. Web

Native WebHTML5Hybrid

Easy deployment

Native look and feel, performance

Web apps

Codegen/cross-compilers

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

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

JavaScript libraries and frameworks for mobile:

Model-View-ViewModel (MVVM)

View

ViewModel

Model

Data binding REST

Demo: Butterfly project

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:

Demo: Cloud Build

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

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:

Blog: www.spdoctor.net Twitter: @spdoctor Sharepoint.stackexchange.com (moderator) Email: BillA@flosim.com

Contact me: