SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Level: 300 
SharePoint 2013 
No server code? No worries! 
Daniel Šmon
A bit about you… 
Join the Conversation #SP2013Angular @DanielSmon
Daniel Šmon 
@DanielSmon 
 11+ years in IT 
 Ex-Microsoft Consultant (SharePoint) 
 Moved from Australia to Slovenia 
 Plays the button accordion, 
euphonium 
Join the Conversation #SP2013Angular @DanielSmon
Enterprise Software Development 
Join the Conversation #SP2013Angular @DanielSmon
Ways to customise SharePoint 
Typical SharePoint App 
AngularJS 
AngularJS in a SharePoint app 
Agenda 
Summary
Customising SharePoint 
• FEATURE folders 
• Farm solutions (WSP) 
• Sandboxed solutions (WSP) 
• Apps 
• Provider Hosted 
• SharePoint Hosted 
• Auto-Hosted 
Join the Conversation #SP2013Angular @DanielSmon
SharePoint or Provider Hosted? 
SharePoint Hosted 
• No external services required 
• Declarative / JavaScript only 
• User permissions 
• Traditionally ‘lower complexity’ 
only 
Provider Hosted 
• Separate infrastructure required 
• BYO server (.NET, Java, PHP…) 
• App permissions (Low/High 
Trust) 
• Enterprise practices 
Relatively easy to create and deploy, so they 
are good for small team productivity apps 
and business process automation, with 
lower complexity business rules. 
Choose patterns for developing and hosting 
your app for SharePoint 
http://msdn.microsoft.com/en-us/ 
library/office/fp179887(v=office.15).aspx 
Join the Conversation #SP2013Angular @DanielSmon
Customising SharePoint 
Typical SharePoint App 
AngularJS 
AngularJS in a SharePoint app 
Summary
Enterprise 
practices 
Onion Architecture 
Model View Controller 
Dependency Injection 
Join the Conversation #SP2013Angular @DanielSmon 
Model 
View Controller
Join the Conversation #SP2013Angular @DanielSmon
Join the Conversation #SP2013Angular @DanielSmon
<%-- Section 2 --%> 
<div class="accordionTitle" onclick="accordionSections('#divPermissionsWizard');">Share Wizard:</div> 
<div id="divPermissionsWizard" class="editSection" style="display:none;"> 
<%-- Step 1: From my Office? --%> 
<div runat="server" id="WizStep1"> 
<label class="heading">From my Office?</label> 
<asp:RadioButtonList runat="server" ID="rdoWizStep1FromMyOffice"> 
<asp:ListItem Text="Yes" Selected="True" /> 
<asp:ListItem Text="No" /> 
</asp:RadioButtonList> 
</div> <%-- Step 2: What Office? --%> 
<div runat="server" id="WizStep2" visible="false"> 
<label class="heading">What Office?</label> 
<asp:DropDownList runat="server" ID="ddlOffice" DataValueField="ID" DataTextField="DisplayName" /> 
</div> <%-- Step 3: Audience? --%> 
<div runat="server" id="WizStep3" visible="false"> 
<label class="heading">What Audience?</label> 
<asp:RadioButtonList runat="server" ID="rdoWizStep2WhatAudience"> 
<asp:ListItem Text=“Department" Value=“Department" Selected="True" /> 
<asp:ListItem Text=“Manager" Value=“Manager" /> 
</asp:RadioButtonList> 
</div> 
<%-- Step 4: People/Group selector? --%> 
<div runat="server" id="WizStep4" visible="false"> 
<label class="heading">Select People/Group:</label> 
<asp:ListBox runat="server" ID="chkPermissionSelector" class="multiselect“ 
SelectionMode="Multiple" DataValueField="ADName" DataTextField="DisplayName" /> 
</div> 
<div runat="server" id="WizNavigation" visible="true"> 
<asp:Button runat="server" ID="cmdNext" OnClick="cmdNext_Click" Text="Next“ 
OnClientClick="addDropdownListValueToShare('#chkPermissionSelector');" /> 
<asp:Button runat="server" ID="cmdBack" OnClick="cmdBack_Click" Text="Back" Enabled="false" /> 
</div> 
</div> 
Join the Conversation #SP2013Angular @DanielSmon
Join the Conversation #SP2013Angular @DanielSmon 
function GetModelBasesFromHiddenField() { 
var modelBases = null; 
var modelBasesValue = $("#hdnModelBases").val(); 
// Try to parse hidden value if it is present 
try { 
var modelBases = JSON.parse(modelBasesValue); 
} catch (e) { 
// Do nothing 
} 
// If the parsed value is an array, it is probably valid, so return it 
if ($.isArray(modelBases)) { 
return modelBases 
} else { 
// If not an array it means that the data is corrupt or missing, so we'll return an empty array 
return []; 
} 
} function UpdateDisplayPrincipals(modelBases, updateHiddenFieldValue) { 
// Persist to hidden field if required 
if (updateHiddenFieldValue) { 
$("#hdnModelBases").val(JSON.stringify(modelBases)); 
} // Reset existing display 
$("#divDisplayPrincipals").html(""); 
// Populate preview with display names 
$.each(modelBases, function (index, modelBase) { 
// The text value in the span needs to be html encoded, whereas the ADName must have any backslashes escaped so that they don't get los 
t when the javascript is executed 
var taggeditem = "<span class='tagged'><span>" + htmlEncode(modelBase.DisplayName) + "</span>" + "<a href='#' class='removeTag' onclick 
="removePrincipalsFromShareWith('" + escapeForJsBlock(modelBase.ADName) + "');">x</a></span>"; 
$(taggeditem).appendTo("#divDisplayPrincipals"); 
}); 
}
Customising SharePoint 
Typical SharePoint App 
AngularJS 
AngularJS in a SharePoint app 
Summary
I need a provider hosted app… 
• My requirements are too complex for JavaScript 
• I have lots of different pages and views 
Join the Conversation #SP2013Angular @DanielSmon
I really need server side code… 
• I do things that need special permissions 
• My data source doesn’t have a HTTP endpoint 
Join the Conversation #SP2013Angular @DanielSmon
Data binding 
Dependency Injection 
Testing 
Routing (deep linking) 
Form validation 
Localisation 
Join the Conversation #SP2013Angular @DanielSmon
<!doctype html> 
<html ng-app> 
<head> 
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js" /> 
</head> 
<body> 
<div> 
<label>Name:</label> 
<input type="text" ng-model="yourName" placeholder="Enter a name here"> 
<hr> 
<h1>Hello {{yourName}}!</h1> 
</div> 
</body> 
</html> 
Join the Conversation #SP2013Angular @DanielSmon
Join the Conversation #SP2013Angular @DanielSmon
Join the Conversation #SP2013Angular @DanielSmon
Join the Conversation #SP2013Angular @DanielSmon
AngularJS 
Project 
Structure 
http://www.johnpapa.net/angular-growth-structure/ 
Join the Conversation #SP2013Angular @DanielSmon
AngularJS & Browser Support 
https://docs.angularjs.org/misc/faq 
Join the Conversation #SP2013Angular @DanielSmon
Customising SharePoint 
Typical SharePoint App 
AngularJS 
AngularJS in a SharePoint app 
Summary
Getting Started 
Package 
Management 
Templating 
Front-End 
Join the Conversation #SP2013Angular @DanielSmon 
Build 
JavaScript 
Testing 
The ‘Visual Studio’ 
way 
The ‘Open Source’ 
way 
The ‘long beard’ 
way 
www… File > New 
Manually write 
minified 
well… 
Manually write 
tests
Join the Conversation #SP2013Angular @DanielSmon
Installation is in progress (00:00:43) 
App failed to install, cleaning up... 
Successfully uninstalled the app for SharePoint. 
App installation encountered the following errors: 
16/10/2014 9:09:47 AM 
Join the Conversation #SP2013Angular @DanielSmon 
@"Error 1 
CorrelationId: f4b334ea-ba13-4c10-9ea0-ee355e1d6ba0 
ErrorDetail: There was a problem with activating the app web definition. 
ErrorType: App 
ErrorTypeName: App Related 
ExceptionMessage: Exception from HRESULT: 0x81070964 
Source: AppWeb 
SourceName: App Web Deployment 
Error occurred in deployment step 'Install app for SharePoint': Failed to install app for 
SharePoint. Please see the output window for details. 
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ========== 
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
Join the Conversation #SP2013Angular @DanielSmon
Join the Conversation #SP2013Angular @DanielSmon
Join the Conversation #SP2013Angular @DanielSmon
Join the Conversation #SP2013Angular @DanielSmon 
<PropertyGroup> 
<TypeScriptSourceMap>true</TypeScriptSourceMap> 
</PropertyGroup> 
<Import Project="$(MSBuildExtensionsPath32)Microsoft 
VisualStudiov$(VisualStudioVersion)TypeScriptMicr 
osoft.TypeScript.targets" />
Customising SharePoint 
Typical SharePoint App 
AngularJS 
AngularJS in a SharePoint app 
Summary
Do you really need server code? 
AngularJS – Slick responsive UI 
Hot Towel 
Bower, Grunt, Gulp, Yeoman
Q & A

