SlideShare una empresa de Scribd logo
1 de 28
Welcome
Welcome to SharePoint Saturday Houston
   Thank you for being a part of the 3rd
Annual SharePoint Saturday for the greater
             Houston area!
• Please turn off all electronic devices or set them to vibrate.
• If you must take a phone call, please do so in the hall so as not
  to disturb others.
• Thanks to our Title Sponsor:           And our Platinum Sponsors:




                                 2
Information
• Speaker presentation slides will be available at
  SharePointSaturday.org/Houston within a week
• Keep checking website for future events
• The Houston SharePoint User Group at
  www.h-spug.org, will be having it’s May meeting
  Wednesday May 24th. Please be sure to join us!
• Have a great day!




                         3
DON’T FORGET
…to drop a business card up front!


     Prize drawing after the show.
Introductions
 Peter Brunone (that’s me)

 • peter.brunone@improvingenterprises.com
 • http://weblogs.asp.net/PeterBrunone

 In my life, I have:
 • Ridden a unicycle
 • Learned to play the tuba
 • Become an avid fan of both Doctor Who and Doctor McNinja
 • Not yet gotten on Twitter joined Twitter during this presentation
Power to the People
  Manipulating SharePoint
  with client-side JavaScript

          Peter Brunone, MCTS
peter.brunone@improvingenterprises.com
  http://weblogs.asp.net/peterbrunone
SERIOUSLY
Don’t forget to put your card in for
           the drawing.

       You’ll wish you had.
Two sides to every (dev) story
Traditionally, this is how it’s been:

Client-Side Manipulation      Server-Side Manipulation

• Style changes (though       • List item CRUD
  clunky)                     • Security/Permissions
• UI goodness (also clunky)   • TRUE POWER!
• You can push a lot of       • (but mostly reserved for
  buttons…                      Visual Studio)
So why develop client-side?
A few reasons:

• No special permissions required
• No required packaging
• No solution deployment process

         = Quicker changes!
Let’s talk about…

• The role of JavaScript from then to now
• The rise of jQuery
• Tool memos and cool demos
JavaScript in SharePoint
(a brief history)

In the beginning, there was… not much.

• SP 1 – wait, there was a SharePoint v1?
• WSS 2.0 (SharePoint 2003) – FrontPage
   – Web Services!
• WSS 3.0 (MOSS 2007) – SP Designer
   – Web Services – a few more options
   – Hack the Content Editor WebPart (CEWP)
JavaScript in SharePoint
Web Services

  – (insert mammoth block of code here)
JavaScript in SharePoint
…and then along came jQuery!
 – http://jquery.com
 – A JavaScript library that abstracts out a ton of
   basic (and not-so-basic) functions
 – Largely affects the markup in the browser
 – …BUT has some great built-in AJAX help for
   calling server resources
JavaScript in SharePoint

Demonstration: Styling, etc. with jQuery
Web Services and jQuery
$(document).ready(function() {
    var soapEnvelope =
        "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> 
           <soapenv:Body> 
              <GetListCollection xmlns='http://schemas.microsoft.com/sharepoint/soap/'> 
              </GetListCollection> 
           </soapenv:Body> 
        </soapenv:Envelope>";
    $.ajax({
        url: "http://yoursite/_vti_bin/lists.asmx",
        type: "POST",
        dataType: "xml",
        data: soapEnv,
        complete: getListNames,
        contentType: "text/xml; charset="utf-8""
    });
});

 function getListNames(xData, status) {
   $(xData.responseXML).find("List").each(function() {
       $("#data").append("<div>" + $(this).attr("Title") + "</div>");
   });
 }


 A lot less code, but still a bit of XML to track.
 (Do I want to have to know what a “SOAP Envelope” is?)

 (Special thanks to Jan Tielens for the code sample)
A still more excellent way

 The SPServices JavaScript library

 • http://spservices.codeplex.com/
 • Thank you, Marc Anderson (@sympmarc)!
 • Packaged web service operations for SP
 • Runs on top of jQuery
