SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

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 Modelbgerman
 
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 AppsSanjay Patel
 
App Model For SharePoint 2013
App Model For SharePoint 2013App Model For SharePoint 2013
App Model For SharePoint 2013Toni Il Caiser
 
Getting Started with SharePoint Development
Getting Started with SharePoint DevelopmentGetting Started with SharePoint Development
Getting Started with SharePoint DevelopmentChakkaradeep Chandran
 
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...Bill Ayers
 
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
 
AEM Client Context Customisation
AEM Client Context CustomisationAEM Client Context Customisation
AEM Client Context CustomisationAnkit Gubrani
 
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
 
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...BlueMetalInc
 
Going Serverless with Azure Functions
Going Serverless with Azure FunctionsGoing Serverless with Azure Functions
Going Serverless with Azure FunctionsShahed Chowdhuri
 
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 2013Ejada
 
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...Bram de Jager
 
Content personalization in AEM
Content personalization in AEMContent personalization in AEM
Content personalization in AEMAnkit Gubrani
 
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 IntegrationSharePoint Saturday New Jersey
 
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
 
Developing a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appDeveloping a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appTalbott Crowell
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS FrameworkRaveendra R
 
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 ZaalNCCOMMS
 
Capture the Cloud with Azure
Capture the Cloud with AzureCapture the Cloud with Azure
Capture the Cloud with AzureShahed Chowdhuri
 

What's hot (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
 

Similar to AngularJS and SharePoint

SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsMark 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 2013Kiril Iliev
 
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...IT Event
 
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/14Mark Rackley
 
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 iOSFITC
 
Eye candy for your iPhone
Eye candy for your iPhoneEye candy for your iPhone
Eye candy for your iPhoneBrian Shim
 
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 2012crokitta
 
BreizhBeans - Web components
BreizhBeans - Web componentsBreizhBeans - Web components
BreizhBeans - Web componentsHoracio Gonzalez
 
Building iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360FlexBuilding iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360Flexdanielwanja
 
Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java DevelopersJoonas Lehtinen
 
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 AngularJSAntonio Peric-Mazar
 
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 appsclimboid
 
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 OfflinePedro Morais
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery GuideMark Rackley
 
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 - SPTechConSPTechCon
 
Getting Started with Iron Speed Designer
Getting Started with Iron Speed DesignerGetting Started with Iron Speed Designer
Getting Started with Iron Speed DesignerIron Speed
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
 

Similar to 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
 

Recently uploaded

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

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

Editor's Notes

  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