SlideShare uma empresa Scribd logo
1 de 20
Spicing Up Web Parts using AJAX and Client Object Model Randy Williams Synergy rwilliams@synergyonline.com
About the Speaker US-West Coast Manager for Synergy Based in San Diego, California Consultant/Trainer/Author SharePoint MVP Specialty in architecting solutions Blog: www.synergyonline.com/randy Twitter: @tweetraw
Agenda AJAX Custom Web Services Client Object Model jQuery
How AJAX Works AJAX consists of JavaScript, DHTML and XMLHTTP XMLHTTPRequest object Acts as a web service client Used instead of a full postback Web server processes request and sends back response to browser Browser receives the response and updates the page dynamically
Using AJAX in SP2010 No configuration changes needed Built into web.config Built into v4.master Two primary ways Using UpdatePanel control (basic) Calling web services (advanced)
UpdatePanel Part of ASP.NET 3.5 Easiest way to add AJAX capability Most server-side events run as partial postbacks For SharePoint, use conditional mode up.UpdateMode= UpdatePanelUpdateMode.Conditional; Simple, but limited
Demo Using Update Panel
Calling Web Services Using AJAX, the browser can directly call into Web Services More powerful than UpdatePanel JSON is used to encode messages AJAX engine does most of the hard work Depending on the method used, OOB Web Services will not work Custom ones can be used
Creating Custom Web Services Create new WCF Service App project Write web service Configure a web.config for web service Dynamic bindings will not work with AJAX enableWebScript endpoint behavior – allows it to be called from AJAX client Deploy within 14SAPI
Demo Using AJAX to Call Custom Web Service
Client Object Model Working with SharePoint from client applications ECMAScript (JavaScript) Silverlight .NET Managed Easier than calling web services directly Provides a subset of the functionality available in the server object model Designed to work with data within a site collection
The ClientContext Object ClientContext is your handle to all other objects Site, Web, List, Item, File Optimizes communication to server by batching requests Typical usage: Define a query to retrieve or modify SharePoint objects Pass the query to one of the ClientContext’s Load methods Use ClientContext to execute the query Work with results returned
Demo Client OM from Silverlight Web Part
Session Heads-Up In Raphael 1, tomorrow at 1:45pm… 	Randy Williams 	SharePoint 2010: Developing with 	Data Technologies
Using jQuery Multi-purpose JavaScript library With it, you will write less JavaScript  Cross-browser support Create interactive and usable apps No need to deploy assemblies Works great in sandboxed web parts Hundreds of jQuery plugins
Where to Store these .js Libraries? Deploy as a module-type feature Works in both farm and sandboxed WSP Copy manually to designed libraries e.g. SiteAssets Shared or individual instances? Best to not rename file e.g. keep as jquery-1.5.1.js
Demo Using jQuery
Using SPServices Two primary functions Allows jQuery to easily call SharePoint OOB web services ListFormWebPart enhancements Download from http://spservices.codeplex.com/ Use when Client OM is insufficient
Demo Using jQuery and SPServices
Your Feedback is Important Please fill out a session evaluation form. Thank you!

Mais conteúdo relacionado

Mais procurados

Pros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside AppPros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside AppRavi Teja
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauSpiffy
 
MSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure FunctionsMSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure FunctionsMarc Obaldo
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVC Introduction to ASP.NET MVC
Introduction to ASP.NET MVC Joe Wilson
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentationteach4uin
 
360suite datasheet for SAP BusinessObjects
360suite datasheet for SAP BusinessObjects360suite datasheet for SAP BusinessObjects
360suite datasheet for SAP BusinessObjectsSebastien Goiffon
 
Internet without internet
Internet without internetInternet without internet
Internet without internetXavier Coureau
 
From PHP to React - case study
From PHP to React - case studyFrom PHP to React - case study
From PHP to React - case studySparkbit
 
All About Asp Net 4 0 Hosam Kamel
All About Asp Net 4 0  Hosam KamelAll About Asp Net 4 0  Hosam Kamel
All About Asp Net 4 0 Hosam KamelHosam Kamel
 
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
ECS19 - Ingo Gegenwarth -  Running Exchangein large environmentECS19 - Ingo Gegenwarth -  Running Exchangein large environment
ECS19 - Ingo Gegenwarth - Running Exchange in large environmentEuropean Collaboration Summit
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controlsRaed Aldahdooh
 
Single page application
Single page applicationSingle page application
Single page applicationJeremy Lee
 
Meteor Revolution: From DDP to Blaze Reactive Rendering
Meteor Revolution: From DDP to Blaze Reactive Rendering Meteor Revolution: From DDP to Blaze Reactive Rendering
Meteor Revolution: From DDP to Blaze Reactive Rendering Massimo Sgrelli
 