What’s new in 2010?
All hail the Client-Side Object Model!

• Managed code (VB, C#, anything that
  compiles for the .NET CLR)
• Silverlight
• JavaScript (ECMAScript)
Managed Code
Pros:
• Very powerful.
• Easy point of entry for .NET developers

Cons:
• Need .NET framework (proper version) on all
  target machines
• Oh, and Visual Studio. You must compile.
Silverlight
Pros:
• It’s cool.
• Broader target base -- no .NET install required

Cons:
• Still not completely accepted
• Users must install a plug-in
• Another dev platform to learn (school is boring)
JavaScript
Pros:
• Almost universally accepted – mature tech
• Platform independent (OOTB browser support)

Cons:
• Not all SP CSOM functionality is available
• Object types differ (JS is a loosely-typed language)
   – Some obscure methods replace
Using JS with the CSOM
All objects are derived from the SharePoint Object Model

What you need:

• SP.js
• The SharePoint default master page (trust me)
• FormDigest element – it’s for your own safety, ma’am.
Using JS with the CSOM


Demonstration: Adding and retrieving list items
The sum of our training
Nothing to see here

    (last demo)
Questions?
Power to the People
  Manipulating SharePoint
  with client-side JavaScript

          Peter Brunone, MCTS
peter.brunone@improvingenterprises.com
  http://weblogs.asp.net/peterbrunone
Thanks to all our Sponsors




            28

Más contenido relacionado

La actualidad más candente

WordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressWordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressJonny Allbut
 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme developmentJonny Allbut
 
The ES6 Conundrum - All Things Open 2015
The ES6 Conundrum - All Things Open 2015The ES6 Conundrum - All Things Open 2015
The ES6 Conundrum - All Things Open 2015Christian Heilmann
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4Derek Jacoby
 
Front-end Tools: Sifting Through the Madness
Front-end Tools: Sifting Through the MadnessFront-end Tools: Sifting Through the Madness
Front-end Tools: Sifting Through the MadnessFITC
 
Front-end Tools: Sifting Through the Madness
 Front-end Tools: Sifting Through the Madness Front-end Tools: Sifting Through the Madness
Front-end Tools: Sifting Through the MadnessFITC
 
Untangling spring week5
Untangling spring week5Untangling spring week5
Untangling spring week5Derek Jacoby
 
Untangling spring week11
Untangling spring week11Untangling spring week11
Untangling spring week11Derek Jacoby
 
All the small things… - Awwwards 2016
All the small things… - Awwwards 2016All the small things… - Awwwards 2016
All the small things… - Awwwards 2016Christian Heilmann
 
Haml And Sass In 15 Minutes
Haml And Sass In 15 MinutesHaml And Sass In 15 Minutes
Haml And Sass In 15 MinutesPatrick Crowley
 
5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5Dylan Jay
 
jQuery Conference Austin Sept 2013
jQuery Conference Austin Sept 2013jQuery Conference Austin Sept 2013
jQuery Conference Austin Sept 2013dmethvin
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_phpJeanho Chu
 
Use Powershell to make your life easy.
Use Powershell to make your life easy.Use Powershell to make your life easy.
Use Powershell to make your life easy.Aman Dhally
 
WordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshopWordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshopJonny Allbut
 
This is presentation at Mitaka.rb #10.
This is presentation at Mitaka.rb #10.This is presentation at Mitaka.rb #10.
This is presentation at Mitaka.rb #10.Masaki Komagata
 

La actualidad más candente (20)

WordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressWordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPress
 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme development
 
Dangerous CSS
Dangerous CSSDangerous CSS
Dangerous CSS
 
The ES6 Conundrum - All Things Open 2015
The ES6 Conundrum - All Things Open 2015The ES6 Conundrum - All Things Open 2015
The ES6 Conundrum - All Things Open 2015
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4
 
Front-end Tools: Sifting Through the Madness
Front-end Tools: Sifting Through the MadnessFront-end Tools: Sifting Through the Madness
Front-end Tools: Sifting Through the Madness
 
