NET Arkitekterne Informatik, IT-Udvikling Web
Transcription
NET Arkitekterne Informatik, IT-Udvikling Web
Web Parts Framework i ASP.NET 2.0 • Erik Westermann (Chefkonsulent) • .NET arkitekterne, Teknologisk Institut • erik.westermann@teknologisk.dk .NET Arkitekterne Informatik, IT-Udvikling Agenda • • • • • • • Web part arkitekturen Web part manager Udvikling af Web Parts Web Parts zoner User Controls som Web Parts Display mode og Page scope Catalog zoner .NET Arkitekterne Informatik, IT-Udvikling Dynamic User Interface • Developer Challenges: A lot of code is required Comprehensive Personalization Solution Secure and Bullet Proof Customization Lack of Rich development support • Web Site End Users Want: Flexible Display Options Personalized Content Reduced Data Entry Import and Export settings .NET Arkitekterne Informatik, IT-Udvikling ASP.NET WebParts • • • • • Provide building blocks for dynamic web sites Expose core ASP.NET Services Personalization, Role Management, Membership, Profile.. etc Great Visual Studio Designer Experience Full development flexibility and extensibility Can be used in any type of Web site Portal, content, intranet, internet Use Windows or form authentication .NET Arkitekterne Informatik, IT-Udvikling Dynamic Modular Web Sites Core concepts Normal Design Edit Catalog Connection .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling Object view of the Web Parts Framework .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling Web Part - Drill Down UI Elements • WebPart’s UI elements TitleIcon Title Verbs Chrome Content • Verbs UI elements that enable users to perform actions WebPartZone Provide standard verbs Close, Minimize, Restore, Help, Edit, Connect, Export WebPart developer can add custom verbs .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling Web Part Personalization The Web Part Framework can automatically save and load the values of Web Part properties .NET Arkitekterne Informatik, IT-Udvikling Personalization Attributes <Personalizable> Properties marked with this attribute are automatically saved by the Web Part Framework <WebBrowsable> Properties marked with this attribute are displayed in the PropertyGridEditorPart <WebDisplayName> Properties marked with this attribute are provided with a friendly name in the PropertyGridEditorPart <WebDescription> Properties marked with this attribute are provided with a description in the PropertyGridEditorPart .NET Arkitekterne Informatik, IT-Udvikling Web Part Interfaces • IWebPart Interface Enables you to specify standard Web Part properties such as the Web Part Title, Description, and Icon • IWebEditable Interface Enables you to associate particular Editor Parts with a Web Part • IWebActionable Interface Enables you to associate custom Web Part Verbs with a Web Part .NET Arkitekterne Informatik, IT-Udvikling .NET Arkitekterne Informatik, IT-Udvikling Platforms Windows SharePoint Services v2 and SharePoint Portal Server 2003 There platforms are running on ASP.NET 1.1 and use the web part infrastructure provided by the core WSS functionality. Additionally you can install the SmartPart so this platform can also use ASP.NET 1.1 user controls. Windows SharePoint Services v2 with Service Pack 2 Since September last year, Service Pack 2 for Windows SharePoint Services is available. This service pack allows you to host WSSv2 on a site that is running ASP.NET 2.0. There is a SP2 for SPS 2003 as well, but unfortunately this SP does not allow you to run SPS 2003 on top of ASP.NET 2.0. At this point it’s still unclear if there will be a SP for SPS 2003 that will allow this. Additionally you can install the SmartPart to this platform so ASP.NET 1.1 and ASP.NET 2.0 user controls can be used. ASP.NET 2.0 Web Sites These sites are created by using the ASP.NET 2.0 web part infrastructure. Windows SharePoint Services v3 This version will ship with the 2007 Microsoft Office System, including the SharePoint servers. Additionally you can install the SmarPart so ASP.NET 2.0 user controls can be used on this platform. .NET Arkitekterne Informatik, IT-Udvikling Development Techniques Visual Studio.NET 2003, Traditional By using the (optionally) Web Part Templates, you can create a class that inherits from the Microsoft.SharePoint.WebPartPages.WebPart base class (defined in the assembly Microsoft.SharePoint.dll). The assembly containing the class is compiled against .NET 1.1. Visual Studio.NET 2003, User Controls Creating user controls in VS.NET 2003 enhances the developer experience for developers, since they can utilize the VS designer to design the UI of the control. Visual Studio 2005, SharePoint Web Parts Very similar to the “Visual Studio.NET 2003, Traditional” technique, you can build classes in VS 2005 that inherit from the Microsoft.SharePoint.WebPartPages.WebPart base class. The assembly containing the class is compiled against .NET 2.0. Visual Studio 2005, ASP.NET 2.0 Web Parts A web part created for the web part infrastructure of ASP.NET 2.0, is a class inheriting from System.Web.UI.WebControls.WebParts.WebPart class (defined in the System.Web assembly). The assembly containing the class is compiled against .NET 2.0. Visual Studio 2005, User Controls Similar to the “Visual Studio.NET 2003, User Control” technique you can leverage the VS 2005 designer to increase the developer experience. Visual Web Developer 2005, User Controls Visual Web Developer 2005 provides can be compared with the “Visual Studio 2005, User Controls” technique. .NET Arkitekterne Informatik, IT-Udvikling MSDN Webcasts • Events & Webcasts http://msdn.microsoft.com/events/ • Essential ASP.NET - Explore configuration to webforms. Fritz Onion is back, introducing Microsoft ASP.NET 2.0 to developers who are currently working with ASP.NET 1.1. During this 15-part series, learn the new features of this platform, which range from declarative data binding to storing per-client profile data, and hear practical advice about how to best incorporate these features into your applications. Each webcast has an accompanying online virtual lab, which gives you an opportunity to test the concepts yourself. MSDN Webcast: Essential ASP.NET for the Web Developer (Part 8 of 15): Web Parts (Level 200) http:/pluralsight.com/fritz/webcasts.aspx .NET Arkitekterne Informatik, IT-Udvikling Artikler • Configuring ASP.NET 2.0 Application Services to use SQL Server 2000 or SQL Server 2005 http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx • Web Parts Personalization Providers http://msdn.microsoft.com/library/default.asp?url=/library/enus/dnaspp/html/ASPNETProvMod_Prt5.asp • Let's Get Personal: Personalizing Web Sites in ASP.NET 2.0 http://msdn.microsoft.com/library/default.asp?url=/library/enus/dnaspp/html/ASPNETProvMod_Prt9.asp • Personalization with ASP.NET 2.0 http://msdn.microsoft.com/library/enus/dnvs05/html/Person_fin.asp?frame=true • Introducing the ASP.NET 2.0 Web Parts Framework http://msdn.microsoft.com/library/en-us/dnvs05/html/WebParts.asp?frame=true .NET Arkitekterne Informatik, IT-Udvikling