Single page applications with backbone js
Single page applications with backbone jsSingle page applications with backbone js
Single page applications with backbone jsGil Fink
 

Mais procurados (20)

Pros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside AppPros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside App
 
Ajax
AjaxAjax
Ajax
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin Lau
 
MSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure FunctionsMSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure Functions
 
Developing Sandbox Solutions
Developing Sandbox SolutionsDeveloping Sandbox Solutions
Developing Sandbox Solutions
 
Access SharePoint Remotely
Access SharePoint RemotelyAccess SharePoint Remotely
Access SharePoint Remotely
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVC Introduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentation
 
360suite datasheet for SAP BusinessObjects
360suite datasheet for SAP BusinessObjects360suite datasheet for SAP BusinessObjects
360suite datasheet for SAP BusinessObjects
 
Internet without internet
Internet without internetInternet without internet
Internet without internet
 
From PHP to React - case study
From PHP to React - case studyFrom PHP to React - case study
From PHP to React - case study
 
All About Asp Net 4 0 Hosam Kamel
All About Asp Net 4 0  Hosam KamelAll About Asp Net 4 0  Hosam Kamel
All About Asp Net 4 0 Hosam Kamel
 
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
ECS19 - Ingo Gegenwarth -  Running Exchangein large environmentECS19 - Ingo Gegenwarth -  Running Exchangein large environment
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
 
SP2010 Developer Tools
SP2010 Developer ToolsSP2010 Developer Tools
SP2010 Developer Tools
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controls
 
Single page application
Single page applicationSingle page application
Single page application
 
Single page application
Single page applicationSingle page application
Single page application
 
Single page App
Single page AppSingle page App
Single page App
 
Meteor Revolution: From DDP to Blaze Reactive Rendering
Meteor Revolution: From DDP to Blaze Reactive Rendering Meteor Revolution: From DDP to Blaze Reactive Rendering
Meteor Revolution: From DDP to Blaze Reactive Rendering
 
Single page applications with backbone js
Single page applications with backbone jsSingle page applications with backbone js
Single page applications with backbone js
 

Semelhante a Spicing up SharePoint web parts

4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio AnguloLuis Du Solier
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
 
SharePoint 2007 Presentation
SharePoint 2007 PresentationSharePoint 2007 Presentation
SharePoint 2007 PresentationAjay Jain
 
Usability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesUsability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesPeter Gfader
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET PresentationRasel Khan
 
Web Center Services and Framework
Web Center Services and  FrameworkWeb Center Services and  Framework
Web Center Services and FrameworkJaime Cid
 
Single Page Apps
Single Page AppsSingle Page Apps
Single Page AppsGil Fink
 
Lessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX ExperiencesLessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX Experiencesgoodfriday
 
Advanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentAdvanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentRob Windsor
 
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...SPTechCon
 
ASP.NET MVC and ajax
ASP.NET MVC and ajax ASP.NET MVC and ajax
ASP.NET MVC and ajax Brij Mishra
 

Semelhante a Spicing up SharePoint web parts (20)

4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
 
SharePoint 2007 Presentation
SharePoint 2007 PresentationSharePoint 2007 Presentation
SharePoint 2007 Presentation
 
Usability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesUsability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET Features
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
Ajax
AjaxAjax
Ajax
 
Walther Ajax4
Walther Ajax4Walther Ajax4
Walther Ajax4
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
ASP.NET OVERVIEW
ASP.NET OVERVIEWASP.NET OVERVIEW
ASP.NET OVERVIEW
 
Web Center Services and Framework
Web Center Services and  FrameworkWeb Center Services and  Framework
Web Center Services and Framework
 
Ajax Ppt 1
Ajax Ppt 1Ajax Ppt 1
Ajax Ppt 1
 
Single Page Apps
Single Page AppsSingle Page Apps
Single Page Apps
 
Ajax
AjaxAjax
Ajax
 
Lessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX ExperiencesLessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX Experiences
 
Lessons
LessonsLessons
Lessons
 
Asp dot net long
Asp dot net longAsp dot net long
Asp dot net long
 
Advanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentAdvanced SharePoint Web Part Development
Advanced SharePoint Web Part Development
 
AJAX
AJAXAJAX
AJAX
 
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
 
ASP.NET MVC and ajax
ASP.NET MVC and ajax ASP.NET MVC and ajax
ASP.NET MVC and ajax
 

Mais de Randy Williams

Architecting Solutions and Systems – Randy’s Secrets to Success
Architecting Solutions and Systems – Randy’s Secrets to SuccessArchitecting Solutions and Systems – Randy’s Secrets to Success
Architecting Solutions and Systems – Randy’s Secrets to SuccessRandy Williams
 
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsAn IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsRandy Williams
 
Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013Randy Williams
 
