ECO Developers - São Carlos - SharePoint 2010: Colaborando com o Planeta
Criando apps Silverlight para SharePoint 2010
1. Community Webcast:Criando Aplicativos Ricos para o SharePoint 2010 com Silverlight Fabian André Gehrke MCPD, MCITP e MCT SharePoint 2010 Coordenador de Projetos- KeepIT http://fabiangehrke.com.br http://www.twitter.com/fgehrke http://sharepointersbr.wordpress.com
2. Agenda Visão geral do SharePoint 2010 SharePoint ClientObject Model (SharePoint + Silverlight
3. Microsoft SharePoint 2010A Plataforma de ColaboraçãoparaCorporações e para a Web Sites Conectar e capacitarpessoas Comunidades Composições Reduzircustos com umainfraestruturaunificada Responder rapidamente a necessidadesde negócio Conteúdo Inovação Search
8. Porque um Client Object Model? A criação de mais web services era cadavezmaisfrequente Client Object Model provêuma API completaaoinvés de váriosserviços Disponibilizaumacamada de abstraçãopararetornarobjetos SharePoint conhecidoscomoresultados Experiência de desenvolvimentoconsistente entre plataformas
9. As APIs de Client Object Model ECMAScript .NET Silverlight Outros mecanismos
10. ObjetosSuportados Coleções de Sites e Sites Listas, Itens, Visões, Estruturas de listas Arquivos e Pastas Web, Listas, e “List Item Property Bags” Web Parts Segurança Tipos de conteúdo Templates de sites, coleções de sites e operações de coleções de sites
11. Equivalência de Objetos Os objetospossuemnomesmuitoparecidosnosmodelos de servidor e cliente(ex.: SPWeb.QuickLaunchEnabled = Web.QuickLaunchEnabled)
12. Funcionamento do Client Object Model ECMAScriptControlsand Logic Navegador Client.svc Server OM JSON Response ECMAScript OM XML Request Proxy XML Request Contentdatabase Proxy JSON Response Managed OM Client OM Managed Controls and Logic Servidor SharePoint
13. Visão Geral das Tecnologias de Dados REST APIs Silverlight Listasfortementetipadas ClientOM Listasfracamentetipadas Ladocliente Data Platform Farm Site List Data External Lists ServerOM Ladoservidor Listasfracamentetipadas LINQ Listasfortementetipadas Novo no 2010 Melhorados
15. Silverlight Client OM Possibilita o desenvolvimento com Silverlight O Silverlight poder ser utilizadoempáginas ASPX ou Web parts O Client OM poder ser utilizado no Silverlight paracriaraplicativospara o SharePoint
16. Criando Silverlight Web Parts Uma Web Part poder ser um host para o Silverlight SharePoint possuiuma web part de Silverlight A web part podeconterpropriedadescustomizadasparaseremenviadasao Silverlight via propriedadeInitParameters O arquivo XAP poder ser instalado no dirétório LAYOUTS e carregadoem tempo de execuçãooupublicadocomo um arquivoemumabiblioteca A aplicação Silverlight podeutilizar o Client OM
20. Referências SharePoint 2010 Devoloper Training Kit http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=6184 Silverlight 3 Toolkit Nov 2009 http://silverlight.codeplex.com/releases/view/36060 Exemplo utilizado no webcast http://blogs.msdn.com/b/pandrew/archive/2009/10/16/gettingstarted2010snippets8.aspx
21. Community Webcast:Criando Aplicativos Ricos para o SharePoint 2010 com Silverlight Fabian André Gehrke MCPD, MCITP e MCT SharePoint 2010 Coordenador de Projetos - KeepIT http://fabiangehrke.com.br http://www.twitter.com/fgehrke http://sharepointersbr.wordpress.com
Notes de l'éditeur
Connect and Empower PeopleMaking people more productive is a direct result of enabling them to access resources and knowledge regardless of where they are and what device they use, through a user experience optimized for usability and adoption. Learn moreCut costs with a Unified InfrastructureDriving cost efficiencies and accomplishing more with the same resources is possible through the consolidation of all the key business collaboration solutions into SharePoint 2010 and using this common platform to deploy solutions for your intranet, extranet, or for your Internet web presence. Learn moreRapidly Respond to Business NeedsWhen time-to-market is key, SharePoint 2010 enables people to customize the out-of-box platform and deploy solutions that enable them to address specific business requirements quickly and in a secure manner. Learn more Sites: Share information seamlessly and securely with employees, partners and customersComunidades: Empower people to work together in new waysConteúdo: Manage content lifecycle from creation to dispositionBusca: Find people and information anywhereInsights: Make informed business decisionsComposites: Rapidly create dynamic business solutions
Here we explain the basics of creating a Silverlight web part and how to create a feature that deploys the XAP file and web part. We also explain how the XAP file is loaded at run time and how web part properties may be passed to the Silverlight application.For Silverlight client installations, Microsoft SharePoint Foundation deploys Microsoft.SharePoint.Client.Silverlight.dll and Microsoft.SharePoint.Client.Silverlight.Runtime.dll into a special "Scripts only" folder of the /_layouts virtual directory named clientbin. This folder is designed to be a standard place for hosting assemblies that are used in Silverlight.
A cada release do SharePoint a Microsofotrecebiamais e maisrequisiçõespornovos web servicesAoinvés de criarnovos web services (e substituirosserviços ASMX porserviços WCF), foicriada um modelo de objetos de clienteO modelo de objetos de clienteprovê um nível de abstraçãoparaqueprocessosfora do servidor de SharePoint possaminteragir com o SharePoint utilizandouma API consistentemuitoparecida com a API de servidor
The Client Object Model contains a lot of overlap coverage with the full SharePoint API
The Client Object Model contains a lot of overlap coverage with the full SharePoint API
Similar to programming against server objects in the server context, the new client-side object models use a ClientContext object as the "center of gravity" for all operations. The process of obtaining and working with sites and data begins by retrieving a context object.Show the various resources and their locationsServer – Microsoft.SharePoint – [..]\\14\\ISAPI .NET – Microsoft.SharePoint.Client – [..]\\14\\ISAPISilverlight – Microsoft.SharePoint.Client.Silverlight – [..]\\14\\LAYOUTS\\ClientBinECMAScript– SP.js - [..]\\LAYOUTS
Este diagramamostracomo o mecanismo de transportefuncionaManage client OM = .NET / SilverlightTodas ascomunicaçõessãofeitasatravés do serviço WCF client.svcMicrosoft implemented the client OM by decorating the core SharePoint OM with attributes if it was “client aware”[ClientCallableType(Name=“Web”,[…]),[…]]public class SPWeb {}Then a code gen tool generates the client OM assemblies and JavaScriptThis ensures that there’s fidelity between all the client OM’s and the server equiv
By default, the managed client object models authenticate users by using their Windows credentials (DefaultCredentials). Optionally, you can change the authentication mode on the ClientContext object and specify using Forms authentication instead. A user must then supply a user name and password through properties on ClientContext. Behind the scenes, Windows SharePoint Services “14” calls the Authentication Web service, obtains the correct cookie, and then makes the necessary object model calls. To run managed client code against a Forms authentication server, you must change to Forms authentication. This requirement does not apply to the JavaScript object model.The managed client object models provide a ClientAuthenticationMode enumeration whose values are Anonymous, Default, andFormsAuthentication. To specify Forms authentication, use code similar to the following:clientContext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;In addition to setting the authentication mode, you must specify the user name and password information, such as follows:FormsAuthenticationLoginInfoformsAuthInfo = new FormsAuthenticationLoginInfo("MyUser", "MyPassword");clientContext.FormsAuthenticationLoginInfo = formsAuthInfo; Note: Currently, the account name and password in formsAuthInfo are sent in clear text, so you must use HTTPS protocol instead of HTTP.
Here we explain the basics of creating a Silverlight web part and how to create a feature that deploys the XAP file and web part. We also explain how the XAP file is loaded at run time and how web part properties may be passed to the Silverlight application.For Silverlight client installations, Microsoft SharePoint Foundation deploys Microsoft.SharePoint.Client.Silverlight.dll and Microsoft.SharePoint.Client.Silverlight.Runtime.dll into a special "Scripts only" folder of the /_layouts virtual directory named clientbin. This folder is designed to be a standard place for hosting assemblies that are used in Silverlight.
Here we explain the basics of creating a Silverlight web part and how to create a feature that deploys the XAP file and web part. We also explain how the XAP file is loaded at run time and how web part properties may be passed to the Silverlight application.For Silverlight client installations, Microsoft SharePoint Foundation deploys Microsoft.SharePoint.Client.Silverlight.dll and Microsoft.SharePoint.Client.Silverlight.Runtime.dll into a special "Scripts only" folder of the /_layouts virtual directory named clientbin. This folder is designed to be a standard place for hosting assemblies that are used in Silverlight.
By default, the managed client object models authenticate users by using their Windows credentials (DefaultCredentials). Optionally, you can change the authentication mode on the ClientContext object and specify using Forms authentication instead. A user must then supply a user name and password through properties on ClientContext. Behind the scenes, Windows SharePoint Services “14” calls the Authentication Web service, obtains the correct cookie, and then makes the necessary object model calls. To run managed client code against a Forms authentication server, you must change to Forms authentication. This requirement does not apply to the JavaScript object model.The managed client object models provide a ClientAuthenticationMode enumeration whose values are Anonymous, Default, andFormsAuthentication. To specify Forms authentication, use code similar to the following:clientContext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;In addition to setting the authentication mode, you must specify the user name and password information, such as follows:FormsAuthenticationLoginInfoformsAuthInfo = new FormsAuthenticationLoginInfo("MyUser", "MyPassword");clientContext.FormsAuthenticationLoginInfo = formsAuthInfo; Note: Currently, the account name and password in formsAuthInfo are sent in clear text, so you must use HTTPS protocol instead of HTTP.