La descarga está en progreso. Por favor, espere

La descarga está en progreso. Por favor, espere

Desarrollo .NET sobre SharePoint 2003 (WSS y SPS)

Presentaciones similares


Presentación del tema: "Desarrollo .NET sobre SharePoint 2003 (WSS y SPS)"— Transcripción de la presentación:

1 Desarrollo .NET sobre SharePoint 2003 (WSS y SPS)
Renacimiento – Talleres MSDN 2004 Desarrollo .NET sobre SharePoint 2003 (WSS y SPS) César de la Torre Software Architect Renacimiento © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

2 Agenda Introducción de la Arquitectura de Microsoft SharePoint Portal Server 2003 Oportunidades de Desarrollo Desarrollo de Web Parts Sharepoint 2003 Desarrollo de gestión de eventos de las Bibliotecas de Documentos El Modelo de Objetos de SharePoint 2003 Los Web Services de SharePoint 2003 FUTURO: Web Parts en Whidbey.NET ¿Que? ¿Cómo? ¿Por qué?

3 ¿Por qué SharePoint 2003? Distribución y compartición de información
Colaboración Espacios de trabajo de Documentos y reuniones Gestión Documental Bibliotecas de Documentos (meta-data, versionado, aprobación de documentos, check-in/check-out) Personalización y Notificación Encontrar información

4 ¿Windows Sharepoint Services 2003 vs. SharePoint Portal Server 2003?
Microsoft SharePoint Portal Server (v2) SharePoint Portal Server Office 2003 System Soluciones Custom Windows SharePoint Services .NET Framework 1.1 SQL Server 2000 (SP3) Windows Server 2003

5 Arquitectura Lógica de SharePoint Portal Server 2003
vServer App Web IIS 6.0 vServer Colección de Sites SharePoint Sub-Portal 1 Portal Principal Sub-Portal 2

6 Oportunidad desarrollo 1: Web Parts
Puntos a ver: ¿Qué son los Web Parts? Pasos Básicos Cache La Técnica de los ‘User Controls’

7 ¿Qué son los Web Parts? (SPS2003)
Perspectiva de Usuario Un Web Parts es un bloque de construcción (caja) en una página de un Portal de SharePoint Perspectiva de Gestores de Contenido Web Parts son contenedores de información que se pueden añadir a las páginas al igual que las Bibliotecas de Documentos y las Listas Perspectiva de Desarrollo Los Web Parts son Web-Controls extendidos basados en ASP.NET que implementan interfaces estandard de SharePoint 2003. Interesantes SOLAMENTE si vamos a ‘reutilizarlo’

8 Trabajando con Web Parts
Galerías de Web Part Web Part Page Gallery Virtual Server Gallery Online Gallery Se ‘sueltan’ en páginas En Páginas ASP.NET divididas en zonas Personalización Propiedades Comunes ToolPart Conexión entre Web Parts Importación y Exportación de Web Parts

9 Renacimiento – Talleres MSDN 2004
Uso de Web-Parts (1) Web Parts ejemplo: Biblioteca de Documentos Enlaces Foros de Discusión etc. © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

10 Desarrollo de Web Parts
Plantillas de proyecto WebPart con VS.NET (MSDN Downloads) Derivar de clase base de SharePoint Implementar uno o mas interfaces de SharePoint System.Web.dll System.Web.UI.Control Microsoft.SharePoint.dll Microsoft.SharePoint.WebPartPages.WebPart Tu assembly Renacimiento.WebParts.MiWebPart

11 Los ficheros de un Web Part
Tu Web-Part Assembly .NET encapsulando el código servidor y renderización del HTML Un fichero DWP (basado en XML) que guarda algunas Propiedades y valores que se necesitan para cargar el assembly .NET Un fichero ‘manifest’ (basado en XML) que guarda datos a fusionar con el web.config Fichero CAB STSADM.EXE Utilidad de instalación

12 Desarrollo Básico - Simple
Renacimiento – Talleres MSDN 2004 Desarrollo Básico - Simple Definir Propiedades ‘custom‘ del WebPart Generar un ‘montón’ de HTML en el método RenderWebPart © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

13 Renacimiento – Talleres MSDN 2004
Desarrollo de Web-Part ‘Hola Mundo’ (2) - Creación de Web Part - Métodos Base de un Web Part - HTML renderizado manualmente © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

14 Desarrollo Básico – Realista (Uso de WebControls internos)
Renacimiento – Talleres MSDN 2004 Desarrollo Básico – Realista (Uso de WebControls internos) Definir Propiedades ‘custom‘ del WebPart Sobreescribir CreateChildControls Instanciar web-controls y añadirlos a la colección de controles Implementar el gestionador(es) del evento OnLoad © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