Front-end Tools: Sifting Through the Madness
 Front-end Tools: Sifting Through the Madness Front-end Tools: Sifting Through the Madness
Front-end Tools: Sifting Through the Madness
 
Untangling spring week5
Untangling spring week5Untangling spring week5
Untangling spring week5
 
Remix
RemixRemix
Remix
 
Html5
Html5Html5
Html5
 
Untangling spring week11
Untangling spring week11Untangling spring week11
Untangling spring week11
 
All the small things… - Awwwards 2016
All the small things… - Awwwards 2016All the small things… - Awwwards 2016
All the small things… - Awwwards 2016
 
Haml And Sass In 15 Minutes
Haml And Sass In 15 MinutesHaml And Sass In 15 Minutes
Haml And Sass In 15 Minutes
 
5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5
 
jQuery Conference Austin Sept 2013
jQuery Conference Austin Sept 2013jQuery Conference Austin Sept 2013
jQuery Conference Austin Sept 2013
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
 
Use Powershell to make your life easy.
Use Powershell to make your life easy.Use Powershell to make your life easy.
Use Powershell to make your life easy.
 
WordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshopWordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshop
 
Drupal Flyover, CMS Expo
Drupal Flyover, CMS ExpoDrupal Flyover, CMS Expo
Drupal Flyover, CMS Expo
 
This is presentation at Mitaka.rb #10.
This is presentation at Mitaka.rb #10.This is presentation at Mitaka.rb #10.
This is presentation at Mitaka.rb #10.
 

Destacado

Tugas geografi macam
Tugas geografi macamTugas geografi macam
Tugas geografi macamAzizaty
 
Экосистема Evernote и каналы продвижения партнерских проектов
Экосистема Evernote и каналы продвижения партнерских проектовЭкосистема Evernote и каналы продвижения партнерских проектов
Экосистема Evernote и каналы продвижения партнерских проектовEvernote
 
Hujan asam
Hujan asamHujan asam
Hujan asamAzizaty
 
Hujan asam
Hujan asamHujan asam
Hujan asamAzizaty
 
Bahasa indonesia pp
Bahasa indonesia ppBahasa indonesia pp
Bahasa indonesia ppAzizaty
 

Destacado (7)

Panela
PanelaPanela
Panela
 
Tugas geografi macam
Tugas geografi macamTugas geografi macam
Tugas geografi macam
 
Audience research for blog
Audience research for blogAudience research for blog
Audience research for blog
 
Экосистема Evernote и каналы продвижения партнерских проектов
Экосистема Evernote и каналы продвижения партнерских проектовЭкосистема Evernote и каналы продвижения партнерских проектов
Экосистема Evernote и каналы продвижения партнерских проектов
 
Hujan asam
Hujan asamHujan asam
Hujan asam
 
Hujan asam
Hujan asamHujan asam
Hujan asam
 
Bahasa indonesia pp
Bahasa indonesia ppBahasa indonesia pp
Bahasa indonesia pp
 

Similar a Power to the People: Manipulating SharePoint with Client-Side JavaScript

SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownMark Rackley
 
Introduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxIntroduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxlekhacce
 
#SPSNYC 2018 Migrate your custom components to the #SharePoint Framework #SPFX
#SPSNYC 2018 Migrate your custom components to the #SharePoint Framework #SPFX#SPSNYC 2018 Migrate your custom components to the #SharePoint Framework #SPFX
#SPSNYC 2018 Migrate your custom components to the #SharePoint Framework #SPFXVincent Biret
 
SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!Ben Steinhauser
 
A Beginner's Guide to Client Side Development with Javascript
A Beginner's Guide to Client Side Development with JavascriptA Beginner's Guide to Client Side Development with Javascript
A Beginner's Guide to Client Side Development with JavascriptSharePoint Saturday New Jersey
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxsilvers5
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSNaga Harish M
 
