420 likes | 546 Views
SharePoint 2010 desde cliente. no tengas miedo!. Alberto Diaz Martin adiazcan@hotmail.com http://geeks.ms/blogs/adiazmartin Twitter://@ adiazcan. Agenda. …casi todo lo nuevo. Visual Studio Tools for SharePoint. Modelo de objetos en cliente. Developer Dashboard. Silverlight WebPart.
E N D
SharePoint 2010 desdecliente no tengas miedo! Alberto Diaz Martin adiazcan@hotmail.com http://geeks.ms/blogs/adiazmartin Twitter://@adiazcan
…casi todo lo nuevo Visual Studio Tools for SharePoint Modelo de objetos en cliente Developer Dashboard Silverlight WebPart Mejorintegración con TFS SharePoint Designer 2010 Chart Web Part Sandbox Solutions • ListLookups and Relationships Depuración con F5 LINQ To SharePoint BCS Modelo de Eventos API REST Upgrading Solutions WSP paralasmasas Solutions Gallery Desarrollo con W7 / Vista
Accediento en SharePoint 2007 SharePoint Data Server Application SharePoint API Web Service Client Application
Accediento en SharePoint 2007 WebServices
Accediento en SharePoint 2007 WebServices Existe un Camino mejor
Accediento en SharePoint 2010 Client Object Model
Accediento en SharePoint 2010 Client Object Model
ClientObjectModel • API paraInsertar, Obtener, Actualizar y Gestionar los datos en SharePoint SharePoint Data • Consistente • Eficiente • ClientApplication .Net CLR Silverlight JavaScript
QuerySyntax var query = from list in clientContext.Web.Lists where list.Title != null select list; varresult = clientContext.LoadQuery(query); clientContext.ExecuteQuery();
MethodSyntax clientContext.Load(oList, list => list.Fields.Where( field => field.Hidden == false && field.Filterable == true)); clientContext.ExecuteQuery();
Accediendo en SharePoint 2010 SharePoint Data Server Application SharePoint API Web Service Client.svc JSON XML Client Application Client OM WPF/WinForm/Office Silverlight JavaScript Client Application
Usando el ClientObjectModel ECMAScriptControlsand Logic Browser Client.svc Server OM JSON Response ECMAScript OM XML Request Proxy XML Request Proxy Contentdatabase JSON Response Managed OM Managed Client Managed Controls and Logic SharePoint Server
.NetClient OM C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI • Microsoft.SharePoint.Client • 281kb • Microsoft.SharePoint.Client.Runtime • 145kb To Compare: • Microsoft.SharePoint.dll – 15.3MB
Javascript Client OM C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS • 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)
Silverlight Web Part demo
Silverlight Client OM C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions \14\TEMPLATE\LAYOUTS\ClientBin • Microsoft.SharePoint.Client.Silverlight • 262KB • Microsoft.SharePoint.Client.Silverlight.Runtime • 138KB
Data Services • //Listado de los elementos de una Lista de Anuncios • IntranetDataContextctx = • new IntranetDataContext( • new Uri( • "http://win-ij3avreuif5/_vti_bin/ListData.svc", • UriKind.Absolute)); • ctx.Credentials = • CredentialCache.DefaultCredentials; • grdDatos.DataSource = ctx.Anuncios.ToList();
Data Services • //Creación de un nuevo anuncio • IntranetDataContextctx = • new IntranetDataContext( • new Uri( • "http://win-ij3avreuif5/_vti_bin/ListData.svc", • UriKind.Absolute)); • ctx.Credentials = • CredentialCache.DefaultCredentials; • AnunciosItemanItem = • new AnunciosItem(); • anItem.Título=txtTitulo.Text; • anItem.Cuerpo=txtTitulo.Text; • ctx.AddToAnuncios(anItem); • ctx.SaveChanges();
SharePoint 2010 desdecliente Muchas gracias! Alberto Diaz Martin adiazcan@hotmail.com http://geeks.ms/blogs/adiazmartin Twitter://@adiazcan