15 Persistencia de Propiedades
Renacimiento – Talleres MSDN 2004 Persistencia de Propiedades Atributo WebPartStorage por propiedad Storage.Shared Storage.Personal Storage.None Los ficheros .DWP persisten valores de propiedades para realizar importaciones/exportaciones © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

16 Renacimiento – Talleres MSDN 2004
Web-Part ejemplo ‘Visor’ de Noticias RSS (3.1) Utilización de Web-Controls dentro de WebPart Propiedades persistentes de WebParts - Debugging de WebParts © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

17 Renacimiento – Talleres MSDN 2004
Cache de Web Parts (1) Tenemos dos opciones tecnológicas para el CACHE: Cache estandard de páginas ASP.NET Cache de Web-Parts (soporta cache por usuario) © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

18 Renacimiento – Talleres MSDN 2004
Cache de Web Parts (2) Los Administradores – no los desarrolladores – establecen el tipo de cache en el web.config <SharePoint> <WebPartCache Storage=“CacheObject"/> </SharePoint> Tenemos 2 tipos de cache CacheObject (Cualquier objeto .NET) Database (El objecto tiene que ser serializable) © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

19 Renacimiento – Talleres MSDN 2004
Cache de Web Parts (3) Los valores de Cache se pueden guardar como: Shared Personal Métodos de la clase base WebPart PartCacheRead() PartCacheWrite() PartCacheInvalidate() © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

20 Renacimiento – Talleres MSDN 2004
Web-Part ‘Visor de Noticias RSS’ (3.2) - CACHE de WebParts © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

21 Trabajo con ‘User Controls’
No hay un diseñador para las clases Web Part ‘Truco’: Podemos utilizar User-Controls de ASP.NET Situar .ascx en Directorio de Aplicación Web Definir el ‘Managed Path’ Dentro del Web Part, utilizar this.Page.LoadControl(“/tu path”) Instala el Assembly del Web User Control en el GAC Añade la referencia del assembly en el web.config

22 Renacimiento – Talleres MSDN 2004
Web Part con User Controls (web) (4) Ejemplo de WebPart utilizando un User-Control de formulario complejo © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

23 Conexión de Web Parts Los Web Parts se pueden conectar si implementan los interfaces para conexiones (estandard SharePoint)

24 Interfaces Soportados
ICellProvider, ICellConsumer IRowProvider, IRowConsumer IListProvider, IListConsumer IFilterProvider, IFilterConsumer IParametersOutProvider, IParametersOutConsumer IParametersInProvider, IParametersInConsumer

25 Seguridad en páginas de Web Parts
Renacimiento – Talleres MSDN 2004 Seguridad en páginas de Web Parts Se permite a los usuarios modificar páginas directamente No se permite ejecutar cualquier código: No se permite ‘inline script’ ‘Code behind’ si se permite No se permite usar cualquier control de servidor Lista de SafeControls en Web.Config Dá a los administradores control sobre qué clases pueden utilizarse Code behind Controles de Servidor Web Parts © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

26 Seguridad en páginas de Web Parts (cont.)
Renacimiento – Talleres MSDN 2004 Seguridad en páginas de Web Parts (cont.) Gestión de ‘Identidad’ para acceder a datos externos Impersonation = true Delegation Kerberos si configurado por admin SSO en SharePoint Portal Server © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

27 Deployment (Inst. En Producción)
Renacimiento – Talleres MSDN 2004 Deployment (Inst. En Producción) Assemblies, Recursos y su localización Los Assemblies pueden instalarse en el GAC o en el directorio ‘bin’ del WebSite Los Recursos se instalan en /_wpresources o /wpresources respectivamente DWPs se instalan en el directorio /wpcatalog © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

28 Renacimiento – Talleres MSDN 2004
Deployment (cont.) GAC Por defecto ‘Fully trusted’ Los Assemblies necesitan estar firmados con un strongname. Disponible para todos los servidores virtuales de la máquina Bin Por defecto ‘Partial trust’ Disponible solo para un WebSite específico © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

29 Renacimiento – Talleres MSDN 2004
Deployment (cont.) WPPacks son ficheros ‘cab’ que contienen; Manifest Assemblies Recursos DWPs La creación de .cabs permite a los administradores usar la utilidad ‘stsadm.exe’ para el deployment © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

30 Renacimiento – Talleres MSDN 2004
Deployment (cont.) Mas allá, crear un .msi Contiene el .cab Usar el objeto SPGlobalAdmin del namespace Microsoft.SharePoint.Administration AddWPPack RemoveWPPack EnumWPPacks Deployment de politicas CAS usando el .msi © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

31 Renacimiento – Talleres MSDN 2004
Deployment de Web Parts (5) Ejemplo de uso de stsadm.exe © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