SharePoint Development 101
SharePoint Development 101SharePoint Development 101
SharePoint Development 101Greg Hurlman
 
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...BIWUG
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Jeremy Likness
 
Spsbe using js-linkanddisplaytemplates
Spsbe   using js-linkanddisplaytemplatesSpsbe   using js-linkanddisplaytemplates
Spsbe using js-linkanddisplaytemplatesPaul Hunt
 
Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Mikael Svenson
 
SUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT ProsSUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT ProsPaul Hunt
 
German introduction to sp framework
German   introduction to sp frameworkGerman   introduction to sp framework
German introduction to sp frameworkBob German
 
Share point development 101
Share point development 101Share point development 101
Share point development 101Becky Bertram
 
Drew madelung sp designer workflows - sp-biz
Drew madelung   sp designer workflows - sp-bizDrew madelung   sp designer workflows - sp-biz
Drew madelung sp designer workflows - sp-bizDrew Madelung
 
JSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday JerseyJSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday JerseyPaul Hunt
 

Similar a Power to the People: Manipulating SharePoint with Client-Side JavaScript (20)

SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have known
 
Introduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxIntroduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptx
 
#SPSNYC 2018 Migrate your custom components to the #SharePoint Framework #SPFX
#SPSNYC 2018 Migrate your custom components to the #SharePoint Framework #SPFX#SPSNYC 2018 Migrate your custom components to the #SharePoint Framework #SPFX
#SPSNYC 2018 Migrate your custom components to the #SharePoint Framework #SPFX
 
SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!
 
A Beginner's Guide to Client Side Development with Javascript
A Beginner's Guide to Client Side Development with JavascriptA Beginner's Guide to Client Side Development with Javascript
A Beginner's Guide to Client Side Development with Javascript
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptx
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
 
SharePoint Development 101
SharePoint Development 101SharePoint Development 101
SharePoint Development 101
 
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
 
25444215.pptx
25444215.pptx25444215.pptx
25444215.pptx
 
web development
web developmentweb development
web development
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!
 
Spsbe using js-linkanddisplaytemplates
Spsbe   using js-linkanddisplaytemplatesSpsbe   using js-linkanddisplaytemplates
Spsbe using js-linkanddisplaytemplates
 
Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013
 
SUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT ProsSUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT Pros
 
German introduction to sp framework
German   introduction to sp frameworkGerman   introduction to sp framework
German introduction to sp framework
 
web development
web developmentweb development
web development
 
Share point development 101
Share point development 101Share point development 101
Share point development 101
 
Drew madelung sp designer workflows - sp-biz
Drew madelung   sp designer workflows - sp-bizDrew madelung   sp designer workflows - sp-biz
Drew madelung sp designer workflows - sp-biz
 
JSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday JerseyJSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday Jersey
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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.pdfsudhanshuwaghmare1
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Power to the People: Manipulating SharePoint with Client-Side JavaScript

  • 2. Welcome to SharePoint Saturday Houston Thank you for being a part of the 3rd Annual SharePoint Saturday for the greater Houston area! • Please turn off all electronic devices or set them to vibrate. • If you must take a phone call, please do so in the hall so as not to disturb others. • Thanks to our Title Sponsor: And our Platinum Sponsors: 2
  • 3. Information • Speaker presentation slides will be available at SharePointSaturday.org/Houston within a week • Keep checking website for future events • The Houston SharePoint User Group at www.h-spug.org, will be having it’s May meeting Wednesday May 24th. Please be sure to join us! • Have a great day! 3
  • 4.
  • 5. DON’T FORGET …to drop a business card up front! Prize drawing after the show.
  • 6. Introductions Peter Brunone (that’s me) • peter.brunone@improvingenterprises.com • http://weblogs.asp.net/PeterBrunone In my life, I have: • Ridden a unicycle • Learned to play the tuba • Become an avid fan of both Doctor Who and Doctor McNinja • Not yet gotten on Twitter joined Twitter during this presentation
  • 7. Power to the People Manipulating SharePoint with client-side JavaScript Peter Brunone, MCTS peter.brunone@improvingenterprises.com http://weblogs.asp.net/peterbrunone
  • 8. SERIOUSLY Don’t forget to put your card in for the drawing. You’ll wish you had.
  • 9. Two sides to every (dev) story Traditionally, this is how it’s been: Client-Side Manipulation Server-Side Manipulation • Style changes (though • List item CRUD clunky) • Security/Permissions • UI goodness (also clunky) • TRUE POWER! • You can push a lot of • (but mostly reserved for buttons… Visual Studio)
  • 10. So why develop client-side? A few reasons: • No special permissions required • No required packaging • No solution deployment process = Quicker changes!
  • 11. Let’s talk about… • The role of JavaScript from then to now • The rise of jQuery • Tool memos and cool demos
  • 12. JavaScript in SharePoint (a brief history) In the beginning, there was… not much. • SP 1 – wait, there was a SharePoint v1? • WSS 2.0 (SharePoint 2003) – FrontPage – Web Services! • WSS 3.0 (MOSS 2007) – SP Designer – Web Services – a few more options – Hack the Content Editor WebPart (CEWP)
  • 13. JavaScript in SharePoint Web Services – (insert mammoth block of code here)
  • 14. JavaScript in SharePoint …and then along came jQuery! – http://jquery.com – A JavaScript library that abstracts out a ton of basic (and not-so-basic) functions – Largely affects the markup in the browser – …BUT has some great built-in AJAX help for calling server resources
  • 15. JavaScript in SharePoint Demonstration: Styling, etc. with jQuery
  • 16. Web Services and jQuery $(document).ready(function() { var soapEnvelope = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> <soapenv:Body> <GetListCollection xmlns='http://schemas.microsoft.com/sharepoint/soap/'> </GetListCollection> </soapenv:Body> </soapenv:Envelope>"; $.ajax({ url: "http://yoursite/_vti_bin/lists.asmx", type: "POST", dataType: "xml", data: soapEnv, complete: getListNames, contentType: "text/xml; charset="utf-8"" }); }); function getListNames(xData, status) { $(xData.responseXML).find("List").each(function() { $("#data").append("<div>" + $(this).attr("Title") + "</div>"); }); } A lot less code, but still a bit of XML to track. (Do I want to have to know what a “SOAP Envelope” is?) (Special thanks to Jan Tielens for the code sample)
  • 17. A still more excellent way The SPServices JavaScript library • http://spservices.codeplex.com/ • Thank you, Marc Anderson (@sympmarc)! • Packaged web service operations for SP • Runs on top of jQuery
  • 18. What’s new in 2010? All hail the Client-Side Object Model! • Managed code (VB, C#, anything that compiles for the .NET CLR) • Silverlight • JavaScript (ECMAScript)
  • 19. Managed Code Pros: • Very powerful. • Easy point of entry for .NET developers Cons: • Need .NET framework (proper version) on all target machines • Oh, and Visual Studio. You must compile.
  • 20. Silverlight Pros: • It’s cool. • Broader target base -- no .NET install required Cons: • Still not completely accepted • Users must install a plug-in • Another dev platform to learn (school is boring)
  • 21. JavaScript Pros: • Almost universally accepted – mature tech • Platform independent (OOTB browser support) Cons: • Not all SP CSOM functionality is available • Object types differ (JS is a loosely-typed language) – Some obscure methods replace
  • 22. Using JS with the CSOM All objects are derived from the SharePoint Object Model What you need: • SP.js • The SharePoint default master page (trust me) • FormDigest element – it’s for your own safety, ma’am.
  • 23. Using JS with the CSOM Demonstration: Adding and retrieving list items
  • 24. The sum of our training
  • 25. Nothing to see here (last demo)
  • 27. Power to the People Manipulating SharePoint with client-side JavaScript Peter Brunone, MCTS peter.brunone@improvingenterprises.com http://weblogs.asp.net/peterbrunone
  • 28. Thanks to all our Sponsors 28