SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Local Touch – Global Reach




Javascript-Based Solutions
in SharePoint 2010
Derek Gusoff
Senior Consultant
Sogeti USA




                                    www.us.sogeti.com
About Me

   Derek Gusoff
   Senior Consultant with Sogeti USA since 2008


   @dgusoff
   http://derekgusoff.wordpress.com
   derek.gusoff@us.sogeti.com




                                                  www.us.sogeti.com   2
Local Touch – Global Reach
Agenda

  •        Why JavaScript?
  •        A story
  •        A defense of JavaScript
  •        jQuery (with demos!)
  •        Accessing data in SharePoint
        – ASMX web services / SPServices
        – REST interface
        – Client Object Model (with demos!)
  •        Debugging and Troubleshooting
  •        The OOB JavaScript files
  •        Case Study
  •        Q&A
  •        The craziest thing I’ve ever done in JavaScript




                                                             www.us.sogeti.com   3
Local Touch – Global Reach
Why JavaScript?

   •        SharePoint provides a UI right out of the box
   •        It doesn’t always meet all our needs
   •        JavaScript can fill the gap between standard functionality and your organization’s
            unique business requirements.




                                http://www.leadersintheknow.biz
                                                                                    www.us.sogeti.com   4
Local Touch – Global Reach
A Story




                             http://www.learningjquery.com/

                                                              www.us.sogeti.com   5
Local Touch – Global Reach
The trouble with JavaScript




  http://blogs.claritycon.com/blog/

                                      www.us.sogeti.com   6
Local Touch – Global Reach
jQuery




                             www.us.sogeti.com   7
Local Touch – Global Reach
Three things jQuery does extremely well

   •        Manipulate the DOM
   •        Make AJAX calls
   •        Handle Events




                                             www.us.sogeti.com   8
Local Touch – Global Reach
jQuery Selector syntax

   Note: the $ function always returns an array




            http://api.jquery.com/category/selectors/


                                                        www.us.sogeti.com   9
Local Touch – Global Reach
jQuery AJAX calls




                             http://api.jquery.com/jQuery.ajax/




                                                                  www.us.sogeti.com   10
Local Touch – Global Reach
jQuery Events

   •        A simple, easy-to-use method for subscribing to events in the web page


   •        The ready() event – executes when the page DOM is loaded




   •       An example of a click handler




   •        http://api.jquery.com/category/events/



                                                                                     www.us.sogeti.com   11
Local Touch – Global Reach
jQuery




                             Demo




                                    www.us.sogeti.com   12
Local Touch – Global Reach
SharePoint JavaScript APIs

   •        ASMX web services
         – SOAP-based
         – Lots of functionality not available anywhere else
         – Supposedly deprecated in SP2013 but still supported
         – Search
         – User Profilles
         – Versions
         – FBA
         – Social Data
         – Sites, Webs, Lists, Views, Content Types




                    http://msdn.microsoft.com/en-us/library/ee705814.aspx




                                                                            www.us.sogeti.com   13
Local Touch – Global Reach
ASMX Web Services




                             www.us.sogeti.com   14
Local Touch – Global Reach
SPServices

   •        Third-party jQuery-based library for SharePoint
   •        Available at http://spservices.codeplex.com/
   •        You can think of it as a wrapper for the ASMX web services but it’s more than that.




                                                                                    www.us.sogeti.com   15
Local Touch – Global Reach
SPServices




                             www.us.sogeti.com   16
Local Touch – Global Reach
REST Interface

   •        A RESTful way to access SharePoint List data
   •        The REST interface has been completely replaced in SP2013, so any 2010
            development will need to be redone after upgrade to 2013.
   •        URL-based syntax




                                                                                www.us.sogeti.com   17
Local Touch – Global Reach
REST Interface




                             www.us.sogeti.com   18
Local Touch – Global Reach
Client Side Object Model (CSOM)

   •        Provides a programming interface familiar to .NET developers
   •        The preferred method for interacting with SharePoint in JavaScript in 2010 and 2013
   •        Uses a web service called Client.svc under the hood.
   •        Asynchronous operation


   •        Limitations
         – Unlike REST or ASMX, the CSOM is scoped to a site collection
         – Limited to operations within a site collection




                                                                                   www.us.sogeti.com   19
