Silverlight Client Object Model
-
Thursday, April 15, 2010 7:13 PM
I read about Silverlight Client Object Model but not sure how to implement a solution for my requirement. I am not a Sharepoint developer but Site Collection administrator.
I would like to retrieve list of sub-sites/site pages under a site collection and when each was last updated. I have n number of site collections and would like to implement a centralized solution for all the site collections together. Is Silverlight Client Object Model an option in satisfying this requirement ?
Can anyone outline the steps involved in the development of this solution ? Are Javascript, XML and Sharepoint Designer experience enough to implement this solution ? Any other tools required for development/deployment ? We do not have access to Central administration. Does this involve using Visual Studio, coding in ASP.NET ? I would appreciate any comments/feedback. Thanks.
All Replies
-
Friday, April 16, 2010 3:08 AM
What you use depends on what you are trying to accomplish. If you are looking to find site pages from a pages library from all sub sites within a site collection then this certainly can be accomplished either with the SilverLight or the Managed client object model. The managed client object model will enable you to either use a desktop application or a asp.net application. You can also do it with the silverlight client object model which would require it to run in the browser either as a stand alone application or as a webpart inside of SharePoint. All these would require using Visual Studio and the SharePoint client object model. It could be possible to implement this with SharePoint Designer and the managed client object model. Below is some starter example code using the managed client OM. It is very similar to silverlight except the Silverlight paradigm requires being able to code asynchronously.
public static void GetSitePages(string siteUrl){ ClientContext clientContext = new ClientContext(siteUrl); List list = clientContext.Web.Lists.GetByTitle("Site Pages"); CamlQuery camlQuery = new CamlQuery(); ListItemCollection listItems = list.GetItems(camlQuery); clientContext.Load(listItems, items => items.Include (item => item["Author"], item => item["Editor"], item => item["EncodedAbsUrl"], item => item["Modified"])); clientContext.ExecuteQuery(); DateTime modifiedDate = (DateTime)listItems[0]["Modified"]; }
certdev.com -
Friday, April 16, 2010 2:00 PM
Thanks for the detailed reply. Can you please point to me any resource for working with Managed Client Object Model using Sharepoint Designer.
Also, If I understand correctly, the above requirement cannot be accomplished using Silverlight Client Object Model without using Visual Studio 2010.
-
Friday, April 16, 2010 2:20 PMI am not familiar with SP Designer 2010 and there seems to be no resources at this time about using the client om with SP Designer. Your easiest solution here would be to use VS 2010 and SharePoint
certdev.com -
Friday, April 16, 2010 7:25 PM
Thanks Steve. Regarding the code snippet that you provided above, Do you think similar can be accomplished using ECMAScript ?
I posted another thread regarding this.
I am not sure how to iterate over multiple levels of sub-sites under a Site collection using ECMAScript ? I would appreciate any info regarding. Thanks.