Weitere ähnliche Inhalte

Was ist angesagt?

SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted AppsSharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
Sanjay Patel
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
SPTechCon
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
SPTechCon
 

Was ist angesagt? (20)

SharePoint 2013 REST and CSOM
SharePoint 2013 REST  and CSOMSharePoint 2013 REST  and CSOM
SharePoint 2013 REST and CSOM
 
Developer’s Independence Day: Introducing the SharePoint App Model
Developer’s Independence Day:Introducing the SharePoint App ModelDeveloper’s Independence Day:Introducing the SharePoint App Model
Developer’s Independence Day: Introducing the SharePoint App Model
 
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted AppsSharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
 
App Model For SharePoint 2013
App Model For SharePoint 2013App Model For SharePoint 2013
App Model For SharePoint 2013
 
Getting Started with SharePoint Development
Getting Started with SharePoint DevelopmentGetting Started with SharePoint Development
Getting Started with SharePoint Development
 
Share point apps the good, the bad, and the pot of gold at the end of the r...
Share point apps   the good, the bad, and the pot of gold at the end of the r...Share point apps   the good, the bad, and the pot of gold at the end of the r...
Share point apps the good, the bad, and the pot of gold at the end of the r...
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
 
AEM Client Context Customisation
AEM Client Context CustomisationAEM Client Context Customisation
AEM Client Context Customisation
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
 
