SlideShare a Scribd company logo
SharePoint and the
User Interface with
JavaScript
Colin Phillips :: SharePoint MVP :: itgroove
March 2015
The Magic Glue to Bring
Interactive Pages to Life
Who I am: Colin Phillips
My Background
 16+ Years in Technology
 Today: SharePoint Consultant and MVP (with itgroove)
 Previously:
12 Years Developing Software, IT Infrastructure Projects, Workflows, and Many Other Related Topics
 B.Sc. in Computer Science from UVic
My Socialness
Blog: mmman.itgroove.net / Twitter: @itgroove_colin
Where to learn more
cphillips@itgroove.net
What is JavaScript?
• JavaScript (or JS) is a powerful language that has the capacity to do many very simple things
(such as reload a webpage) or can be the basis of entire (typically web-based) applications
• Developed by Brendan Eich of Netscape in the mid-90s, it (along with influence from Microsoft
and their version “JScript") ultimately became the basis of the standard ECMAScript
• Strictly speaking, “JavaScript is an object-based scripting language that is lightweight and cross-
platform. JavaScript is not compiled but interpreted.”
• Supported by a broad coalition of companies - no single person or company controls it
On a side note, I actually met and spent a number of days with Brendan and the Mozilla team in 2001 as
part of attending a conference & being asked to join them at the Netscape campus
Who / Where / Why?
• JavaScript can be used by almost anyone – but that doesn’t mean they should. 
• Typically used by front-end web developers to add interactivity to web pages
• Most often combined together with HTML and CSS to create interactive web pages
• "JavaScript is one of the world's most popular programming languages. Virtually
every personal computer in the world has at least one JavaScript interpreter
installed on it and in active use.“
• Rather than asking, “What is the future of JavaScript?” the right thing to say is
JavaScript is the future. Another answer to the same question is JavaScript will
stay relevant as long as people use the Internet.
JavaScript Libraries / Frameworks
• JavaScript is extremely popular and lots of people have made “libraries”
(or “frameworks”) for it - small packages which simplify writing code or
performing a specific function, very well
• Most often open source and combined with HTML & a browser
• Including, but not limited to: (there are lots more)
• Chart.js (and many other charting libraries)
• Dojo Toolkit (web apps, mobile, charting cross-browser)
• ExtJS (data aggregation, dashboards & BI)
• AppJS & App.js (cross-platform desktop / mobile apps with JS/HTML/CSS)
• Kendo UI (Very well constructed, but $ – from Telerik)
Technology and Ghostbusters are amongst
my favourite things 
Popular JavaScript Library #1: jQuery
According to Google, “jQuery is a fast, small, and feature-rich JavaScript library. It makes
things like HTML document traversal and manipulation, event handling, animation, and
Ajax much simpler with an easy-to-use API that works across a multitude of browsers.”
• jQuery can make lots of (formerly) complex tasks trivial because of the nature of how
it abstracts the complex portions of JavaScript away
• Simply include jQuery in a web page (with a <script> include), then you can start
using the shortcut syntax (like “$(document).ready(alert(‘hi’));”) in a <script> block
• We use jQuery all the time because writing much of the equivalent JavaScript out by
hand is tedious, and cross-browser compatibility is a huge pain in raw JavaScript
Popular JavaScript Library #2: TypeScript
• “TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
Any browser. Any host. Any OS. Open Source.” (Like SASS for CSS)
• JavaScript is “loosely typed” – so a variable can act like a string in one statement, a
number in the next statement, a date after that, or even an object
• TS Allows JavaScript to act more like “strongly typed” languages such as C++ or Java
• In other words, a character data type, must operate like a character data type, and not like
anything else – or else you’ll get a compile error
• My own personal opinion is that TypeScript is cool, and probably helpful to some, but I
love how JS is loosely typed, so it’s not as interesting to me
Application Frameworks
• Node.js - Web applications with real-time, two-way connections, where both
the client and server can initiate communication (individual creator)
• AngularJS (by Google)
• Ember.js (spinoff of SproutCore)
• Backbone.js (by developer of CoffeeScript)
• ReactJS (by Facebook & Instagram)
• Many many others
One or a combination of several may
be the best option for your web app.
SharePoint and JavaScript
• In SharePoint 2013, using JavaScript is the only way to perform certain
types of functionality (like Conditional Formatting)
• 2013 introduced a new list/library display override called “JSLink”. You
can use this to create your own / modify an existing view
• Of course, nearly anything you can do outside of SharePoint with
JavaScript can also be done within SharePoint – just not a lot of people
are that adventurous
• JavaScript is a key component of the new SharePoint App model – lots of
modern SharePoint Apps are written with JavaScript and JS Frameworks
Below: JSLink in Action
SharePoint JSLink Code Sample
• At it’s most basic, you’re telling
SharePoint to override it’s default list view
mechanism, and use the custom one you
define instead
• In this case, when the column “MoreText”
is seen, output that column’s text in bold
(using a simple HTML tag <b>)
• For the nerds, yes, it’s just a bunch of
nested objects with some JSON using an
anonymous function (which is called once
SP is ready) – but it can do SO much!
(function () {
// Initialize the variables for overrides objects
var overrideCtx = {}; overrideCtx.Templates = {};
/* Using the Fields override leaves the rest of the rendering intact, but
allows control over one or more specific fields in the existing view – this
is just one of many ways to use the override */
overrideCtx.Templates.Fields = {
'MoreText' : { 'View' : '<b>' + ctx.CurrentItem.MoreText + '</b>' }};
/* Register the template overrides. */
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
})();
CSOM – Client Side Object Model
Now we’re cooking with napalm
• The Client Side Object Model (CSOM) is a collection of methods exposed to programmers to allow
you to speak directly to objects in SharePoint
• In other words, you can do lookups on lists or libraries using JavaScript, add new items, even modify
existing list / library items
• The JSOM – JavaScript Object Model exposes the same objects as the CSOM
• The CSOM is constantly being developed. New API’s are being exposed in Office365 all the time
• The CSOM is an important part of the SharePoint App Model. You use the CSOM to communicate
with SharePoint to retrieve data for your app, then can further manipulate it using JavaScript, or
present that data using HTML/CSS
• The CSOM isn’t exclusively for JavaScript, you can use it with C# & VB.net as well, and many other
languages (even things like Perl, PHP, PowerShell or any language that can speak web services) Yes, this is a real book 
And has really good reviews!
Example 1: Visual, Responsive Location Chooser
• All items are defined by a SharePoint list
• Each item has a label (Location X), an
image, and a URL (destination upon click)
• Using the new JSLink technique in SP2013,
we’re able to take that simple information,
and using an HTML template, turn that into
a dynamic, responsive, flowing layout that
presents visually stunning
Example 2: Effective Visual Layout of SharePoint List Data
• Here’s one of the landing pages for the
previous example
• One list entry represents the entire top
portion of the page
• Each of the Properties (in the details) are just
a column in that single list entry
• Again uses the JSLink technique to translate
list content into a powerful visual
representation
Example 3: Self Service Employee HR Dashboard
• Responsive design
• Uses a charting library (JQPlot)
• Some include transitions
• Each “box” is just a webpart
• Some web parts use both back-end
server side logic, while the front end
uses JavaScript for final presentation
Example 4: Custom Mysite Landing Page
• Tabbed interface (on right) allows
the bottom portion of the screen
to be a broken down collection of
details about each user
• Uses the JSLink technique at the
bottom to “inject” an image on
the left, and an “Action” on the
right, otherwise the rest is just
regular list data
Example 5: HR Recruitment Job Posting Mgmt Tool
• Adding large, interactive buttons and
making “sections” interactive (with
status) added greatly the sites’ overall
usability
• Uses the JavaScript CSOM to
dynamically update and query list data
• When each button is clicked
• Upon page load (to update the
button status’)
• And when the site is first created
• Also enforces permissions (on Office
Use Only column)
Comparison of Old to New
Example 6: Company Portal HomePage
• Another example of using the JSLink
technique on SharePoint list data to layout
several webparts
• That’s an interesting cupcake policy
Demo
Things to Show
• Consultant Dashboard
- Conditional Formatting
- Elimination of empty web parts
- Floating ball icons
• Mega / Micro Menus
• Projects Dashboard (Time/money/scope & barometer)
• Time Entry modals
• Client Details drop down (taking you to the client
dashboard)
• Landing page photo rotator
• Collapsible divs
• Tabs
• URL Shortener
• LED Dashboard (with auto refresh)
Summary
• JavaScript has been around for many years and is only getting
stronger – it’ll be around for as long as the web is
• Combined with libraries (like jQuery), you can make some
awesome little tweaks to add a lot of value, for little expense
• In SharePoint:
• The new layout possibilities using JSLink are nearly
endless, and very easy to make into a reality
• The CSOM brings to life a whole world of possibilities, and
is the foundation of SharePoint Apps
• When your users get it, and it’s easy for them, you’ve built it right
Questions?
Contact Info
Colin Phillips
cphillips@itgroove.net
blog: mmman.itgroove.net
Twitter: @itgroove_colin

More Related Content

What's hot (20)

PPTX
Content by query web part
IslamKhattab
 
PDF
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
PPTX
SPTechCon Dev Days - Third Party jQuery Libraries
Mark Rackley
 
PPTX
SharePoint Performance
Jeroen Schoenmakers
 
PDF
SPSSTHLM - Using JSLink and Display Templates for ITPros
Paul Hunt
 
PPTX
Bringing HTML5 alive in SharePoint
Chad Schroeder
 
PPTX
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien
 
PPTX
Office 2013 loves web developers slide
Fabio Franzini
 
PDF
Sviluppare app per office
Fabio Franzini
 
PPTX
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Fabio Franzini
 
PPTX
Using js link and display templates
Paul Hunt
 
PPTX
SharePoint 2013 Client Side Rendering
Bill Wolff
 
PPTX
Using jQuery to Maximize Form Usability
Mark Rackley
 
PPTX
SPTechCon - Share point and jquery essentials
Mark Rackley
 
PPTX
The SharePoint & jQuery Guide - Updated 1/14/14
Mark Rackley
 
PPTX
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
Mark Rackley
 
PPTX
SPTechCon DevDays - SharePoint & jQuery
Mark Rackley
 
PPTX
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
Mark Rackley
 
PPTX
Introduction to StratusForms #SayNoToInfoPath
Mark Rackley
 
PPTX
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
Mark Rackley
 
Content by query web part
IslamKhattab
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
SPTechCon Dev Days - Third Party jQuery Libraries
Mark Rackley
 
SharePoint Performance
Jeroen Schoenmakers
 
SPSSTHLM - Using JSLink and Display Templates for ITPros
Paul Hunt
 
Bringing HTML5 alive in SharePoint
Chad Schroeder
 
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien
 
Office 2013 loves web developers slide
Fabio Franzini
 
Sviluppare app per office
Fabio Franzini
 
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Fabio Franzini
 
Using js link and display templates
Paul Hunt
 
SharePoint 2013 Client Side Rendering
Bill Wolff
 
Using jQuery to Maximize Form Usability
Mark Rackley
 
SPTechCon - Share point and jquery essentials
Mark Rackley
 
The SharePoint & jQuery Guide - Updated 1/14/14
Mark Rackley
 
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
Mark Rackley
 
SPTechCon DevDays - SharePoint & jQuery
Mark Rackley
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
Mark Rackley
 
Introduction to StratusForms #SayNoToInfoPath
Mark Rackley
 
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
Mark Rackley
 

Viewers also liked (8)

PPTX
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Chris O'Brien
 
PPTX
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
Chris O'Brien
 
PPTX
Image Slider with SharePoint 2013 Search Results Web Part
GSoft
 
PPTX
Enhance SharePoint 2013 with Responsive Web Design
Eric Overfield
 
PPTX
Enhance the Usability of Your SharePoint Site with JSLink #Collab365 #C365114...
Wendy Neal
 
PPTX
How to Improve the SharePoint UI Using Bootstrap 3
Ryan McIntyre
 
PPTX
The A to Z of Building a Responsive SharePoint Site with Bootstrap
Thomas Daly
 
PPTX
SharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
Muawiyah Shannak
 
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Chris O'Brien
 
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
Chris O'Brien
 
Image Slider with SharePoint 2013 Search Results Web Part
GSoft
 
Enhance SharePoint 2013 with Responsive Web Design
Eric Overfield
 
Enhance the Usability of Your SharePoint Site with JSLink #Collab365 #C365114...
Wendy Neal
 
How to Improve the SharePoint UI Using Bootstrap 3
Ryan McIntyre
 
The A to Z of Building a Responsive SharePoint Site with Bootstrap
Thomas Daly
 
SharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
Muawiyah Shannak
 
Ad

Similar to SharePoint and the User Interface with JavaScript (20)

PPTX
Bootstrap for Beginners
D'arce Hess
 
PPTX
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
Marc D Anderson
 
PPTX
SharePoint 2013 Preview
Regroove
 
PDF
Frontend Interview Questions PDF By ScholarHat
Scholarhat
 
PPTX
React.js at Cortex
Geoff Harcourt
 
PPTX
A Beginner's Guide to Client Side Development with Javascript
SharePoint Saturday New Jersey
 
PPTX
Pearls and Must-Have Tools for the Modern Web / .NET Developer
Ofer Zelig
 
KEY
Mobile ECM with JavaScript - JSE 2011
Nuxeo
 
PDF
Pablo Villalba -
.toster
 
PPTX
Untangling spring week11
Derek Jacoby
 
PPTX
Welcome to React.pptx
PraveenKumar680401
 
PDF
Intro to jQuery @ Startup Institute
Rafael Gonzaque
 
PDF
Intro javascript build a scraper (3:22)
Thinkful
 
PDF
Web Development with Delphi and React - ITDevCon 2016
Marco Breveglieri
 
PPTX
Donation Website.pptx
ssuser5c1807
 
PPTX
Angular jS Introduction by Google
ASG
 
PDF
Frontend as a first class citizen
Marcin Grzywaczewski
 
PPTX
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Chris Love
 
PDF
An Introduction to ReactNative
Michał Taberski
 
PDF
2014 Picking a Platform by Anand Kulkarni
European Innovation Academy
 
Bootstrap for Beginners
D'arce Hess
 
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
Marc D Anderson
 
SharePoint 2013 Preview
Regroove
 
Frontend Interview Questions PDF By ScholarHat
Scholarhat
 
React.js at Cortex
Geoff Harcourt
 
A Beginner's Guide to Client Side Development with Javascript
SharePoint Saturday New Jersey
 
Pearls and Must-Have Tools for the Modern Web / .NET Developer
Ofer Zelig
 
Mobile ECM with JavaScript - JSE 2011
Nuxeo
 
Pablo Villalba -
.toster
 
Untangling spring week11
Derek Jacoby
 
Welcome to React.pptx
PraveenKumar680401
 
Intro to jQuery @ Startup Institute
Rafael Gonzaque
 
Intro javascript build a scraper (3:22)
Thinkful
 
Web Development with Delphi and React - ITDevCon 2016
Marco Breveglieri
 
Donation Website.pptx
ssuser5c1807
 
Angular jS Introduction by Google
ASG
 
Frontend as a first class citizen
Marcin Grzywaczewski
 
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Chris Love
 
An Introduction to ReactNative
Michał Taberski
 
2014 Picking a Platform by Anand Kulkarni
European Innovation Academy
 
Ad

More from Regroove (20)

PPTX
What's New in Microsoft 365 - June 2022
Regroove
 
PPTX
New Microsoft Features - Victoria O365 User Group April 2022
Regroove
 
PPTX
New Microsoft Features - Victoria O365 User Group February 2022
Regroove
 
PPTX
Regroove Teams Tips from Victoria O365 User Group Feb 2022
Regroove
 
PPTX
What's new in Microsoft 365 January 20 2022
Regroove
 
PPTX
What's new in Microsoft 365 November 2021
Regroove
 
PPTX
What's new in Microsoft 365 October 2021
Regroove
 
PPTX
What's new in Microsoft 365 September 2021
Regroove
 
PPTX
What's New in Microsoft 365 @ Victoria O365 User Group Virtual Meet-up August...
Regroove
 
PPTX
What's new in Microsoft 365 July 2021
Regroove
 
PPTX
What's new in Microsoft 365 June 2021
Regroove
 
PPTX
Microsoft office 365 what's new for May 2021
Regroove
 
PPTX
Microsoft Office 365 What's New for April 2021
Regroove
 
PPTX
Microsoft Office 365 What's New for March 2021
Regroove
 
PPTX
Microsoft Office 365 What's New for February 2021
Regroove
 
PPTX
Victoria Office 365 Users Group - Microsoft Teams Breakout Rooms
Regroove
 
PPTX
Microsoft Office 365 What's New for January 2021
Regroove
 
PPTX
Microsoft Office 365 What's New for November 2020
Regroove
 
PPTX
Microsoft Office 365 What's New for October 2020
Regroove
 
PPTX
Microsoft Office 365 What's New for September 2020 with Recap of Ignite 2020
Regroove
 
What's New in Microsoft 365 - June 2022
Regroove
 
New Microsoft Features - Victoria O365 User Group April 2022
Regroove
 
New Microsoft Features - Victoria O365 User Group February 2022
Regroove
 
Regroove Teams Tips from Victoria O365 User Group Feb 2022
Regroove
 
What's new in Microsoft 365 January 20 2022
Regroove
 
What's new in Microsoft 365 November 2021
Regroove
 
What's new in Microsoft 365 October 2021
Regroove
 
What's new in Microsoft 365 September 2021
Regroove
 
What's New in Microsoft 365 @ Victoria O365 User Group Virtual Meet-up August...
Regroove
 
What's new in Microsoft 365 July 2021
Regroove
 
What's new in Microsoft 365 June 2021
Regroove
 
Microsoft office 365 what's new for May 2021
Regroove
 
Microsoft Office 365 What's New for April 2021
Regroove
 
Microsoft Office 365 What's New for March 2021
Regroove
 
Microsoft Office 365 What's New for February 2021
Regroove
 
Victoria Office 365 Users Group - Microsoft Teams Breakout Rooms
Regroove
 
Microsoft Office 365 What's New for January 2021
Regroove
 
Microsoft Office 365 What's New for November 2020
Regroove
 
Microsoft Office 365 What's New for October 2020
Regroove
 
Microsoft Office 365 What's New for September 2020 with Recap of Ignite 2020
Regroove
 

Recently uploaded (20)

PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 

SharePoint and the User Interface with JavaScript

  • 1. SharePoint and the User Interface with JavaScript Colin Phillips :: SharePoint MVP :: itgroove March 2015 The Magic Glue to Bring Interactive Pages to Life
  • 2. Who I am: Colin Phillips My Background  16+ Years in Technology  Today: SharePoint Consultant and MVP (with itgroove)  Previously: 12 Years Developing Software, IT Infrastructure Projects, Workflows, and Many Other Related Topics  B.Sc. in Computer Science from UVic My Socialness Blog: mmman.itgroove.net / Twitter: @itgroove_colin Where to learn more [email protected]
  • 3. What is JavaScript? • JavaScript (or JS) is a powerful language that has the capacity to do many very simple things (such as reload a webpage) or can be the basis of entire (typically web-based) applications • Developed by Brendan Eich of Netscape in the mid-90s, it (along with influence from Microsoft and their version “JScript") ultimately became the basis of the standard ECMAScript • Strictly speaking, “JavaScript is an object-based scripting language that is lightweight and cross- platform. JavaScript is not compiled but interpreted.” • Supported by a broad coalition of companies - no single person or company controls it On a side note, I actually met and spent a number of days with Brendan and the Mozilla team in 2001 as part of attending a conference & being asked to join them at the Netscape campus
  • 4. Who / Where / Why? • JavaScript can be used by almost anyone – but that doesn’t mean they should.  • Typically used by front-end web developers to add interactivity to web pages • Most often combined together with HTML and CSS to create interactive web pages • "JavaScript is one of the world's most popular programming languages. Virtually every personal computer in the world has at least one JavaScript interpreter installed on it and in active use.“ • Rather than asking, “What is the future of JavaScript?” the right thing to say is JavaScript is the future. Another answer to the same question is JavaScript will stay relevant as long as people use the Internet.
  • 5. JavaScript Libraries / Frameworks • JavaScript is extremely popular and lots of people have made “libraries” (or “frameworks”) for it - small packages which simplify writing code or performing a specific function, very well • Most often open source and combined with HTML & a browser • Including, but not limited to: (there are lots more) • Chart.js (and many other charting libraries) • Dojo Toolkit (web apps, mobile, charting cross-browser) • ExtJS (data aggregation, dashboards & BI) • AppJS & App.js (cross-platform desktop / mobile apps with JS/HTML/CSS) • Kendo UI (Very well constructed, but $ – from Telerik) Technology and Ghostbusters are amongst my favourite things 
  • 6. Popular JavaScript Library #1: jQuery According to Google, “jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.” • jQuery can make lots of (formerly) complex tasks trivial because of the nature of how it abstracts the complex portions of JavaScript away • Simply include jQuery in a web page (with a <script> include), then you can start using the shortcut syntax (like “$(document).ready(alert(‘hi’));”) in a <script> block • We use jQuery all the time because writing much of the equivalent JavaScript out by hand is tedious, and cross-browser compatibility is a huge pain in raw JavaScript
  • 7. Popular JavaScript Library #2: TypeScript • “TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. Any browser. Any host. Any OS. Open Source.” (Like SASS for CSS) • JavaScript is “loosely typed” – so a variable can act like a string in one statement, a number in the next statement, a date after that, or even an object • TS Allows JavaScript to act more like “strongly typed” languages such as C++ or Java • In other words, a character data type, must operate like a character data type, and not like anything else – or else you’ll get a compile error • My own personal opinion is that TypeScript is cool, and probably helpful to some, but I love how JS is loosely typed, so it’s not as interesting to me
  • 8. Application Frameworks • Node.js - Web applications with real-time, two-way connections, where both the client and server can initiate communication (individual creator) • AngularJS (by Google) • Ember.js (spinoff of SproutCore) • Backbone.js (by developer of CoffeeScript) • ReactJS (by Facebook & Instagram) • Many many others One or a combination of several may be the best option for your web app.
  • 9. SharePoint and JavaScript • In SharePoint 2013, using JavaScript is the only way to perform certain types of functionality (like Conditional Formatting) • 2013 introduced a new list/library display override called “JSLink”. You can use this to create your own / modify an existing view • Of course, nearly anything you can do outside of SharePoint with JavaScript can also be done within SharePoint – just not a lot of people are that adventurous • JavaScript is a key component of the new SharePoint App model – lots of modern SharePoint Apps are written with JavaScript and JS Frameworks Below: JSLink in Action
  • 10. SharePoint JSLink Code Sample • At it’s most basic, you’re telling SharePoint to override it’s default list view mechanism, and use the custom one you define instead • In this case, when the column “MoreText” is seen, output that column’s text in bold (using a simple HTML tag <b>) • For the nerds, yes, it’s just a bunch of nested objects with some JSON using an anonymous function (which is called once SP is ready) – but it can do SO much! (function () { // Initialize the variables for overrides objects var overrideCtx = {}; overrideCtx.Templates = {}; /* Using the Fields override leaves the rest of the rendering intact, but allows control over one or more specific fields in the existing view – this is just one of many ways to use the override */ overrideCtx.Templates.Fields = { 'MoreText' : { 'View' : '<b>' + ctx.CurrentItem.MoreText + '</b>' }}; /* Register the template overrides. */ SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx); })();
  • 11. CSOM – Client Side Object Model Now we’re cooking with napalm • The Client Side Object Model (CSOM) is a collection of methods exposed to programmers to allow you to speak directly to objects in SharePoint • In other words, you can do lookups on lists or libraries using JavaScript, add new items, even modify existing list / library items • The JSOM – JavaScript Object Model exposes the same objects as the CSOM • The CSOM is constantly being developed. New API’s are being exposed in Office365 all the time • The CSOM is an important part of the SharePoint App Model. You use the CSOM to communicate with SharePoint to retrieve data for your app, then can further manipulate it using JavaScript, or present that data using HTML/CSS • The CSOM isn’t exclusively for JavaScript, you can use it with C# & VB.net as well, and many other languages (even things like Perl, PHP, PowerShell or any language that can speak web services) Yes, this is a real book  And has really good reviews!
  • 12. Example 1: Visual, Responsive Location Chooser • All items are defined by a SharePoint list • Each item has a label (Location X), an image, and a URL (destination upon click) • Using the new JSLink technique in SP2013, we’re able to take that simple information, and using an HTML template, turn that into a dynamic, responsive, flowing layout that presents visually stunning
  • 13. Example 2: Effective Visual Layout of SharePoint List Data • Here’s one of the landing pages for the previous example • One list entry represents the entire top portion of the page • Each of the Properties (in the details) are just a column in that single list entry • Again uses the JSLink technique to translate list content into a powerful visual representation
  • 14. Example 3: Self Service Employee HR Dashboard • Responsive design • Uses a charting library (JQPlot) • Some include transitions • Each “box” is just a webpart • Some web parts use both back-end server side logic, while the front end uses JavaScript for final presentation
  • 15. Example 4: Custom Mysite Landing Page • Tabbed interface (on right) allows the bottom portion of the screen to be a broken down collection of details about each user • Uses the JSLink technique at the bottom to “inject” an image on the left, and an “Action” on the right, otherwise the rest is just regular list data
  • 16. Example 5: HR Recruitment Job Posting Mgmt Tool • Adding large, interactive buttons and making “sections” interactive (with status) added greatly the sites’ overall usability • Uses the JavaScript CSOM to dynamically update and query list data • When each button is clicked • Upon page load (to update the button status’) • And when the site is first created • Also enforces permissions (on Office Use Only column)
  • 18. Example 6: Company Portal HomePage • Another example of using the JSLink technique on SharePoint list data to layout several webparts • That’s an interesting cupcake policy
  • 19. Demo Things to Show • Consultant Dashboard - Conditional Formatting - Elimination of empty web parts - Floating ball icons • Mega / Micro Menus • Projects Dashboard (Time/money/scope & barometer) • Time Entry modals • Client Details drop down (taking you to the client dashboard) • Landing page photo rotator • Collapsible divs • Tabs • URL Shortener • LED Dashboard (with auto refresh)
  • 20. Summary • JavaScript has been around for many years and is only getting stronger – it’ll be around for as long as the web is • Combined with libraries (like jQuery), you can make some awesome little tweaks to add a lot of value, for little expense • In SharePoint: • The new layout possibilities using JSLink are nearly endless, and very easy to make into a reality • The CSOM brings to life a whole world of possibilities, and is the foundation of SharePoint Apps • When your users get it, and it’s easy for them, you’ve built it right
  • 21. Questions? Contact Info Colin Phillips [email protected] blog: mmman.itgroove.net Twitter: @itgroove_colin

Editor's Notes

  • #22: In Slide Show mode, click the arrow to enter the PowerPoint Getting Started Center.