SlideShare une entreprise Scribd logo
1  sur  29
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!

Contenu connexe

Tendances

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, ReadifyREADIFY
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCAnton Krasnoshchok
 
Chapter10 web
Chapter10 webChapter10 web
Chapter10 webREADIFY
 
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 - VS2015Hossein Zahed
 
Oracle JET and WebSocket
Oracle JET and WebSocketOracle JET and WebSocket
Oracle JET and WebSocketandrejusb
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web applicationRahul Bansal
 
Milwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJSMilwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJSStan Carrico
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentationBhavin Shah
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniterschwebbie
 
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 0Dima 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.netPankaj Kushwaha
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.netSHADAB ALI
 
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 DeveloperPeter Presnell
 

Tendances (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
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
Chapter10 web
Chapter10 webChapter10 web
Chapter10 web
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)
 
J query
J queryJ query
J query
 
XML Unit 01
XML Unit 01XML Unit 01
XML Unit 01
 
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
 
Oracle JET and WebSocket
Oracle JET and WebSocketOracle JET and WebSocket
Oracle JET and WebSocket
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web application
 
Milwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJSMilwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJS
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
 
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
 
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
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - Introduction
 
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
 
ASP.NET OVERVIEW
ASP.NET OVERVIEWASP.NET OVERVIEW
ASP.NET OVERVIEW
 
Mvc3 crash
Mvc3 crashMvc3 crash
Mvc3 crash
 

Similaire à Client Object Model - SharePoint Extreme 2012

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 2010Ben 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 AnguloLuis 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 RemotelySumitKumar2504
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netconline 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 2008Caleb 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 FrameworksSunil 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 frameworksSunil Patil
 
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
 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationMark 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 DeveloperKarthik 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 DeveloperKarthik 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 DevelopersFrank La Vigne
 

Similaire à 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
 
Access SharePoint Remotely
Access SharePoint RemotelyAccess SharePoint Remotely
Access SharePoint Remotely
 
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
 
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
 
Asp.Net_ Developer Resume Remotely
Asp.Net_ Developer Resume RemotelyAsp.Net_ Developer Resume Remotely
Asp.Net_ Developer Resume Remotely
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
 
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
 
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...
 
Asp.net
Asp.netAsp.net
Asp.net
 
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
 
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
 
Techdays 2011 - Things I will remember
Techdays 2011 - Things I will rememberTechdays 2011 - Things I will remember
Techdays 2011 - Things I will remember
 
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
 
My view on XPages
My view on XPagesMy view on XPages
My view on XPages
 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web Application
 
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
 
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
 
Wei ding(resume)
Wei ding(resume)Wei ding(resume)
Wei ding(resume)
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
soa1.ppt
soa1.pptsoa1.ppt
soa1.ppt
 

Dernier

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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
[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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
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
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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
 
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
 
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
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
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
 

Dernier (20)

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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
[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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
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...
 
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?
 
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...
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 

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

Notes de l'éditeur

  1. צל דקה 15
  2. &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;
  3. ScriptLink = master page, every page. Not available in sandbox…script. Src = load every timeDynamic load= בודק האם הסקריפט כבר טעון, טוב בווב-פארטBody.onload?
  4. צל דקה 40
  5. סיום – דקה 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());}
  6. 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
  7. 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
  8. צ&quot;ל דקה 55יצירת masterpage חדש והוספת התגיתבדף, שינוי ה- master page:MasterPageFile=&quot;../../_catalogs/masterpage/v4html5.master&quot; 3. הוספת canvas
  9. התחלה – דקה 70
  10. התחלה – דקה 70
  11. התחלה- דקה 75הכי חשוב ExecuteOrDelayUntilScriptLoaded(loadSharePointPictures, &apos;sp.js&apos;); יצירת דף מתוך המאסטר שתומך ב- HTML5.הוספת קישורים ל- JQM:תמונות נמצאות בספריית התמונות (images).מבנה הדף: page, list, conte
  12. פתיחתsolution קיים עם אאוטלוקיצירת השליפה של הפריטים:חיבוריצירת siteאיתור כל הרשימותשליפת הרשימה יצירת אחרי הפיתוח של השליפה, להריץ ולהראות שהנתונים נשלפויצירת booking – איך שולפים משתמש
  13. דקה 18
  14. התחלה- דקה 75הכי חשוב ExecuteOrDelayUntilScriptLoaded(loadSharePointPictures, &apos;sp.js&apos;); יצירת דף מתוך המאסטר שתומך ב- HTML5.הוספת קישורים ל- JQM:תמונות נמצאות בספריית התמונות (images).מבנה הדף: page, list, conte