Going Serverless with Azure Functions
Going Serverless with Azure FunctionsGoing Serverless with Azure Functions
Going Serverless with Azure Functions
 
Client Object Model and REST Improvements in SharePoint 2013
Client Object Model and REST Improvements in SharePoint 2013Client Object Model and REST Improvements in SharePoint 2013
Client Object Model and REST Improvements in SharePoint 2013
 
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
 
Content personalization in AEM
Content personalization in AEMContent personalization in AEM
Content personalization in AEM
 
Improving the SharePoint Development Process with Continuous Integration
Improving the SharePoint Development Process with Continuous IntegrationImproving the SharePoint Development Process with Continuous Integration
Improving the SharePoint Development Process with Continuous Integration
 
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
 
Developing a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appDeveloping a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint app
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS Framework
 
O365Con18 - External Collaboration with Azure B2B - Sjoukje Zaal
O365Con18 - External Collaboration with Azure B2B - Sjoukje ZaalO365Con18 - External Collaboration with Azure B2B - Sjoukje Zaal
O365Con18 - External Collaboration with Azure B2B - Sjoukje Zaal
 
Capture the Cloud with Azure
Capture the Cloud with AzureCapture the Cloud with Azure
Capture the Cloud with Azure
 

Ähnlich wie AngularJS and SharePoint

SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
Mark Rackley
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
Kiril Iliev
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOS
FITC
 
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012 Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Atlassian
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps Offline
Pedro Morais
 

Ähnlich wie AngularJS and SharePoint (20)

SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
 
Ruby For Startups
Ruby For StartupsRuby For Startups
Ruby For Startups
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOS
 
Eye candy for your iPhone
Eye candy for your iPhoneEye candy for your iPhone
Eye candy for your iPhone
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
BreizhBeans - Web components
BreizhBeans - Web componentsBreizhBeans - Web components
BreizhBeans - Web components
 
Building iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360FlexBuilding iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360Flex
 
Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java Developers
 
Building Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJSBuilding Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJS
 
Yeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web appsYeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web apps
 
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012 Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
 
Adobe & HTML5
Adobe & HTML5Adobe & HTML5
Adobe & HTML5
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps Offline
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery Guide
 
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechConThe SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
 
Getting Started with Iron Speed Designer
Getting Started with Iron Speed DesignerGetting Started with Iron Speed Designer
Getting Started with Iron Speed Designer
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 

Kürzlich hochgeladen

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

