Introduction To: Client Object Model Development March 20, 2009 SharePoint Saturday Neil Iversen

Slides:



Advertisements
Similar presentations
SharePoint 2010 Overview Presented by: Oscar Garcia
Advertisements

ASP.NET Ajax Supplementary Tutorial. Why Use ASP.NET AJAX? - I ASP.NET AJAX enables you to build rich Web applications that have many advantages over.
Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
SharePoint 2010 Client Side Object Model. Agenda Introduction The Problem Client side vs Server Side Client Side Object Model – How it works – What can.
22 мая 2013, Киев Построение Windows 8 приложений для доступа к SharePoint 2013 Бельский Сергей.
Arthur Brost Portals and Collaboration Practice Manager twentysix New York I BP402.
SharePoint Forms All you ever wanted to know about forms but were afraid to ask.
HOW TO STORE THE DATA YOU NEED IN SHAREPOINT 2010 Mick Badran MVP, V-TSP,XYZ,ABC
Microsoft SharePoint 2010 technology for Developers
Application Generator Merrill Networking Services.
A Blackboard Building Block™ Crash Course for Web Developers
#spsevents #spsphx SPS EVENTS PHX Know REST for the Query AN INTRODUCTION TO REST FOR SHAREPOINT 2013 ERIC J OSZAKIEWSKI, MCTS, MS, MCPS.
Developing HTML5 Application using MVVM pattern Pekka Ylenius.
Microsoft ® Official Course Client-Side SharePoint Development SharePoint Practice Microsoft SharePoint 2013.
Integrating SharePoint with Silverlight Paul Stubbs Technical Evangelist Microsoft.
Getting data into Silverlight on SharePoint Neil Iversen
Minneapolis Office Developer Interest Group (MODIG) December 10, 2009 Client Object Model Development Neil Iversen
St. Louis Day of Dot Net 2011 Jump Start: SharePoint Development Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET, MCTS
SharePoint Saturday Sponsors Gold Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Sitefinity Performance and Architecture
Hennie Laubscher K2 Brian Farnhill Independent Consultant.
Kay Herzam Herzam IT Consulting What‘s new in ASP.NET MS TechTalk.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Pittsburgh Java User Group– Dec Java PureFaces: A JSF Framework Extension.
JavaScript & jQuery the missing manual Chapter 11
Samuvel Johnson nd MCA B. Contents  Introduction to Real-time systems  Two main types of system  Testing real-time software  Difficulties.
Facebook Like Solution in SharePoint Using JavaScript Amie Seisay
Introduction to Silverlight By Alan Cobb 2008-Jan-10 Sacramento, CA
JQuery : Rethink Web Development Van Gaever Tom
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
XP New Perspectives on XML, 2 nd Edition Tutorial 10 1 WORKING WITH THE DOCUMENT OBJECT MODEL TUTORIAL 10.
What’s New? – BCS 2013 Brett Lonsdale.  Co-founder of Lightning Tools  One of the hosts on the SharePoint Pod Show  Co-organizer of SharePoint Saturday.
Spicing Up Web Parts Randy Williams SharePoint Hawaii User Group May 11, 2011.
Ideas to Improve SharePoint Usage 4. What are these 4 Ideas? 1. 7 Steps to check SharePoint Health 2. Avoid common Deployment Mistakes 3. Analyze SharePoint.
Minneapolis Office Developer Interest Group (MODIG) March 25, 2008 Custom Column Development Neil Iversen Inetium
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
Introduction to Entity Framework Part 2 CRUD Scaffolding Tom Perkins NTPCUG.
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
Vision: Modernizing the Office Platform © 2011 AvePoint, Inc. All rights reserved. No part of this may be reproduced, stored in a retrieval system,
10/25/20151 Single Sign-On Web Service Supervisors: Viktor Kulikov Alexander Sherman Liana Lipstov Pavel Bilenko.
Introduction to the SharePoint 2013 REST API. 2 About Me SharePoint Solutions Architect at Sparkhound in Baton Rouge
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
Ready for what’s next. The Evolution of SharePoint Event Receivers SharePoint Saturday DC: Reston December 7 th, 2013 Timothy Ferro.
Facebook Like Solution in SharePoint Using JavaScript Amie Seisay
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
Spaso Lazarević Microsoft MVP Nova banka ad Banja Luka Building business application using Visual Studio 2013 LightSwitch.
Customizing Share Document Previews Will Abson Senior Integrations Engineer and Share Extras Project Lead
Exploring Networked Data and Data Stores Lesson 3.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
Virtual techdays INDIA │ November 2010 SharePoint 2010 – Your one stop shop for all portal requirements Saranya Sriram │ Developer Evangelist, Microsoft.
Technologies For Creating Rich Internet Applications Presenter's name
Progress Apama Fundamentals
St. Louis Day of Dot Net 2011 Jump Start: SharePoint Development
Integrating SharePoint 2010 with Office 2010
Developing GIS WebParts in SharePoint
Effective Client-side Coding against Office 365
Beyond the BDC\BCS Model
Building Dynamic Applications with the SharePoint Client Object Model
An introduction to REST for SharePoint 2013
Accessing and Surfacing LOB Data in SharePoint 2010
SharePoint & jQuery: Better Together
SharePoint data access and LINQ to SharePoint
Customizing the SharePoint Mobile Experience
The SharePoint framework
Mike Ammerlaan Program Manager Microsoft Corporation
Maxim Lukiyanov Program Manager Microsoft Corporation
Visual Studio 2008.
Presentation transcript:

