share point hosted add ins munich

33
Silber- Partner: Veranstalte r: SharePoint hosted add- ins Sonja Madsen

Upload: sonja-madsen

Post on 16-Apr-2017

410 views

Category:

Internet


1 download

TRANSCRIPT

Page 1: Share point hosted add ins munich

Silber-Partner: Veranstalter:

SharePoint hosted add-ins

Sonja Madsen

Page 2: Share point hosted add ins munich

Sonja Madsen

SharePoint MVPSONJASAPPS ConsultingSpeaker

@sonjamadsen sp2013.blogspot.com [email protected] www.sonjasapps.com

Page 3: Share point hosted add ins munich

Set up and deployment Working with SharePoint lists and libraries JSOM and REST External sources Office UI Fabric TypeScript and Angular

Page 4: Share point hosted add ins munich

Office 365 SharePoint on-premise

Set up and deploymentSet up and deployment

Page 5: Share point hosted add ins munich

Office 365

&

Visual Studio Developer Site

Page 6: Share point hosted add ins munich

SharePoint on-premise

& &

Page 7: Share point hosted add ins munich

deployment

Corporate App Catalog

SharePoint App StoreSharePoint Add-in

Page 8: Share point hosted add ins munich

CDN or remote server

.js and .css files, images

Scripts folder or SharePoint library

Page 9: Share point hosted add ins munich
Page 10: Share point hosted add ins munich
Page 11: Share point hosted add ins munich

Browser load time test

Page 12: Share point hosted add ins munich

Style LibrarySharePoint add-in Scripts folderMS CDNMy CDN

.js file, 71.4KB

Page 13: Share point hosted add ins munich

Style Library 535msSharePoint add-in Scripts folder 907msMS CDN 256msMy CDN 254ms

Page 14: Share point hosted add ins munich

Work with SharePoint lists and libraries

No Site Contents and List SettingsContent is gone on uninstall

Permissions to SharePointLists are not deleted on uninstallEasy to remove

Lists, libraries Lists, libraries

Page 15: Share point hosted add ins munich

<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="full" Title="loc:full"> <WebPartPages:XsltListViewWebPart ID="XsltListViewWebPart2" runat="server" ListUrl="Lists/House" IsIncluded="True" NoDefaultStyle="TRUE" Title="The House" PageType="PAGE_NORMALVIEW" Default="False" ViewContentTypeId="0x"> </WebPartPages:XsltListViewWebPart> </WebPartPages:WebPartZone>

XsltListView web part

Page 16: Share point hosted add ins munich

Office Experimental ListView

Page 17: Share point hosted add ins munich

Office Experimental ListView

<script src="../Scripts/Office.Controls.js"></script><script src="../Scripts/Office.Controls.ListView.js"></script>

new Office.Controls.ListView( document.getElementById("ListView"), { listUrl: Office.Samples.ListViewBasic.appWebUrl + "/_api/web/lists/getbytitle('House')“ });

<div id="ListView"></div>

Page 18: Share point hosted add ins munich

JSOM, cross-domain JSOM REST, cross-domain REST

JSOM and REST

Page 19: Share point hosted add ins munich

var scriptbase = hostweburl + "/_layouts/15/"; $.getScript(scriptbase + "SP.RequestExecutor.js“

ctx = new SP.ClientContext(appweburl); var factory = new SP.ProxyWebRequestExecutorFactory(appweburl); ctx.set_webRequestExecutorFactory(factory); var appContextSite = new SP.AppContextSite(ctx, hostweburl); this.web = appContextSite.get_web(); var newSiteInfo = new SP.WebCreationInformation(); newSiteInfo.set_webTemplate('STS#0');…ctx.load(this.web); ctx.executeQueryAsync(

Cross-domain JSOM

Page 20: Share point hosted add ins munich

var scriptbase = hostweburl + "/_layouts/15/"; $.getScript(scriptbase + "SP.RequestExecutor.js“

var executor = new SP.RequestExecutor(appurl); executor.executeAsync({ url: appurl + "/_api/SP.AppContextSite(@target)/web/webs/?@target='" + hosturl + "'&$select=Title,Url,WebTemplate,Id,Description", method: "GET", headers: { "ACCEPT": "application/json;odata=verbose" }, success: onWebsSuccess, error: function (err) { alert(JSON.stringify(err)); } });

Cross-domain REST

Page 21: Share point hosted add ins munich

External sources

var rssurl = "https://www.youtube.com/feeds/videos.xml?channel_id=UCbzfdYRvOrU9ql1CM0Xn9ig";

request = new SP.WebRequestInfo(); request.set_url(url); request.set_method("GET"); response = SP.WebProxy.invoke(context, request); context.executeQueryAsync(onSuccess, onFail);

Page 22: Share point hosted add ins munich

http://dev.office.com/fabric/styles Fonts, colors, message colors Grid Icons Controls

Office UI Fabric

Page 23: Share point hosted add ins munich

Office UI Fabric

<i class="ms-Icon ms-Icon--mail" aria-hidden="true"></i>

<a id="addLists" href="#"><i class="ms-Icon ms-Icon--circlePlus" style="font-size: xx-large" aria-hidden="true"></i>Add lists</a>

Page 24: Share point hosted add ins munich

Responsive grid

Page 25: Share point hosted add ins munich

Office UI Fabric

<div class="ms-Grid"> <div class="ms-Grid-row"> <div class="ms-Grid-col ms-u-md12"> <h1>Super DEMO</h1> </div> </div></div><div class="ms-Grid-row"> <div class="ms-Grid-col ms-u-md2"> <a id="addLists" href="#"><i class="ms-Icon ms-Icon--circlePlus" style="font-size: xx-large" aria-hidden="true"></i>Add lists</a> </div>

Page 26: Share point hosted add ins munich

TypeScript and Angular

TypeScript is a typed superset of JavaScript that compiles to plain JavaScript

Page 27: Share point hosted add ins munich

App.moduleexport class Welcome { public static getMessage() { return 'Hello, World!'; }}

TypeScript/Javascript Hello World

JavaScriptvar helloWorld = { Greeting: function () { document.getElementById("greeting").innerHTML = resources.Hello();}};

Page 28: Share point hosted add ins munich

New version of Angular, Angular 2 beta is released in December 2015

Page 29: Share point hosted add ins munich

ECMAscript 6 shims and polyfills

Page 30: Share point hosted add ins munich

HTML<body> <my-custom></my-custom> </body>

app.componentimport {Welcome} from './app.module'import {Component} from 'angular2/core'

@Component({ selector: 'app-main', template: `<h1>${Welcome.getMessage()}</h1>`})

export class AppComponent { }

Angular 2 and TypeScript

Page 31: Share point hosted add ins munich

FRAGEN?

Page 32: Share point hosted add ins munich

Ich freue mich auf Ihr Feedback!

Page 33: Share point hosted add ins munich

Silber-Partner: Veranstalter:

Vielen Dank![Speaker]