32 Oportunidad desarrollo 2: Gestión de Eventos de Bibliotecas de Documentos
Librerías de clases .NET Utilizando el Modelo de Objetos de SharePoint se puede manipular programáticamente contenido de Bibliotecas y Listas

33 Pasos de Desarrollo Crear una Librería de clases .NET
Añadir referencia a Microsoft.SharePoint.dll Implementar el interfaz IListEventSink Añadir tu código en el método ‘OnEvent()’ Se llama a este método cuando ocurre algo en la Biblioteca de Documentos Firma tu Assembly Registralo en el GAC Habilita el soporte para ‘Doc Lib Event Handlers’ en tu servidor virtual Especifica el ‘Doc Lib Event Handler’ a la Biblioteca de documentos o Formularios

34 Renacimiento – Talleres MSDN 2004
Libreria .NET de gestión de Eventos de Librería SharePoint (6) © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

35 Oportunidad desarrollo 3: Acceso a SharePoint desde aplicaciones .NET
Dos opciones: Modelo de objetos (assemblies) de SharePoint (p.e. acceder a SharePoint desde mi app. ASP.NET) XML Web Services de SharePoint (p.e. acceder a SharePoint desde mi app. WinForms)

36 Oportunidad desarrollo 3:
- Acceso a SharePoint desde aplicaciones .NET - Assemblies vs. Web Services

37 Modelo de Objetos .NET de SharePoint
Modelo de Objetos de ‘codigo gestionado’ en el servidor Accessible desde ASP.NET o cualquier otro proceso en el servidor Implementado en C# Expone practicamente todos los datos guardados en Windows SharePoint Services

38 ¿Que se puede hacer con este Modelo de Objetos?
Ejemplos: Añadir, editar, borrar, y devolver datos de las Listas de SharePoint Crear nuevas listas y establecer metadatos de listas (e.j. los campos en una lista) Establecer propiedades de web Trabajar con documentos en una Biblioteca de documentos. Realizar tareas administrativas como crear webs, añadir usuarios, crear roles, etc.

39 SPGlobalConfig SPWebServer SPVirtualServer SPSite SPWeb SPList SPListItem

40 Renacimiento – Talleres MSDN 2004
Web-Part ‘Acceso a Profiles de usuarios de SharePoint’ (7) - Modelo de Objetos de SharePoint 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

41 Resumen OM El modelo de objetos tiene tres objetos principales de alto nivel: SPWeb (representa un site individual) SPSite (representa una colección de sites, que es un conjunto de web sites) SPGlobalAdmin (utilizado para administración de configuración global) Para poder realizar acciones en los datos de un web, primero hay que obtener siempre un objeto SPWeb.

42 Web Services de WSS (Windows SharePoint Services)
La capa de web services ‘publica’ la capa de OM. Permite manipulación de Lists, Webs, Vistas, etc. La Funcionalidad es similar al OM, pero algunos interfaces están optimizados para minimizar las transacciones. Office 2003 (e.j. Excel, DataSheet, Work, Outlook, FrontPage, etc) utilizan dichos web services para acceder a los datos de WSS.

43 Ejemplos GetListCollection GetListItems GetWebCollection UpdateList
UpdateListItems GetWebInfo GetWebPart GetSmartPageDocument Otros…

44 Renacimiento – Talleres MSDN 2004
Uso de XML Web Services ‘Acceso a Profiles de usuarios de SharePoint’ (8) - XML Web Services de SharePoint 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

45 Renacimiento – Talleres MSDN 2004
Ver contenido de SharePoint en un Pocket PC © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

46 Renacimiento – Talleres MSDN 2004
Single Sign-On Servicio de valor añadido en SharePoint 2003 Proporciona una única autenticación para todas las aplicaciones ‘custom’ en un entorno Intranet. B.D. SQL de Single Sing On (Es un Cache de Credenciales) Obtención credenciales Cacheadas Entramos en la Intranet App. Custom 1 IE Login Automático Challege-Response 1. Login programat. App. 1 2. Cacheamos las credenciales b. Login visual para App 1 a. App. Custom n © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

47 Renacimiento – Talleres MSDN 2004
Demo de Single Sign-On © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

48 FUTURO: Web Parts en Whidbey.NET
Renacimiento – Talleres MSDN 2004 FUTURO: Web Parts en Whidbey.NET © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

49 Renacimiento – Talleres MSDN 2004
¿Qué tenemos hoy? Renacimiento – Talleres MSDN 2004 Sin tener en cuenta a Whidbey.NET Los Web Parts tienen que ser Web-Controls custom basados en ASP.NET Las páginas para Web Parts tienen que estar obligatoriamente alojadas en Sites de SharePoint Es escalable, está soportado, y tenemos disponible una infraestructura completa de servicios de SharePoint Las ‘Zonas’ son estrictamente plantillas visuales de contenedores © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