Local Touch – Global Reach
Client Side Object Model (CSOM)




                                     www.us.sogeti.com   20
Local Touch – Global Reach
Client Side Object Model (CSOM)




                             Demos




                                     www.us.sogeti.com   21
Local Touch – Global Reach
Debugging tools and techniques

   •        Internet Explorer Developer Tools (F12)
   •        Visual Studio
   •        Fiddler




                                                      www.us.sogeti.com   22
Local Touch – Global Reach
Provisioning JavaScript to SharePoint

   “The evolution of a SharePoint Developer”


   •        Content Editor Web Part
   •        SharePoint Designer
   •        Visual Studio Solution package




                                               www.us.sogeti.com   23
Local Touch – Global Reach
Referencing JavaScript files in SharePoint pages

   •        <script> tag in page


   •        <script> tag in Master page


   •        <CustomAction Location=“ScriptLink”


   •        Try to put commonly used functionality in common files referenced across the site


   •        Try to put page-specific code in files referenced only in that page or pages




                                                                                     www.us.sogeti.com   24
Local Touch – Global Reach
OOB SharePoint JavaScript files

   •        To view debug version of SharePoint’s JavaScript files:


   •        Modify this element on the web app’s web.config:


   •        <compilation batch="false" debug="true">


   •        Interesting files to check out;
   •        Core.js
   •        SP.js
         – The “SP.*js” files represent the client object model
   •        Init.js
   •        Form.js




                                                                      www.us.sogeti.com   25
Local Touch – Global Reach
Reference Implementation: Filtered Lookups

   Requirements
   •       Need a way to filter lookups by user-entered criteria
   •       Also need a default search filter( only open projects, for example)
   •       Need to support a variety of search operators(Equal, Not Equal, Contains)
   •       NO Code allowed




                                                                                  www.us.sogeti.com   26
Local Touch – Global Reach
Filtered Lookups – Design considerations

   •        The list architecture for lookups does not need to change – only the user interface
               •     We only need to change the user interface(manipulate the DOM)
               •     We need a way to generate (on the fly) a query, merge it with a default query, send it to SharePoint, and process the
                     results

   •        We can use jQuery to hide the default lookups and replace with our own
   •        We can launch a form in a dialog to capture the user’s query
   •        We can use the Client Object model to create our query, fetch the desired results and
            place them back into the form




                                                                                                                       www.us.sogeti.com     27
Local Touch – Global Reach
Filtered Lookups




                             Demo




                                    www.us.sogeti.com   28
Local Touch – Global Reach
The craziest thing I ever did with JavaScript




                             http://blogs.claritycon.com/blog/
                                                                 www.us.sogeti.com   29
Local Touch – Global Reach
Local Touch – Global Reach



 Thank you




                             www.us.sogeti.com

Weitere ähnliche Inhalte

Was ist angesagt?

Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...Chris O'Brien
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesMark Rackley
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery GuideMark Rackley
 
Editable Documents on the Web
Editable Documents on the WebEditable Documents on the Web
Editable Documents on the WebMarkku Laine
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOMMark Rackley
 
SPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointSPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointMark Rackley
 
A Power User's Intro to jQuery Awesomeness in SharePoint
A Power User's Intro to jQuery Awesomeness in SharePointA Power User's Intro to jQuery Awesomeness in SharePoint
A Power User's Intro to jQuery Awesomeness in SharePointMark Rackley
 
Blazor certification training - Dot Net Tricks
Blazor certification training - Dot Net TricksBlazor certification training - Dot Net Tricks
Blazor certification training - Dot Net TricksGaurav Singh
 
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointSPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointMark Rackley
 
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
 
JavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersJavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersRob Windsor
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Fabio Franzini
 
SharePoint Development in Government Environments
SharePoint Development in Government EnvironmentsSharePoint Development in Government Environments
SharePoint Development in Government EnvironmentsGunjan Datta
 
SPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuerySPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQueryMark Rackley
 
Get started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePointGet started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePointYaroslav Pentsarskyy [MVP]
 
SPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint LimitationsSPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint LimitationsMark Rackley
 
