SlideShare a Scribd company logo
Using Client
Object
Model



               Daniel Plocker
               CTO, Advantech
Agenda



         โ€ข Client Object Model
           overview
         โ€ข ECMA Script Client OM
         โ€ข Extending SP with
           HTML 5
         โ€ข Going Mobile
         โ€ข .Net Managed Client
Why
Client
OM?

         ๏‚งClient side integration between
          SharePoint and existing Office or LOB
          apps simplifies day-to-day activities.
         ๏‚งRicher, smoother and more intuitive
          user experience.
         ๏‚งBetter multi-platform support.
The
Basics


         ๏‚ง Client-side library for remotely calling
           SharePoint
          ๏‚ง Mirrors (a subset) of objects on the server
          ๏‚ง Usable in JavaScript, .net CLR, Silverlight CLR
         ๏‚ง Requests are batched for over- the-wire
           performance
         ๏‚ง Used by SharePoint UI for operations like
           batch deletion
Equivalent
Objects
3 things
to know


           1. ClientContext is the central object
                  clientContext = new
                  ClientContext(โ€œhttp://mysiteโ€);
           2. Before you read a property, you have to ask for it
                  clientContext.Load(list);
           3. All requests must be committed in a batch
                  clientContext.ExecuteQuery();
Accessing
Data with
Client OM




            client
            server
Client Object
Model
Limitations


                ๏‚ง Client object model cannot be used on server
                  to talk to same-server
                ๏‚ง You still need to handle synch/update
                  semantics (change log could help)
                ๏‚ง No elevation of privilege capabilities
                ๏‚ง Requests are throttled
                ๏‚ง .net CLR has sync method;
                  Silverlight CLR and Jscript are async
JavaScript
Client
object
model
JavaScript
Client
OM

             ๏‚ง JavaScript Client OM is easily added to a
               SharePoint ASPX page - reference:
              ๏‚ง _layouts/sp.js
              ๏‚ง Add this using <SharePoint:ScriptLink>
             ๏‚ง All libraries crunched for performance
              ๏‚ง Use un-crunched *.debug.js files with debug
                mode
             ๏‚ง Method signatures can be different
               compared to .NET and Silverlight
             ๏‚ง Different data value types
JavaScript
Client
OM

             ๏‚ง C:Program FilesCommon FilesMicrosoft
               SharedWeb Server
               Extensions14TEMPLATELAYOUTS
             ๏‚ง SP.js (SP.debug.js)
                 ๏‚ง 380KB (559KB)
             ๏‚ง SP.Core.js (SP.Core.debug.js)
                 ๏‚ง 13KB (20KB)
             ๏‚ง SP.Runtime.js (SP.Runtime.debug.js)
                 ๏‚ง 68KB (108KB)
JavaScript
in
SharePoint
2010
JavaScript
Client
OM
Fluent UI
Status Bar
and
Notification
Area
DEMO
Items not
covered by
CSOM

             ๏‚ง User Profiles
             ๏‚ง People
             ๏‚ง Search
             ๏‚ง Enterprise Metadata
             ๏‚ง Excel REST web services
             ๏‚ง Publishing
             ๏‚ง Administration
HTML 5


         ๏‚ง <HTML>
         ๏‚ง <CANVAS>
         ๏‚ง <VIDEO>
         ๏‚ง <INPUT>
         ๏‚ง <AUDIO>
         ๏‚ง <COMMAND>
         ๏‚ง <DATALIST>
         ๏‚ง <TIME>
HTML 5 โ€“
Getting it
Working

             ๏‚ง <HTML> tag
             ๏‚ง Internet Explorer 9 compatibility
             ๏‚ง <meta http-equiv="X-UA-Compatible"
               content="IE=9"/>
             ๏‚ง Potential issues and workarounds
DEMO
Going
Mobile
with
JQuery
         ๏‚ง jQuery is a cross-browser JavaScript
         library designed to simplify the client-
         side scripting of HTML
         ๏‚ง $("div.test").add("p.quote").addClass("bl
         ue").slideDown("slow");
         ๏‚ง $.each([1,2,3], function(){ โ€ฆ }
         ๏‚ง jQuery Mobile is a touch-optimized
         web framework
Going
Mobile
with
SharePoint
             ๏‚ง Built-in mobile view with &mobile=1
             ๏‚ง You can customize the mobile view and
             master page.
             ๏‚ง To take advantage of JQuery Mobile:
                ๏‚ง Create a simple master page, HTML5
                  valid
                ๏‚ง Add script links
                ๏‚ง To use with client OM, donโ€™t forget
                  ExecuteOrDelayUntilScriptLoaded
DEMO
NET Client
object
model
.Net CLR
Client
OM

           ๏‚ง Provides easy access from remote
             .NET clients to manipulate
             SharePoint data
           ๏‚ง Can be utilized from managed code
             - also from office clients etc.
           ๏‚ง Assemblies
            ๏‚ง Microsoft.SharePoint.Client.dll (281kb)
            ๏‚ง Microsoft.SharePoint.Client.Runtime.dll
              (145kb)
.Net CLR
Client
OM
DEMO
Questions?
Summery




          ๏‚ง Client OM
           ๏‚ง 3 Flavors
           ๏‚ง Batch processing
          ๏‚ง .Net Managed Client
           ๏‚ง Integration with LoB
          ๏‚ง ECMAScript Client OM
           ๏‚ง Simplify UI
           ๏‚ง Basis for client-side programming
          ๏‚ง HTML5 and Mobile
           ๏‚ง Enable HTML5
           ๏‚ง Use JQuery
Thank
You!

More Related Content

What's hot (20)

ASP.NET 4 & Web Dev in Visual Studio 2010 - Alex Mackey, Readify
ASP.NET 4 & Web Dev in Visual Studio 2010 - Alex Mackey, ReadifyASP.NET 4 & Web Dev in Visual Studio 2010 - Alex Mackey, Readify
ASP.NET 4 & Web Dev in Visual Studio 2010 - Alex Mackey, Readify
READIFY
ย 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
ย 
Chapter10 web
Chapter10 webChapter10 web
Chapter10 web
READIFY
ย 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
Surbhi Panhalkar
ย 
WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)
Prashanth Shivakumar
ย 
J query
J queryJ query
J query
Alliza Reyes
ย 
XML Unit 01
XML Unit 01XML Unit 01
XML Unit 01
Prashanth Shivakumar
ย 
ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015
Hossein Zahed
ย 
Oracle JET and WebSocket
Oracle JET and WebSocketOracle JET and WebSocket
Oracle JET and WebSocket
andrejusb
ย 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web application
Rahul Bansal
ย 
Milwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJSMilwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJS
Stan Carrico
ย 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
Bhavin Shah
ย 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
schwebbie
ย 
New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0
Dima Maleev
ย 
Industrial training seminar ppt on asp.net
Industrial training seminar ppt on asp.netIndustrial training seminar ppt on asp.net
Industrial training seminar ppt on asp.net
Pankaj Kushwaha
ย 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
SHADAB ALI
ย 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - Introduction
Sudhakar Sharma
ย 
XPages: The Next Step In Your Life As A Notes Developer
XPages: The Next Step In Your Life As A Notes DeveloperXPages: The Next Step In Your Life As A Notes Developer
XPages: The Next Step In Your Life As A Notes Developer
Peter Presnell
ย 
ASP.NET OVERVIEW
ASP.NET OVERVIEWASP.NET OVERVIEW
ASP.NET OVERVIEW
Rishi Kothari
ย 
Mvc3 crash
Mvc3 crashMvc3 crash
Mvc3 crash
Melick Baranasooriya
ย 
ASP.NET 4 & Web Dev in Visual Studio 2010 - Alex Mackey, Readify
ASP.NET 4 & Web Dev in Visual Studio 2010 - Alex Mackey, ReadifyASP.NET 4 & Web Dev in Visual Studio 2010 - Alex Mackey, Readify
ASP.NET 4 & Web Dev in Visual Studio 2010 - Alex Mackey, Readify
READIFY
ย 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
ย 
Chapter10 web
Chapter10 webChapter10 web
Chapter10 web
READIFY
ย 
WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)
Prashanth Shivakumar
ย 
ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015
Hossein Zahed
ย 
Oracle JET and WebSocket
Oracle JET and WebSocketOracle JET and WebSocket
Oracle JET and WebSocket
andrejusb
ย 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web application
Rahul Bansal
ย 
Milwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJSMilwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJS
Stan Carrico
ย 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
Bhavin Shah
ย 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
schwebbie
ย 
New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0
Dima Maleev
ย 
Industrial training seminar ppt on asp.net
Industrial training seminar ppt on asp.netIndustrial training seminar ppt on asp.net
Industrial training seminar ppt on asp.net
Pankaj Kushwaha
ย 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
SHADAB ALI
ย 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - Introduction
Sudhakar Sharma
ย 
XPages: The Next Step In Your Life As A Notes Developer
XPages: The Next Step In Your Life As A Notes DeveloperXPages: The Next Step In Your Life As A Notes Developer
XPages: The Next Step In Your Life As A Notes Developer
Peter Presnell
ย 
ASP.NET OVERVIEW
ASP.NET OVERVIEWASP.NET OVERVIEW
ASP.NET OVERVIEW
Rishi Kothari
ย 

Similar to Client Object Model - SharePoint Extreme 2012 (20)

Introduction to the Client OM in SharePoint 2010
Introduction to the Client OM in SharePoint 2010Introduction to the Client OM in SharePoint 2010
Introduction to the Client OM in SharePoint 2010
Ben Robb
ย 
Access SharePoint Remotely
Access SharePoint RemotelyAccess SharePoint Remotely
Access SharePoint Remotely
Mohamed Yehia Abdul Kader
ย 
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
Luis Du Solier
ย 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
vipin kumar
ย 
Asp.Net_ Developer Resume Remotely
Asp.Net_ Developer Resume RemotelyAsp.Net_ Developer Resume Remotely
Asp.Net_ Developer Resume Remotely
SumitKumar2504
ย 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
conline training
ย 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008
Caleb Jenkins
ย 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...
Liam Cleary [MVP]
ย 
Asp.net
Asp.netAsp.net
Asp.net
OpenSource Technologies Pvt. Ltd.
ย 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
Sunil Patil
ย 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
Sunil Patil
ย 
Techdays 2011 - Things I will remember
Techdays 2011 - Things I will rememberTechdays 2011 - Things I will remember
Techdays 2011 - Things I will remember
Alexander Vanwynsberghe
ย 
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
Adil Mughal
ย 
My view on XPages
My view on XPagesMy view on XPages
My view on XPages
Per Henrik Lausten
ย 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web Application
Mark Gu
ย 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperActively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net Developer
Karthik Reddy
ย 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperActively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net Developer
Karthik Reddy
ย 
Wei ding(resume)
Wei ding(resume)Wei ding(resume)
Wei ding(resume)
WEI DING
ย 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
Frank La Vigne
ย 
soa1.ppt
soa1.pptsoa1.ppt
soa1.ppt
ShanmugamS34
ย 
Introduction to the Client OM in SharePoint 2010
Introduction to the Client OM in SharePoint 2010Introduction to the Client OM in SharePoint 2010
Introduction to the Client OM in SharePoint 2010
Ben Robb
ย 
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
Luis Du Solier
ย 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
vipin kumar
ย 
Asp.Net_ Developer Resume Remotely
Asp.Net_ Developer Resume RemotelyAsp.Net_ Developer Resume Remotely
Asp.Net_ Developer Resume Remotely
SumitKumar2504
ย 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
conline training
ย 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008
Caleb Jenkins
ย 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...
Liam Cleary [MVP]
ย 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
Sunil Patil
ย 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
Sunil Patil
ย 
Techdays 2011 - Things I will remember
Techdays 2011 - Things I will rememberTechdays 2011 - Things I will remember
Techdays 2011 - Things I will remember
Alexander Vanwynsberghe
ย 
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
Adil Mughal
ย 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web Application
Mark Gu
ย 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperActively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net Developer
Karthik Reddy
ย 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperActively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net Developer
Karthik Reddy
ย 
Wei ding(resume)
Wei ding(resume)Wei ding(resume)
Wei ding(resume)
WEI DING
ย 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
Frank La Vigne
ย 

Recently uploaded (20)

Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
ย 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
ย 
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy ConsumptionDrupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Exove
ย 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
ย 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
ย 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
ย 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
ย 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
ย 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
ย 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
ย 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
ย 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
ย 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
ย 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
ย 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
ย 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
ย 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
ย 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
ย 
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy ConsumptionDrupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Exove
ย 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
ย 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
ย 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
ย 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
ย 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
ย 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
ย 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
ย 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
ย 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
ย 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
ย 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
ย 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
ย 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
ย 

Client Object Model - SharePoint Extreme 2012

  • 1. Using Client Object Model Daniel Plocker CTO, Advantech
  • 2. Agenda โ€ข Client Object Model overview โ€ข ECMA Script Client OM โ€ข Extending SP with HTML 5 โ€ข Going Mobile โ€ข .Net Managed Client
  • 3. Why Client OM? ๏‚งClient side integration between SharePoint and existing Office or LOB apps simplifies day-to-day activities. ๏‚งRicher, smoother and more intuitive user experience. ๏‚งBetter multi-platform support.
  • 4. The Basics ๏‚ง Client-side library for remotely calling SharePoint ๏‚ง Mirrors (a subset) of objects on the server ๏‚ง Usable in JavaScript, .net CLR, Silverlight CLR ๏‚ง Requests are batched for over- the-wire performance ๏‚ง Used by SharePoint UI for operations like batch deletion
  • 6. 3 things to know 1. ClientContext is the central object clientContext = new ClientContext(โ€œhttp://mysiteโ€); 2. Before you read a property, you have to ask for it clientContext.Load(list); 3. All requests must be committed in a batch clientContext.ExecuteQuery();
  • 8. Client Object Model Limitations ๏‚ง Client object model cannot be used on server to talk to same-server ๏‚ง You still need to handle synch/update semantics (change log could help) ๏‚ง No elevation of privilege capabilities ๏‚ง Requests are throttled ๏‚ง .net CLR has sync method; Silverlight CLR and Jscript are async
  • 10. JavaScript Client OM ๏‚ง JavaScript Client OM is easily added to a SharePoint ASPX page - reference: ๏‚ง _layouts/sp.js ๏‚ง Add this using <SharePoint:ScriptLink> ๏‚ง All libraries crunched for performance ๏‚ง Use un-crunched *.debug.js files with debug mode ๏‚ง Method signatures can be different compared to .NET and Silverlight ๏‚ง Different data value types
  • 11. JavaScript Client OM ๏‚ง C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14TEMPLATELAYOUTS ๏‚ง SP.js (SP.debug.js) ๏‚ง 380KB (559KB) ๏‚ง SP.Core.js (SP.Core.debug.js) ๏‚ง 13KB (20KB) ๏‚ง SP.Runtime.js (SP.Runtime.debug.js) ๏‚ง 68KB (108KB)
  • 15. DEMO
  • 16. Items not covered by CSOM ๏‚ง User Profiles ๏‚ง People ๏‚ง Search ๏‚ง Enterprise Metadata ๏‚ง Excel REST web services ๏‚ง Publishing ๏‚ง Administration
  • 17. HTML 5 ๏‚ง <HTML> ๏‚ง <CANVAS> ๏‚ง <VIDEO> ๏‚ง <INPUT> ๏‚ง <AUDIO> ๏‚ง <COMMAND> ๏‚ง <DATALIST> ๏‚ง <TIME>
  • 18. HTML 5 โ€“ Getting it Working ๏‚ง <HTML> tag ๏‚ง Internet Explorer 9 compatibility ๏‚ง <meta http-equiv="X-UA-Compatible" content="IE=9"/> ๏‚ง Potential issues and workarounds
  • 19. DEMO
  • 20. Going Mobile with JQuery ๏‚ง jQuery is a cross-browser JavaScript library designed to simplify the client- side scripting of HTML ๏‚ง $("div.test").add("p.quote").addClass("bl ue").slideDown("slow"); ๏‚ง $.each([1,2,3], function(){ โ€ฆ } ๏‚ง jQuery Mobile is a touch-optimized web framework
  • 21. Going Mobile with SharePoint ๏‚ง Built-in mobile view with &mobile=1 ๏‚ง You can customize the mobile view and master page. ๏‚ง To take advantage of JQuery Mobile: ๏‚ง Create a simple master page, HTML5 valid ๏‚ง Add script links ๏‚ง To use with client OM, donโ€™t forget ExecuteOrDelayUntilScriptLoaded
  • 22. DEMO
  • 24. .Net CLR Client OM ๏‚ง Provides easy access from remote .NET clients to manipulate SharePoint data ๏‚ง Can be utilized from managed code - also from office clients etc. ๏‚ง Assemblies ๏‚ง Microsoft.SharePoint.Client.dll (281kb) ๏‚ง Microsoft.SharePoint.Client.Runtime.dll (145kb)
  • 26. DEMO
  • 28. Summery ๏‚ง Client OM ๏‚ง 3 Flavors ๏‚ง Batch processing ๏‚ง .Net Managed Client ๏‚ง Integration with LoB ๏‚ง ECMAScript Client OM ๏‚ง Simplify UI ๏‚ง Basis for client-side programming ๏‚ง HTML5 and Mobile ๏‚ง Enable HTML5 ๏‚ง Use JQuery

Editor's Notes

  • #9: ืฆืœ ื“ืงื” 15
  • #11: &lt;script type=&quot;text/ecmascript&quot; src=&quot;/_layouts/SP.Core.js&quot; /&gt; &lt;script type=&quot;text/ecmascript&quot; src=&quot;/_layouts/SP.Debug.js&quot; /&gt; &lt;script type=&quot;text/ecmascript&quot; src=&quot;/_layouts/SP.Runtime.Debug.js&quot; /&gt;
  • #13: ScriptLink = master page, every page. Not available in sandboxโ€ฆscript. Src = load every timeDynamic load= ื‘ื•ื“ืง ื”ืื ื”ืกืงืจื™ืคื˜ ื›ื‘ืจ ื˜ืขื•ืŸ, ื˜ื•ื‘ ื‘ื•ื•ื‘-ืคืืจื˜Body.onload?
  • #15: ืฆืœ ื“ืงื” 40
  • #16: ืกื™ื•ื โ€“ ื“ืงื” 30ืคืชื™ื—ืช ื“ืฃ ืงื™ื™ื ืขื dataview, ืฉืžืฆื™ื’ ULื”ื•ืกืคืช ืงื™ืฉื•ืจ ืœืงื•ื‘ืฅ JS ื”ื—ื™ืฆื•ื ื™ื”ื•ืกืคืช AHREF ืขื ืฉื ื”ืคื•ื ืงืฆื™ื” ื•ื”ืคื ื™ื™ื” ืœืœื™ื ืงื”ื•ืกืคืช href&lt;a href=&quot;javascript:add2f(&apos;{@RestaurantName}&apos;, this)&quot; style=&quot;margin-top:10px;&quot;&gt;3. ื”ื•ืกืคืช ื”ืœื™ื ืงื™ื: &lt;script type=&quot;text/javascript&quot; src=&quot;../../SiteAssets/Before/Extreme.js&quot; /&gt; &lt;script type=&quot;text/ecmascript&quot; src=&quot;/_layouts/SP.Core.js&quot; /&gt; &lt;script type=&quot;text/ecmascript&quot; src=&quot;/_layouts/SP.Debug.js&quot; /&gt; &lt;script type=&quot;text/ecmascript&quot; src=&quot;/_layouts/SP.Runtime.Debug.js&quot; /&gt; 4. ืชื•ื›ืŸ/// &lt;reference name=&quot;MicrosoftAjax.js&quot; /&gt;/// &lt;reference path=&quot;C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\SP.debug.js&quot; /&gt;var context = null;varclientContext = null; var web = null; varcurrentUser = null; var Restaurants = null;varoList = null;varrestNameToAdd = &quot;&quot;;varuserName = null;function add2f(restName, sourceName) { // Get the user namerestNameToAdd = restName; // 1. get current user context = SP.ClientContext.get_current(); web = context.get_web();currentUser = web.get_currentUser();currentUser.retrieve(); context.load(web);context.executeQueryAsync(Function.createDelegate(this, this.onSuccessUserMethod),Function.createDelegate(this, this.onFailureUserMethod)); }function onSuccessUserMethod(sender, args) { // get my sitevaruserObject = web.get_currentUser();userName = userObject.get_loginName().toString().replace(&quot;CONTOSO\\\\&quot;, &quot;&quot;);clientContext = new SP.ClientContext(&apos;/my/personal/&apos; + userName);varoWebsite = clientContext.get_web();varcollList = oWebsite.get_lists();this.oList = collList.getByTitle(&apos;Restaurants&apos;);clientContext.load(oList);varlistItemInfo = new SP.ListItemCreationInformation(); // add the item to the listvarlistItem = oList.addItem(listItemInfo); // Assign Values for fieldslistItem.set_item(&apos;Title&apos;, restNameToAdd);listItem.update();clientContext.executeQueryAsync(Function.createDelegate(this, this.onAddSucceeded), Function.createDelegate(this, this.onAddFailed)); /*clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));*/}function onFailureUserMethod(sender, args) { alert(&apos;onFailureUserMethod failed &apos; + args.get_message() + &apos;\\n&apos; + args.get_stackTrace()); }function onAddSucceeded() {var res = SP.UI.Notify.addNotification(&quot;Added resturant &quot; + restNameToAdd + &quot; to your favourites list&quot;, true); }function onAddFailed(sender, args) { alert(&quot;add failed. Message:&quot; + args.get_message());}
  • #18: New elements: article, aside, audio, bdo, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, mark, meter, nav, output, progress, rp, rt, ruby, section, source, summary, time, video, wbr New types of form controls: dates and times, email, url, search, number, range, tel, color[53] New attributes: charset (on meta), async (on script) Global attributes (that can be applied for every element): id, tabindex, hidden, data-* (custom data attributes) Deprecated elements will be dropped altogether: acronym, applet, basefont, big, center, dir, font, frame, frameset, isindex, noframes, strike, tt
  • #19: New elements: article, aside, audio, bdo, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, mark, meter, nav, output, progress, rp, rt, ruby, section, source, summary, time, video, wbr New types of form controls: dates and times, email, url, search, number, range, tel, color[53] New attributes: charset (on meta), async (on script) Global attributes (that can be applied for every element): id, tabindex, hidden, data-* (custom data attributes) Deprecated elements will be dropped altogether: acronym, applet, basefont, big, center, dir, font, frame, frameset, isindex, noframes, strike, tt
  • #20: ืฆ&quot;ืœ ื“ืงื” 55ื™ืฆื™ืจืช masterpage ื—ื“ืฉ ื•ื”ื•ืกืคืช ื”ืชื’ื™ืชื‘ื“ืฃ, ืฉื™ื ื•ื™ ื”- master page:MasterPageFile=&quot;../../_catalogs/masterpage/v4html5.master&quot; 3. ื”ื•ืกืคืช canvas
  • #21: ื”ืชื—ืœื” โ€“ ื“ืงื” 70
  • #22: ื”ืชื—ืœื” โ€“ ื“ืงื” 70
  • #23: ื”ืชื—ืœื”- ื“ืงื” 75ื”ื›ื™ ื—ืฉื•ื‘ ExecuteOrDelayUntilScriptLoaded(loadSharePointPictures, &apos;sp.js&apos;); ื™ืฆื™ืจืช ื“ืฃ ืžืชื•ืš ื”ืžืืกื˜ืจ ืฉืชื•ืžืš ื‘- HTML5.ื”ื•ืกืคืช ืงื™ืฉื•ืจื™ื ืœ- JQM:ืชืžื•ื ื•ืช ื ืžืฆืื•ืช ื‘ืกืคืจื™ื™ืช ื”ืชืžื•ื ื•ืช (images).ืžื‘ื ื” ื”ื“ืฃ: page, list, conte
  • #24: ืคืชื™ื—ืชsolution ืงื™ื™ื ืขื ืืื•ื˜ืœื•ืงื™ืฆื™ืจืช ื”ืฉืœื™ืคื” ืฉืœ ื”ืคืจื™ื˜ื™ื:ื—ื™ื‘ื•ืจื™ืฆื™ืจืช siteืื™ืชื•ืจ ื›ืœ ื”ืจืฉื™ืžื•ืชืฉืœื™ืคืช ื”ืจืฉื™ืžื” ื™ืฆื™ืจืช ืื—ืจื™ ื”ืคื™ืชื•ื— ืฉืœ ื”ืฉืœื™ืคื”, ืœื”ืจื™ืฅ ื•ืœื”ืจืื•ืช ืฉื”ื ืชื•ื ื™ื ื ืฉืœืคื•ื™ืฆื™ืจืช booking โ€“ ืื™ืš ืฉื•ืœืคื™ื ืžืฉืชืžืฉ
  • #25: ื“ืงื” 18
  • #27: ื”ืชื—ืœื”- ื“ืงื” 75ื”ื›ื™ ื—ืฉื•ื‘ ExecuteOrDelayUntilScriptLoaded(loadSharePointPictures, &apos;sp.js&apos;); ื™ืฆื™ืจืช ื“ืฃ ืžืชื•ืš ื”ืžืืกื˜ืจ ืฉืชื•ืžืš ื‘- HTML5.ื”ื•ืกืคืช ืงื™ืฉื•ืจื™ื ืœ- JQM:ืชืžื•ื ื•ืช ื ืžืฆืื•ืช ื‘ืกืคืจื™ื™ืช ื”ืชืžื•ื ื•ืช (images).ืžื‘ื ื” ื”ื“ืฃ: page, list, conte