workshop supermodel munich

40
Silber- Partner: Veranstalte r: Working with a Supermodel for SharePoint Add-in Sonja Madsen

Upload: sonja-madsen

Post on 16-Apr-2017

250 views

Category:

Internet


0 download

TRANSCRIPT

Page 1: Workshop supermodel munich

Silber-Partner: Veranstalter:

Working with a Supermodel for SharePoint Add-ins

Sonja Madsen

Page 2: Workshop supermodel munich

Sonja Madsen

SharePoint MVPSONJASAPPS ConsultingSpeaker

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

Page 3: Workshop supermodel munich

Building views and pages with SharePoint hosted add-ins

Using SharePoint lists, libraries, and controls REST and JSOM API Using JavaScript Frameworks: TypeScript, Angular,

and Knockout Branding your work with Office UI Fabric Debugging and Deployment

Workshop

Page 4: Workshop supermodel munich
Page 5: Workshop supermodel munich

SharePoint add-in Single Page Add-in App Part – web part SharePoint List View Multiple languages Design Modules

Building views and pages

Page 6: Workshop supermodel munich

SharePoint add-in system view.aspx page.js .css

Page 7: Workshop supermodel munich

JavaScript CSS

.aspx

SharePoint data, users and components

Page 8: Workshop supermodel munich

.aspxLanding (start) page

App Part page

Page 9: Workshop supermodel munich

Landing (start) page

HTML similar to a page layout- Placeholders: PlaceHolderAdditionalPageHead,

PlaceHolderPageTitleInTitleArea, PlaceHolderMain- SharePoint namespaces- Inherits from

Microsoft.SharePoint.WebPartPages.WebPartPage- Allows web part zones- Allows web parts- Parameters – properties in the URL: SPHostUrl, SPLanguage,

SPClientTag, SPProductNumber, SPAppWebUrl

Page 10: Workshop supermodel munich

App Part page

HTMLInherits from Microsoft.SharePoint.WebPartPages.WebPartPageNo placeholdersNo web part zonesNo web partsParameters – properties in the URL: SPHostUrl, SPLanguage, SPClientTag, SPProductNumber, SPAppWebUrlAdvanced IframeExperimental List View

Page 11: Workshop supermodel munich

App Part page

Advanced IFRAMEEdit web part: Title, layout, custom category and custom propertiesResize No data from the pageNo data from parent page URL

Page 12: Workshop supermodel munich

List View

Page 13: Workshop supermodel munich

Controls such as List View, SharePoint:ScriptLink, SharePoint:EncodedLiteral, WebPartPages:XsltListViewWebPart

Lists and libraries that are part of the add-in or part of a SharePoint site

Lists and libraries that are part of the add-in do not have all the features like the ones created on SharePoint

Using SharePoint lists, libraries, and controls

Page 14: Workshop supermodel munich

No Site Contents No List Settings

Using SharePoint lists, libraries, and controls

Page 15: Workshop supermodel munich

What is better? Can we mix?

REST and JSOM API

Page 16: Workshop supermodel munich

Knockout Angular MVVM

JavaScript Frameworks

Page 17: Workshop supermodel munich

Model-View-View Model (MVVM) is a design pattern for building user interfaces

Model - stored data View model - representation of the data and

operations (add, remove) View - visible, interactive UI

Page 18: Workshop supermodel munich

Data Binding JavaScript siteLi.innerHTML = "<a href='" + results[i].Url +

"'>" + results[i].Title + "</a>"; Knockout <ul data-bind="foreach: News"> <li data-bind="text: NewsTitle"></li> </ul>

Page 19: Workshop supermodel munich

Knockout News model News view model News view Display news link

Page 20: Workshop supermodel munich

Difference in HTML

Page 21: Workshop supermodel munich

Difference in JS

Page 22: Workshop supermodel munich

Angular Framework

Page 23: Workshop supermodel munich

function NewsItem(newsTitle, newsDescription) { var self = this; self.NewsTitle = newsTitle; self.NewsDescription = newsDescription; }

HTML <div> <div data-bind="template: { name: 'news-template' }"></div> </div>

<script type="text/html" id="news-template"> <ul data-bind="foreach: News"> <li data-bind="text: NewsTitle"></li> </ul> </script>

Knockout

Page 24: Workshop supermodel munich

<div ng-app="app"><div ng-controller="AppController"><ul> <li ng-repeat="newsItem in News">{{newsItem.Title}}</li> </ul></div></div>

module App.Model { export class newsItem { public Title: string; public Description: string;

}}

Angular

Page 25: Workshop supermodel munich

<div> <div data-bind="template: { name: 'news-template' }"></div></div> <script type="text/html" id="news-template"> <ul data-bind="foreach: News"> <li data-bind="text: NewsTitle"></li> </ul> </script>

Knockout Templating

Page 26: Workshop supermodel munich

<div ng-include="news-template.html"></div>

Angular Templating

Page 27: Workshop supermodel munich

Angular Modules Services, $http, $log

Page 28: Workshop supermodel munich

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

Page 29: Workshop supermodel munich

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

TypeScript Hello World

Page 30: Workshop supermodel munich

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

JavaScript Hello World

Page 31: Workshop supermodel munich

<body> <my-app></my-app> </body>

Angular 2 Beta and TypeScript

Page 32: Workshop supermodel munich
Page 33: Workshop supermodel munich

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

Office UI Fabric

Page 34: Workshop supermodel munich

<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 35: Workshop supermodel munich

<div> Add a Site <div> <input id="sitename" class="ms-TextField-field" type="text"> <span class="ms-TextField-description">This should be the name of the site</span> </div> </div>

Page 36: Workshop supermodel munich

<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 37: Workshop supermodel munich

Web Essentials - Minify Azure web application Browser

Debugging and Deployment

Page 38: Workshop supermodel munich

FRAGEN?

Page 39: Workshop supermodel munich

Ich freue mich auf Ihr Feedback!

Page 40: Workshop supermodel munich

Silber-Partner: Veranstalter:

Vielen Dank![Speaker]