Governing and managing hybrid SharePoint environments
Governing and managing hybrid SharePoint environmentsGoverning and managing hybrid SharePoint environments
Governing and managing hybrid SharePoint environmentsRandy Williams
 
When governance lacks compliance
When governance lacks complianceWhen governance lacks compliance
When governance lacks complianceRandy Williams
 
The Future of Social Collaboration
The Future of Social CollaborationThe Future of Social Collaboration
The Future of Social CollaborationRandy Williams
 
Getting Started with SharePoint 2013 Apps
Getting Started with SharePoint 2013 AppsGetting Started with SharePoint 2013 Apps
Getting Started with SharePoint 2013 AppsRandy Williams
 
Building the next generation of browser apps today
Building the next generation of browser apps todayBuilding the next generation of browser apps today
Building the next generation of browser apps todayRandy Williams
 
SQL Server 2012 and SharePoint 2010: Reporting Nirvana
SQL Server 2012 and SharePoint 2010: Reporting NirvanaSQL Server 2012 and SharePoint 2010: Reporting Nirvana
SQL Server 2012 and SharePoint 2010: Reporting NirvanaRandy Williams
 
How governance drives your information and security architecture
How governance drives your information and security architectureHow governance drives your information and security architecture
How governance drives your information and security architectureRandy Williams
 
Sizing your Content Databases: Understanding the Limits
Sizing your Content Databases: Understanding the LimitsSizing your Content Databases: Understanding the Limits
Sizing your Content Databases: Understanding the LimitsRandy Williams
 
SharePoint Online and the Cloud
SharePoint Online and the CloudSharePoint Online and the Cloud
SharePoint Online and the CloudRandy Williams
 
Enforcing SharePoint Governance
Enforcing SharePoint GovernanceEnforcing SharePoint Governance
Enforcing SharePoint GovernanceRandy Williams
 
Migrating to Office 365
Migrating to Office 365Migrating to Office 365
Migrating to Office 365Randy Williams
 
Governance - how does information & security drive your architecture
Governance - how does information & security drive your architectureGovernance - how does information & security drive your architecture
Governance - how does information & security drive your architectureRandy Williams
 
Understanding SharePoint Governance
Understanding SharePoint GovernanceUnderstanding SharePoint Governance
Understanding SharePoint GovernanceRandy Williams
 
Guiding a Successful SharePoint Implementation
Guiding a Successful SharePoint ImplementationGuiding a Successful SharePoint Implementation
Guiding a Successful SharePoint ImplementationRandy Williams
 
Plugging holes in your SharePoint 2010 disaster recovery strategy
Plugging holes in your SharePoint 2010 disaster recovery strategyPlugging holes in your SharePoint 2010 disaster recovery strategy
Plugging holes in your SharePoint 2010 disaster recovery strategyRandy Williams
 
Using Visual Studio to Build SharePoint 2010 Solutions
Using Visual Studio to Build SharePoint 2010 SolutionsUsing Visual Studio to Build SharePoint 2010 Solutions
Using Visual Studio to Build SharePoint 2010 SolutionsRandy Williams
 

Mais de Randy Williams (20)

Architecting Solutions and Systems – Randy’s Secrets to Success
Architecting Solutions and Systems – Randy’s Secrets to SuccessArchitecting Solutions and Systems – Randy’s Secrets to Success
Architecting Solutions and Systems – Randy’s Secrets to Success
 
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsAn IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
 
Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013
 
Governing and managing hybrid SharePoint environments
Governing and managing hybrid SharePoint environmentsGoverning and managing hybrid SharePoint environments
Governing and managing hybrid SharePoint environments
 
When governance lacks compliance
When governance lacks complianceWhen governance lacks compliance
When governance lacks compliance
 
The Future of Social Collaboration
The Future of Social CollaborationThe Future of Social Collaboration
The Future of Social Collaboration
 
Getting Started with SharePoint 2013 Apps
Getting Started with SharePoint 2013 AppsGetting Started with SharePoint 2013 Apps
Getting Started with SharePoint 2013 Apps
 
Building the next generation of browser apps today
Building the next generation of browser apps todayBuilding the next generation of browser apps today
Building the next generation of browser apps today
 
SQL Server 2012 and SharePoint 2010: Reporting Nirvana
SQL Server 2012 and SharePoint 2010: Reporting NirvanaSQL Server 2012 and SharePoint 2010: Reporting Nirvana
SQL Server 2012 and SharePoint 2010: Reporting Nirvana
 
How governance drives your information and security architecture
How governance drives your information and security architectureHow governance drives your information and security architecture
How governance drives your information and security architecture
 
Sizing your Content Databases: Understanding the Limits
Sizing your Content Databases: Understanding the LimitsSizing your Content Databases: Understanding the Limits
Sizing your Content Databases: Understanding the Limits
 