AngularJS and SharePoint

  • 1. Level: 300 SharePoint 2013 No server code? No worries! Daniel Šmon
  • 2. A bit about you… Join the Conversation #SP2013Angular @DanielSmon
  • 3. Daniel Šmon @DanielSmon  11+ years in IT  Ex-Microsoft Consultant (SharePoint)  Moved from Australia to Slovenia  Plays the button accordion, euphonium Join the Conversation #SP2013Angular @DanielSmon
  • 4. Enterprise Software Development Join the Conversation #SP2013Angular @DanielSmon
  • 5. Ways to customise SharePoint Typical SharePoint App AngularJS AngularJS in a SharePoint app Agenda Summary
  • 6. Customising SharePoint • FEATURE folders • Farm solutions (WSP) • Sandboxed solutions (WSP) • Apps • Provider Hosted • SharePoint Hosted • Auto-Hosted Join the Conversation #SP2013Angular @DanielSmon
  • 7. SharePoint or Provider Hosted? SharePoint Hosted • No external services required • Declarative / JavaScript only • User permissions • Traditionally ‘lower complexity’ only Provider Hosted • Separate infrastructure required • BYO server (.NET, Java, PHP…) • App permissions (Low/High Trust) • Enterprise practices Relatively easy to create and deploy, so they are good for small team productivity apps and business process automation, with lower complexity business rules. Choose patterns for developing and hosting your app for SharePoint http://msdn.microsoft.com/en-us/ library/office/fp179887(v=office.15).aspx Join the Conversation #SP2013Angular @DanielSmon
  • 8. Customising SharePoint Typical SharePoint App AngularJS AngularJS in a SharePoint app Summary
  • 9. Enterprise practices Onion Architecture Model View Controller Dependency Injection Join the Conversation #SP2013Angular @DanielSmon Model View Controller
  • 10. Join the Conversation #SP2013Angular @DanielSmon
  • 11. Join the Conversation #SP2013Angular @DanielSmon
  • 12. <%-- Section 2 --%> <div class="accordionTitle" onclick="accordionSections('#divPermissionsWizard');">Share Wizard:</div> <div id="divPermissionsWizard" class="editSection" style="display:none;"> <%-- Step 1: From my Office? --%> <div runat="server" id="WizStep1"> <label class="heading">From my Office?</label> <asp:RadioButtonList runat="server" ID="rdoWizStep1FromMyOffice"> <asp:ListItem Text="Yes" Selected="True" /> <asp:ListItem Text="No" /> </asp:RadioButtonList> </div> <%-- Step 2: What Office? --%> <div runat="server" id="WizStep2" visible="false"> <label class="heading">What Office?</label> <asp:DropDownList runat="server" ID="ddlOffice" DataValueField="ID" DataTextField="DisplayName" /> </div> <%-- Step 3: Audience? --%> <div runat="server" id="WizStep3" visible="false"> <label class="heading">What Audience?</label> <asp:RadioButtonList runat="server" ID="rdoWizStep2WhatAudience"> <asp:ListItem Text=“Department" Value=“Department" Selected="True" /> <asp:ListItem Text=“Manager" Value=“Manager" /> </asp:RadioButtonList> </div> <%-- Step 4: People/Group selector? --%> <div runat="server" id="WizStep4" visible="false"> <label class="heading">Select People/Group:</label> <asp:ListBox runat="server" ID="chkPermissionSelector" class="multiselect“ SelectionMode="Multiple" DataValueField="ADName" DataTextField="DisplayName" /> </div> <div runat="server" id="WizNavigation" visible="true"> <asp:Button runat="server" ID="cmdNext" OnClick="cmdNext_Click" Text="Next“ OnClientClick="addDropdownListValueToShare('#chkPermissionSelector');" /> <asp:Button runat="server" ID="cmdBack" OnClick="cmdBack_Click" Text="Back" Enabled="false" /> </div> </div> Join the Conversation #SP2013Angular @DanielSmon
  • 13. Join the Conversation #SP2013Angular @DanielSmon function GetModelBasesFromHiddenField() { var modelBases = null; var modelBasesValue = $("#hdnModelBases").val(); // Try to parse hidden value if it is present try { var modelBases = JSON.parse(modelBasesValue); } catch (e) { // Do nothing } // If the parsed value is an array, it is probably valid, so return it if ($.isArray(modelBases)) { return modelBases } else { // If not an array it means that the data is corrupt or missing, so we'll return an empty array return []; } } function UpdateDisplayPrincipals(modelBases, updateHiddenFieldValue) { // Persist to hidden field if required if (updateHiddenFieldValue) { $("#hdnModelBases").val(JSON.stringify(modelBases)); } // Reset existing display $("#divDisplayPrincipals").html(""); // Populate preview with display names $.each(modelBases, function (index, modelBase) { // The text value in the span needs to be html encoded, whereas the ADName must have any backslashes escaped so that they don't get los t when the javascript is executed var taggeditem = "<span class='tagged'><span>" + htmlEncode(modelBase.DisplayName) + "</span>" + "<a href='#' class='removeTag' onclick ="removePrincipalsFromShareWith('" + escapeForJsBlock(modelBase.ADName) + "');">x</a></span>"; $(taggeditem).appendTo("#divDisplayPrincipals"); }); }
  • 14. Customising SharePoint Typical SharePoint App AngularJS AngularJS in a SharePoint app Summary
  • 15. I need a provider hosted app… • My requirements are too complex for JavaScript • I have lots of different pages and views Join the Conversation #SP2013Angular @DanielSmon
  • 16. I really need server side code… • I do things that need special permissions • My data source doesn’t have a HTTP endpoint Join the Conversation #SP2013Angular @DanielSmon
  • 17. Data binding Dependency Injection Testing Routing (deep linking) Form validation Localisation Join the Conversation #SP2013Angular @DanielSmon
  • 18. <!doctype html> <html ng-app> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js" /> </head> <body> <div> <label>Name:</label> <input type="text" ng-model="yourName" placeholder="Enter a name here"> <hr> <h1>Hello {{yourName}}!</h1> </div> </body> </html> Join the Conversation #SP2013Angular @DanielSmon
  • 19. Join the Conversation #SP2013Angular @DanielSmon
  • 20. Join the Conversation #SP2013Angular @DanielSmon
  • 21. Join the Conversation #SP2013Angular @DanielSmon
  • 22. AngularJS Project Structure http://www.johnpapa.net/angular-growth-structure/ Join the Conversation #SP2013Angular @DanielSmon
  • 23. AngularJS & Browser Support https://docs.angularjs.org/misc/faq Join the Conversation #SP2013Angular @DanielSmon
  • 24. Customising SharePoint Typical SharePoint App AngularJS AngularJS in a SharePoint app Summary
  • 25. Getting Started Package Management Templating Front-End Join the Conversation #SP2013Angular @DanielSmon Build JavaScript Testing The ‘Visual Studio’ way The ‘Open Source’ way The ‘long beard’ way www… File > New Manually write minified well… Manually write tests
  • 26. Join the Conversation #SP2013Angular @DanielSmon
  • 27. Installation is in progress (00:00:43) App failed to install, cleaning up... Successfully uninstalled the app for SharePoint. App installation encountered the following errors: 16/10/2014 9:09:47 AM Join the Conversation #SP2013Angular @DanielSmon @"Error 1 CorrelationId: f4b334ea-ba13-4c10-9ea0-ee355e1d6ba0 ErrorDetail: There was a problem with activating the app web definition. ErrorType: App ErrorTypeName: App Related ExceptionMessage: Exception from HRESULT: 0x81070964 Source: AppWeb SourceName: App Web Deployment Error occurred in deployment step 'Install app for SharePoint': Failed to install app for SharePoint. Please see the output window for details. ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
  • 28. Join the Conversation #SP2013Angular @DanielSmon
  • 29. Join the Conversation #SP2013Angular @DanielSmon
  • 30. Join the Conversation #SP2013Angular @DanielSmon
  • 31. Join the Conversation #SP2013Angular @DanielSmon <PropertyGroup> <TypeScriptSourceMap>true</TypeScriptSourceMap> </PropertyGroup> <Import Project="$(MSBuildExtensionsPath32)Microsoft VisualStudiov$(VisualStudioVersion)TypeScriptMicr osoft.TypeScript.targets" />
  • 32. Customising SharePoint Typical SharePoint App AngularJS AngularJS in a SharePoint app Summary
  • 33. Do you really need server code? AngularJS – Slick responsive UI Hot Towel Bower, Grunt, Gulp, Yeoman
  • 34. Q & A

Hinweis der Redaktion

  1. AngularJS is a powerful MV* framework that allows you to write JavaScript applications in a similar way to traditional ASP.Net MVC. This is especially useful for creating SharePoint hosted apps without separate hosting for the provider hosted model. In this session I'll run through creating a SharePoint Hosted App from scratch, that can be deployed either to SharePoint in the cloud (O365), or on premises.
  2. Who’s familiar with SharePoint Apps? Provider Hosted? SharePoint Hosted? Who’s used AngularJS? Familiar with AngularJS? SPA’s?
  3. On the server side, practices are quite well established.
  4. Multiple divs to simulate a ‘wizard’ style interface Onclick events
  5. Lots of JavaScript ‘glue’, rather than logic
  6. You still from AngularJS, it will clean up client side and make it more manageable. Powerful/ dynamic client side views (rich client side views).
  7. Jeremy Thake - SharePoint 2013 Apps with AngularJS: https://www.youtube.com/watch?v=hCHkn-helJg Ted Pattison – SharePoint App best practices using Odata and the SharePoint REST API: https://www.youtube.com/watch?v=tEbAaSyIn9I