Intro to SharePoint Web Services
Intro to SharePoint Web ServicesIntro to SharePoint Web Services
Intro to SharePoint Web ServicesMark Rackley
 
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsCodemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsFabio Franzini
 
Introduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPathIntroduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPathMark Rackley
 
Building high performance
Building high performanceBuilding high performance
Building high performanceRoy Sheinfeld
 

Was ist angesagt? (20)

Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
 
Editable Documents on the Web
Editable Documents on the WebEditable Documents on the Web
Editable Documents on the Web
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
 
SPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointSPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePoint
 
A Power User's Intro to jQuery Awesomeness in SharePoint
A Power User's Intro to jQuery Awesomeness in SharePointA Power User's Intro to jQuery Awesomeness in SharePoint
A Power User's Intro to jQuery Awesomeness in SharePoint
 
Blazor certification training - Dot Net Tricks
Blazor certification training - Dot Net TricksBlazor certification training - Dot Net Tricks
Blazor certification training - Dot Net Tricks
 
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointSPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
 
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
 
JavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersJavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint Developers
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...
 
SharePoint Development in Government Environments
SharePoint Development in Government EnvironmentsSharePoint Development in Government Environments
SharePoint Development in Government Environments
 
SPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuerySPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuery
 
Get started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePointGet started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePoint
 
SPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint LimitationsSPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint Limitations
 
Intro to SharePoint Web Services
Intro to SharePoint Web ServicesIntro to SharePoint Web Services
Intro to SharePoint Web Services
 
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsCodemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
 
Introduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPathIntroduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPath
 
Building high performance
Building high performanceBuilding high performance
Building high performance
 

Ähnlich wie Share point saturday presentation 9 29-2012-2

NW Ohio SharePoint User group 4 10-2013
NW Ohio SharePoint User group 4 10-2013NW Ohio SharePoint User group 4 10-2013
NW Ohio SharePoint User group 4 10-2013Derek Gusoff
 
DIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayDIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayBojan Veljanovski
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Ganesh Kondal
 
Decoupled Architecture and WordPress
Decoupled Architecture and WordPressDecoupled Architecture and WordPress
Decoupled Architecture and WordPressPantheon
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesTeamstudio
 
Sahi Principles and Architecture
Sahi Principles and ArchitectureSahi Principles and Architecture
Sahi Principles and ArchitectureTyto Software
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Nuxeo
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)jeresig
 
Creating a Responsive Website From Scratch
Creating a Responsive Website From ScratchCreating a Responsive Website From Scratch
Creating a Responsive Website From ScratchCorky Brown
 
Good bye Massive View Controller!
Good bye Massive View Controller!Good bye Massive View Controller!
Good bye Massive View Controller!Supercharge
 
Mobile web development
Mobile web development Mobile web development
Mobile web development Moumie Soulemane
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web ApplicationYakov Fain
 
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint BeastMark Rackley
 
Station Four: Web Redesign Presentation
Station Four: Web Redesign PresentationStation Four: Web Redesign Presentation
Station Four: Web Redesign Presentationcolberding
 
Isomorphic web application
Isomorphic web applicationIsomorphic web application
Isomorphic web applicationOliver N
 
JavaScript for ASP.NET programmers (webcast) upload
JavaScript for ASP.NET programmers (webcast) uploadJavaScript for ASP.NET programmers (webcast) upload
JavaScript for ASP.NET programmers (webcast) uploadRuss Fustino
 
Testing Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and NetworksTesting Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and NetworksAcquia
 
Filling in the Blanks: Capturing Dynamically Generated Content
Filling in the Blanks: Capturing Dynamically Generated ContentFilling in the Blanks: Capturing Dynamically Generated Content
Filling in the Blanks: Capturing Dynamically Generated ContentJustin Brunelle
 
Javascript library toolbox
Javascript library toolboxJavascript library toolbox
Javascript library toolboxSkysoul Pty.Ltd.
 

Ähnlich wie Share point saturday presentation 9 29-2012-2 (20)

NW Ohio SharePoint User group 4 10-2013
NW Ohio SharePoint User group 4 10-2013NW Ohio SharePoint User group 4 10-2013
NW Ohio SharePoint User group 4 10-2013
 
DIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayDIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development today
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
 
Decoupled Architecture and WordPress
Decoupled Architecture and WordPressDecoupled Architecture and WordPress
Decoupled Architecture and WordPress
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPages
 
Sahi Principles and Architecture
Sahi Principles and ArchitectureSahi Principles and Architecture
Sahi Principles and Architecture
 
Gwt Deep Dive
Gwt Deep DiveGwt Deep Dive
Gwt Deep Dive
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
 
Creating a Responsive Website From Scratch
Creating a Responsive Website From ScratchCreating a Responsive Website From Scratch
Creating a Responsive Website From Scratch
 
Good bye Massive View Controller!
Good bye Massive View Controller!Good bye Massive View Controller!
Good bye Massive View Controller!
 
Mobile web development
Mobile web development Mobile web development
Mobile web development
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
 
Station Four: Web Redesign Presentation
Station Four: Web Redesign PresentationStation Four: Web Redesign Presentation
Station Four: Web Redesign Presentation
 
Isomorphic web application
Isomorphic web applicationIsomorphic web application
Isomorphic web application
 
JavaScript for ASP.NET programmers (webcast) upload
JavaScript for ASP.NET programmers (webcast) uploadJavaScript for ASP.NET programmers (webcast) upload
JavaScript for ASP.NET programmers (webcast) upload
 
Testing Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and NetworksTesting Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and Networks
 
Filling in the Blanks: Capturing Dynamically Generated Content
Filling in the Blanks: Capturing Dynamically Generated ContentFilling in the Blanks: Capturing Dynamically Generated Content
Filling in the Blanks: Capturing Dynamically Generated Content
 
Javascript library toolbox
Javascript library toolboxJavascript library toolbox
Javascript library toolbox
 

KĂźrzlich hochgeladen

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂşjo
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
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
 
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
 
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
 
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
 
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
 