Introduction To: Client Object Model Development March 20, 2009 SharePoint Saturday Neil Iversen

The Plan  Introduction  You are here  SharePoint 2010 Developer Overview

 What is the Client Object Model  Working with the COM .NET  Silverlight  Javascript  Questions

What’s a Client Object Model?  Run code against SharePoint…only remotely  Its like a Web Service call, only prettier  Why use it?  ‘No Code’ solutions  Fancy AJAX  Rich Internet Applications (RIA)  Integrate with WinForm/WPF Apps  (Potentially) Get around Solution Limits

So, how’s it work?  You use its.dll/.js  It bundles your calls  It calls a web service  You get pretty objects back

Client Object Model Runs on Remote Machine  Simple API to Add, Retrieve, Update and Manage Data in SharePoint  Commands batched for Performance.NET CLR Silverlight CLR JavaScriptJavaScript ConsistentEfficient SharePoint Data

What’s the big advantage?  Uses calls similar to the Server Object Model (aka ‘The Object Model’ ClientServer SiteSPSite ListSPList ListItemSPListItem  Compared to the eye-blinding XML for the web services

Getting Started – Where Am I?  ClientContext  Sets up the Environment your calls will be in  The Web you’ll be working with  Web and SilverLight have a Current context .NET Requires you to specify a location  AuthenticationMode  Uses currently logged in User by default  Set to FormsAuth  Example: clientContext = new ClientContext(“  web = clientContext.Web;

Retrieving Items  Item Collections can be retrieved by ‘calling’ them  web.Lists  LINQ is available for some objects  var query = from l in web.Lists where l.Title = “Tasks”  Not everything is Enumerable  There is no list.Items  CAML is preferred for ListItems  CamlQuery object

Nothing Happened!  Everything is async  Nothing happens until you clientContext.ExecuteQuery  But first you need to tell it the objects to Load  clientContext.Load(lists)

Know when to Load them  Two methods for getting data: Load and LoadQuery  Load  Loads an instance of an object  LoadQuery  Returns a collection of objects  Can return multiple levels of objects (parent.child.child)  Can be more memory efficient

Why can’t I see all my fields?  SharePoint is trying to conserve resources  It only brings back what it has to  Use Include to override this behavior  Load(myLists, lists=>lists.Include(list =>list.Title,list=>list.Author)  Or  Load(myLists, “Include(Title,Author)”)

Demo -.NET Client Object Model

Adding a new Item  ListItemCreationInformation  Sets the context for the Add  collection.Add(listItemCreationInformation)  Returns Item  Ex: ListItem item = list.Add(lici)  Then  item.Update()  clientContext.ExecuteQuery()

Updating an Item  Item.Update!  clientContext.ExecuteQuery()

Deleteing an Item  Item.DeleteObject  clientContext.ExecuteQuery()

Demo -.NET CRUD

ECMAScript Object Model  Commonly called ‘javascript’ by humans  Requires:  MSIE 7+  Firefox 3.5+  Safari 4.0+  Needs SP.js to be loaded   Stored in /LAYOUTS  SP.js – SP.debug.js

Async what?  Javascript and SilverLight only have async web calls  This means you’ll get your results…sometime Line 1 WS Call Line 3 Line 1 WS Call Line 3

Demo – Javascript Demo

SilverLight  Probably the funnest of the options  Give you rich visualization options  Has Client Object Model like JS/.NET

Demo – SilverLight Demo

How about something you can use?  Auto Complete a list item  We’ll use jQuery and a plugin conveniently called ‘autocomplete’  3 Components  Get the Context, List and run the ‘All Item’s query  Bind the Autocomplete Data  Bind the Result Action

Demo – Autocomplete Demo

A Note about WP7  Currently the SilverLight Client Object Model doesn’t run against WP7  WP7 currently doesn’t support Active Directory authentication with Web services  Forms Authentication is currently the only way to access SP content from the phone

Questions?

Thanks! Neil Iversen Inetium