50 Renacimiento – Talleres MSDN 2004
Tools Client Application Model Web & Service Application Model Data Systems Application Model Mobile PC & Devices Application Model Command Line Compact Framework Avalon Windows Forms ASP.NET / Indigo Win FS Yukon System.Console Mobile PC Optimized System.Web System.Storage System.Data.SqlServer System.Windows.Forms System.Windows NT Service System.Windows System.Windows.Forms System.ServiceProcess Presentation Data Communication System.Windows System.Search System.Data System.Messaging System. Discovery System.Collaboration UI Element Explorer Media Annotations SqlClient DataSet System.DirectoryServices RealTimeEndpoint Documents Controls Animation SqlTypes Mapping Active Directory TransientDataSession Monitoring System.Remoting Text Element Dialogs Controls SqlXML ObjectSpaces SignalingSession Logging System.Runtime.Remoting Uddi Shapes SideBar Control OdbcClient ObjectSpace Media Shape Notification Panel Relevance OleDbClient Query Activities Ink Navigation Design OracleClient Schema System.Web.Services System.MessageBus System.Storage Web.Service Transport Queue System.Windows.Forms System.Web.UI Description Port PubSub Forms Page WebControls Item Core Channel Router Relationship Contact Discovery Control Control Adaptors Service Policy Media Location Protocols Print Dialog HtmlControls Design Peer Group Audio Message Design MobileControls Video Document System.Net Images Event System.Web System.Help System.Speech HttpWebRequest NetworkInformation System.Xml Personalization FtpWebListener Sockets System.Drawing Recognition Synthesis Caching Schema Xpath SslClientStream Cache System.NaturalLanguageServices Serialization Query SessionState WebClient Fundamentals Base & Application Services Security Configuration Deployment/Management System.Timers System.Text System.Collections System.Windows. TrustManagement System.Web.Configuration System.Globalization System.Design System.Security System.Web Generic System.MessageBus.Configuration Administration System.Serialization System.IO System.Web. Security Authorization Permissions System.ComponentModel System.Configuration Management System.Threading Ports AccessControl Policy System.CodeDom System.Resources System.Message Bus.Security Credentials Principal System.Management System.Runtime System.Reflection Cryptography Token System.Deployment Serialization InteropServices System.EnterpriseServices System.Diagnostics CompilerServices System.Transactions © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

51 Compatibilidad Futuro WebParts
Renacimiento – Talleres MSDN 2004 Compatibilidad Futuro WebParts Los Web Parts para WSS/SPS de hoy funcionarán en las versiones de WSS/SPS del futuro Los Web Parts de Whidbey ‘de mañana’ funcionarán en los siguientes versiones de WSS/SPS Los Web Parts de Whidbey ‘de mañana’ funcionarán también en las versiones actuales de WSS/SPS después de aplicar una actualización ó SP correspondiente. © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

52 Web Parts ASP.NET (‘Futuro’ a partir de Whidbey.NET)
Renacimiento – Talleres MSDN 2004 Web Parts ASP.NET (‘Futuro’ a partir de Whidbey.NET) Ya no se ‘dependerá’ de SharePoint 2003 para desarrollar WebParts Son ‘bloques de construcción’ para cualquier Web ASP.NET dinámico. Completamente integrado en el modelo de controles web de ASP.NET Cualquier control-web puede ser un WebPart Cualquier user-control-web puede ser un WebPart Podemos utilizar los nuevos servicioes ASP.NET Personalización, Roles, Membership, etc. © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

53 Windows SharePoint Services
Renacimiento – Talleres MSDN 2004 Windows SharePoint Services La siguiente versión de WSS y SPS estará basada en ASP.NET Whidbey Los Web Parts actuales de WSS 2.0: Funcionarán en la siguiente versión de WSS Los Web Parts de ASP.NET Whidbey: Funcionarán sobre ASP.NET Whidbey Funcionarán sobre la siguiente versión de WSS Funcionarán sobre WSS 2.0 * (Service Packs) © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

54 Conclusiones desarrollo .NET sobre SharePoint 2003
SharePoint 2003 tiene muchas oportunidades para desarrolladores .NET permitiendo extender y crear soluciones propias basadas en SharePoint 2003. Web Parts ‘Custom’ (Aplicaciones propias) Acceso a elementos internos de SharePoint Compatibilidad con futuros WebParts de .NET Whidbey

55 Renacimiento – Talleres MSDN 2004
Recursos Centro de Downloads de SharePoint Products and Technologies en MSDN Ejemplos de desarrollo en GotDotNet Desarrollo Web Parts y Whidbey.NET WebParts Proyectos y/o Formación de Renacimiento © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Descargar ppt "Desarrollo .NET sobre SharePoint 2003 (WSS y SPS)"

Presentaciones similares


Anuncios Google