SharePoint Online and the Cloud
SharePoint Online and the CloudSharePoint Online and the Cloud
SharePoint Online and the Cloud
 
Enforcing SharePoint Governance
Enforcing SharePoint GovernanceEnforcing SharePoint Governance
Enforcing SharePoint Governance
 
Migrating to Office 365
Migrating to Office 365Migrating to Office 365
Migrating to Office 365
 
Governance - how does information & security drive your architecture
Governance - how does information & security drive your architectureGovernance - how does information & security drive your architecture
Governance - how does information & security drive your architecture
 
Understanding SharePoint Governance
Understanding SharePoint GovernanceUnderstanding SharePoint Governance
Understanding SharePoint Governance
 
Why I Use SharePoint
Why I Use SharePointWhy I Use SharePoint
Why I Use SharePoint
 
Guiding a Successful SharePoint Implementation
Guiding a Successful SharePoint ImplementationGuiding a Successful SharePoint Implementation
Guiding a Successful SharePoint Implementation
 
Plugging holes in your SharePoint 2010 disaster recovery strategy
Plugging holes in your SharePoint 2010 disaster recovery strategyPlugging holes in your SharePoint 2010 disaster recovery strategy
Plugging holes in your SharePoint 2010 disaster recovery strategy
 
Using Visual Studio to Build SharePoint 2010 Solutions
Using Visual Studio to Build SharePoint 2010 SolutionsUsing Visual Studio to Build SharePoint 2010 Solutions
Using Visual Studio to Build SharePoint 2010 Solutions
 

Último

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Último (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Spicing up SharePoint web parts

  • 1. Spicing Up Web Parts using AJAX and Client Object Model Randy Williams Synergy rwilliams@synergyonline.com
  • 2. About the Speaker US-West Coast Manager for Synergy Based in San Diego, California Consultant/Trainer/Author SharePoint MVP Specialty in architecting solutions Blog: www.synergyonline.com/randy Twitter: @tweetraw
  • 3. Agenda AJAX Custom Web Services Client Object Model jQuery
  • 4. How AJAX Works AJAX consists of JavaScript, DHTML and XMLHTTP XMLHTTPRequest object Acts as a web service client Used instead of a full postback Web server processes request and sends back response to browser Browser receives the response and updates the page dynamically
  • 5. Using AJAX in SP2010 No configuration changes needed Built into web.config Built into v4.master Two primary ways Using UpdatePanel control (basic) Calling web services (advanced)
  • 6. UpdatePanel Part of ASP.NET 3.5 Easiest way to add AJAX capability Most server-side events run as partial postbacks For SharePoint, use conditional mode up.UpdateMode= UpdatePanelUpdateMode.Conditional; Simple, but limited
  • 8. Calling Web Services Using AJAX, the browser can directly call into Web Services More powerful than UpdatePanel JSON is used to encode messages AJAX engine does most of the hard work Depending on the method used, OOB Web Services will not work Custom ones can be used
  • 9. Creating Custom Web Services Create new WCF Service App project Write web service Configure a web.config for web service Dynamic bindings will not work with AJAX enableWebScript endpoint behavior – allows it to be called from AJAX client Deploy within 14SAPI
  • 10. Demo Using AJAX to Call Custom Web Service
  • 11. Client Object Model Working with SharePoint from client applications ECMAScript (JavaScript) Silverlight .NET Managed Easier than calling web services directly Provides a subset of the functionality available in the server object model Designed to work with data within a site collection
  • 12. The ClientContext Object ClientContext is your handle to all other objects Site, Web, List, Item, File Optimizes communication to server by batching requests Typical usage: Define a query to retrieve or modify SharePoint objects Pass the query to one of the ClientContext’s Load methods Use ClientContext to execute the query Work with results returned
  • 13. Demo Client OM from Silverlight Web Part
  • 14. Session Heads-Up In Raphael 1, tomorrow at 1:45pm… Randy Williams SharePoint 2010: Developing with Data Technologies
  • 15. Using jQuery Multi-purpose JavaScript library With it, you will write less JavaScript  Cross-browser support Create interactive and usable apps No need to deploy assemblies Works great in sandboxed web parts Hundreds of jQuery plugins
  • 16. Where to Store these .js Libraries? Deploy as a module-type feature Works in both farm and sandboxed WSP Copy manually to designed libraries e.g. SiteAssets Shared or individual instances? Best to not rename file e.g. keep as jquery-1.5.1.js
  • 18. Using SPServices Two primary functions Allows jQuery to easily call SharePoint OOB web services ListFormWebPart enhancements Download from http://spservices.codeplex.com/ Use when Client OM is insufficient
  • 19. Demo Using jQuery and SPServices
  • 20. Your Feedback is Important Please fill out a session evaluation form. Thank you!