KĂźrzlich hochgeladen (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
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
 
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
 

Share point saturday presentation 9 29-2012-2

  • 1. Local Touch – Global Reach Javascript-Based Solutions in SharePoint 2010 Derek Gusoff Senior Consultant Sogeti USA www.us.sogeti.com
  • 2. About Me Derek Gusoff Senior Consultant with Sogeti USA since 2008 @dgusoff http://derekgusoff.wordpress.com derek.gusoff@us.sogeti.com www.us.sogeti.com 2 Local Touch – Global Reach
  • 3. Agenda • Why JavaScript? • A story • A defense of JavaScript • jQuery (with demos!) • Accessing data in SharePoint – ASMX web services / SPServices – REST interface – Client Object Model (with demos!) • Debugging and Troubleshooting • The OOB JavaScript files • Case Study • Q&A • The craziest thing I’ve ever done in JavaScript www.us.sogeti.com 3 Local Touch – Global Reach
  • 4. Why JavaScript? • SharePoint provides a UI right out of the box • It doesn’t always meet all our needs • JavaScript can fill the gap between standard functionality and your organization’s unique business requirements. http://www.leadersintheknow.biz www.us.sogeti.com 4 Local Touch – Global Reach
  • 5. A Story http://www.learningjquery.com/ www.us.sogeti.com 5 Local Touch – Global Reach
  • 6. The trouble with JavaScript http://blogs.claritycon.com/blog/ www.us.sogeti.com 6 Local Touch – Global Reach
  • 7. jQuery www.us.sogeti.com 7 Local Touch – Global Reach
  • 8. Three things jQuery does extremely well • Manipulate the DOM • Make AJAX calls • Handle Events www.us.sogeti.com 8 Local Touch – Global Reach
  • 9. jQuery Selector syntax Note: the $ function always returns an array http://api.jquery.com/category/selectors/ www.us.sogeti.com 9 Local Touch – Global Reach
  • 10. jQuery AJAX calls http://api.jquery.com/jQuery.ajax/ www.us.sogeti.com 10 Local Touch – Global Reach
  • 11. jQuery Events • A simple, easy-to-use method for subscribing to events in the web page • The ready() event – executes when the page DOM is loaded • An example of a click handler • http://api.jquery.com/category/events/ www.us.sogeti.com 11 Local Touch – Global Reach
  • 12. jQuery Demo www.us.sogeti.com 12 Local Touch – Global Reach
  • 13. SharePoint JavaScript APIs • ASMX web services – SOAP-based – Lots of functionality not available anywhere else – Supposedly deprecated in SP2013 but still supported – Search – User Profilles – Versions – FBA – Social Data – Sites, Webs, Lists, Views, Content Types http://msdn.microsoft.com/en-us/library/ee705814.aspx www.us.sogeti.com 13 Local Touch – Global Reach
  • 14. ASMX Web Services www.us.sogeti.com 14 Local Touch – Global Reach
  • 15. SPServices • Third-party jQuery-based library for SharePoint • Available at http://spservices.codeplex.com/ • You can think of it as a wrapper for the ASMX web services but it’s more than that. www.us.sogeti.com 15 Local Touch – Global Reach
  • 16. SPServices www.us.sogeti.com 16 Local Touch – Global Reach
  • 17. REST Interface • A RESTful way to access SharePoint List data • The REST interface has been completely replaced in SP2013, so any 2010 development will need to be redone after upgrade to 2013. • URL-based syntax www.us.sogeti.com 17 Local Touch – Global Reach
  • 18. REST Interface www.us.sogeti.com 18 Local Touch – Global Reach
  • 19. Client Side Object Model (CSOM) • Provides a programming interface familiar to .NET developers • The preferred method for interacting with SharePoint in JavaScript in 2010 and 2013 • Uses a web service called Client.svc under the hood. • Asynchronous operation • Limitations – Unlike REST or ASMX, the CSOM is scoped to a site collection – Limited to operations within a site collection www.us.sogeti.com 19 Local Touch – Global Reach
  • 20. Client Side Object Model (CSOM) www.us.sogeti.com 20 Local Touch – Global Reach
  • 21. Client Side Object Model (CSOM) Demos www.us.sogeti.com 21 Local Touch – Global Reach
  • 22. Debugging tools and techniques • Internet Explorer Developer Tools (F12) • Visual Studio • Fiddler www.us.sogeti.com 22 Local Touch – Global Reach
  • 23. Provisioning JavaScript to SharePoint “The evolution of a SharePoint Developer” • Content Editor Web Part • SharePoint Designer • Visual Studio Solution package www.us.sogeti.com 23 Local Touch – Global Reach
  • 24. Referencing JavaScript files in SharePoint pages • <script> tag in page • <script> tag in Master page • <CustomAction Location=“ScriptLink” • Try to put commonly used functionality in common files referenced across the site • Try to put page-specific code in files referenced only in that page or pages www.us.sogeti.com 24 Local Touch – Global Reach
  • 25. OOB SharePoint JavaScript files • To view debug version of SharePoint’s JavaScript files: • Modify this element on the web app’s web.config: • <compilation batch="false" debug="true"> • Interesting files to check out; • Core.js • SP.js – The “SP.*js” files represent the client object model • Init.js • Form.js www.us.sogeti.com 25 Local Touch – Global Reach
  • 26. Reference Implementation: Filtered Lookups Requirements • Need a way to filter lookups by user-entered criteria • Also need a default search filter( only open projects, for example) • Need to support a variety of search operators(Equal, Not Equal, Contains) • NO Code allowed www.us.sogeti.com 26 Local Touch – Global Reach
  • 27. Filtered Lookups – Design considerations • The list architecture for lookups does not need to change – only the user interface • We only need to change the user interface(manipulate the DOM) • We need a way to generate (on the fly) a query, merge it with a default query, send it to SharePoint, and process the results • We can use jQuery to hide the default lookups and replace with our own • We can launch a form in a dialog to capture the user’s query • We can use the Client Object model to create our query, fetch the desired results and place them back into the form www.us.sogeti.com 27 Local Touch – Global Reach
  • 28. Filtered Lookups Demo www.us.sogeti.com 28 Local Touch – Global Reach
  • 29. The craziest thing I ever did with JavaScript http://blogs.claritycon.com/blog/ www.us.sogeti.com 29 Local Touch – Global Reach
  • 30. Local Touch – Global Reach Thank you www.us.sogeti.com