Ordina SOFTC Presentation - Developing against SharePoint 2010 Lists

857 views
796 views

Published on

Ordina's Stand out from the Crowd event of May 26th - the presentation, see them all on Slideshare Ordina Belgium

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
857
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • When you’re developing applications that running on the server, you can leverage the server-side OM that is exposed using the microsfot.Sharepoint.dll. For example A simple WPF based application.Tooks a number of string inputs from the WPF UI and used the serverside OM. The code leverages the using statements to set the context for the sharepoint site and then sets the Web to allow updates? Creates an SPList object and SPListitem object, and the proceeds to set the specific column fields with the data that was entered . By the users Finally, the update methode is called to add the data tot the list.
  • Client Object Mode (OM)I think Client Object Model is the best choice in most of the cases. If you want to access SharePoint data from SharePoint webpart, then you can use Client OM (EcmaScript) to access data in SharePoint. If you are trying to access SharePoint data from Silverlight then you can use Client OM for Silverlight. And most of all you can use Managed Client OM, in supported .net language to access SharePoint data. So Client OM is surely your first choice. But in many cases you can’t use Client OM, especially in cases where you are trying to access SharePoint data from non-Microsoft platform, like Java. Also if your migrating your application from SharePoint 2003/2007 and you are already using asp.net web service, then you don’t have much choice but to use the legacy web services.
  • How it worksFor both of the previous exercises, You used the client side object model to read data from sharepoint list and write back to the sme list. In many ways, the undelaying calls for sharepoint don’t necessarily change. For example, the client object model leverage the services that are native to sharePoint beneath the covers to make the call into sharepopint . However, this is abstracted away from you.
  • SharePoint WCF Services (REST-based)The new addition of extensibility point in SharePoint 20l10 is WCF services. If you are planning to manipulate SharePoint data from different platforms, like Java, then these WCF services are the excellent option to go with. If you install WCF data service updates, then these WCF services enable REST-based request processing. For more information on REST-based interface of SharePoint WCF services, please follow the MSDN link. You can also use these WCF services from .net applications. You can get the help from MSDN on how to use these WCF services in .net applications. Few new WCF services available in SharePoint 2010, are listed below:/_vti_bin/ListData.svc/_vti_bin/Client.svc
  • How it works.The RESTfull services work in a slightly different way than the other ways you’ve seen in this chapter.Specifically , they leverage the listdata svc service and Data services to treat SharePoint lists as data constructors.The querying against the list works similarly to other ways in which you querying entities. You use linq as the standard way to query and filter the data, and then manipulate the data into your application.
  • Asp.Net Web ServicesSharePoint 2007 comes with built-in web services. These legacy web services are still in SharePoint to support backward-compatibility but whenever you have the option to avoid them, please do so. The only reason I see to use these legacy web services is for applications migrating from pre-SharePoint 2010 to SharePoint 2010. Maybe this is the last version of SharePoint with the support of the legacy web services (at least I hope so). Few legacy asp.net services are listed below:/_vit_bin/Lists.asmx/_vit_bin/Copy.asmxCalls the lists from Various ways of client - applications
  • Custom WCF ServiceIn real world, we rarely happy with out of the box functionalities. We need to customize a lot to happy our clients. Similarly we may need to develop our own WCF services. Writing a custom asp.net web service in SharePoint 2007 was a very difficult task. But in SharePoint 2010, writing a custom WCF service is much easier now. If you install Community Kit for SharePoint (CKS) Visual Studio extension from CodePlex, you can develop a custom SharePoint Service easily. There’s also manual process of developing custom WCF Server in SharePoint described in MSDN: WCF Services in SharePoint and Creating Custom WCF Service. I’ll try to post more details on how to use CKS add-in to develop custom WCF service in another post.
  • Ordina SOFTC Presentation - Developing against SharePoint 2010 Lists

    1. 1. Developing against SharePoint Lists<br />Onne Zuur<br />Onne.Zuur@ordina.be<br />
    2. 2. SharePoint Consultant<br />Competence Center Leader<br />Blog:<br />MySharepointDevelopment.Blogspot.com<br />Email:<br />Onne.Zuur@Ordina.be<br />
    3. 3. Agenda<br />Introduction<br />SharePoint List APIs/Services<br />When to use?<br />Demo’s<br />Summary<br />3<br />
    4. 4. Introduction<br />More / additional information of interacting lists<br />Reading and writing items<br />Explanation of the different API’s<br />Ways to develop against list<br />4<br />
    5. 5. SharePoint List APIs/Services<br />Server-side object model<br />Client object model<br />WCF Data Services<br />List Web Services<br />Custom WCF Service / ASP.NET service<br />
    6. 6. Server-Side Object Model<br />Easy to use<br />Using Microsoft.SharePoint.dll<br />Core SharePoint DLL<br />Application deployed to or reside on the server<br />6<br />
    7. 7. Demo Server-Side Object model<br />DEMO<br />7<br />
    8. 8. Client Object Model<br />Client-based DLL<br />Access to SharePoint content from key client technologies<br />.Net, Silverlight, Javascript,<br />Not able to use from non Microsoft platform<br />Similar to the server-side object model<br />Easy to move from client-side to server-side development<br />Combining with sandboxed solutions<br />SharePoint Online Development<br />8<br />
    9. 9. Demo Client Object Model<br />DEMO<br />9<br />
    10. 10. WCF Data Services<br />REST (Representational State Transfer)-based service<br />Lightweight get and post functionality<br />Interacting with Excel spreadsheets<br />Manipulate SharePoint data from different platforms<br />10<br />
    11. 11. Demo WCF Data Services<br />DEMO<br />11<br />
    12. 12. List Web Services<br />ASP.NET Web Service<br />For rapid development and deployment<br />Service based application<br />For backward compatibility <br />When possible, avoid this service<br />Migrating from pre-SharePoint 2010 to SharePoint 2010<br />Ex. /vtI_bin/Lists.asmx /vti_bin/Copy.asmx<br />12<br />
    13. 13. Demo List Web Services<br />DEMO<br />13<br />
    14. 14. Custom WCF service / ASP.NET Service<br />Custom requirements<br />Easy to realise instead of 2007<br />14<br />
    15. 15. Summary<br />Best practices<br />Avoid use of list web services<br />Migration<br />Client Object Model is the best choice in most of the cases<br />SharePoint Online Development<br />Easy to implement Custom WCF Services in SharePoint 2010<br />15<br />
    16. 16. Follow Ordina….<br />16<br />Share your thoughts via #SOFTC <br />Follow us on twitter: @OrdinaBE<br />Find the presentationsonwww.slideshare.net/ordinaBe<br />Be informed atwww.linkedin.com/company/ordina-belgium<br />

    ×