1 / 37

web parts

web parts. Eli Robillard ( elir@eidenai.ca ) Ali Kheradvar ( alik@eidenai.ca ) . agenda. web part framework sharepoint v2 (wss 2003) asp.net v2 (whidbey) sharepoint v3 (wss 2006). web site users want:. flexible display options personalized content reduced data entry

jed
Download Presentation

web parts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. web parts Eli Robillard (elir@eidenai.ca) Ali Kheradvar (alik@eidenai.ca)

  2. agenda • web part framework • sharepoint v2 (wss 2003) • asp.net v2 (whidbey) • sharepoint v3 (wss 2006)

  3. web site users want: • flexible display options • personalized content • reduced data entry • import and export settings

  4. developer challenges: • a lot of code is required • want a single personalization solution • secure and bullet-proof customization • complex client-side connections

  5. web part definition. • Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages (in a Portal/WSS site)

  6. web parts: connected vs. stand-alone. • stand-alone: There’s no connection to the other web parts • connected: • As a Provider • As a Consumer • As a Stand-alone

  7. web part development. • Requirements • VS 2003 • Web Part Templates for Visual Studio .NET • Required Assemblies (Microsoft.SharePoint.dll, …)

  8. web part development. • Steps: Initialize Development Environment (VSS, VPC, …) Initialize VS 2003 Solution • Web Part Project • Deployment Package (CAB File) • Other Libraries Develop Web Part Code Test / Debug Deploy Web Part(s) • Don’t forget to document different steps

  9. sharepoint v2 demo.

  10. web part files. • Web Part Class • DWP File (Web Part Definition File). Every Web Part has its own DWP file • Manifest.xml file used during installation of the Web Part(s) on the SharePoint server

  11. connected web parts: interfaces.

  12. connected web parts: scenarios. • Master/Detail • Parent/Child • Data Entry and Filter • Calculations • Alternate Views • Data Enhancement

  13. interface sample: cell interface.

  14. connected web parts: code flow. • EnsureInterfaces() • RegisterInterface() • CanRunAt() • PartCommunicationConnect() • PartCommunicationInit() • Fire Init Events; e.g., CellProviderInit() • PartCommunicationMain() • Fire Remaining Events; e.g., CellReady()

  15. whidbey web parts. • normal view • design view • edit view • catalog

  16. whidbey web part toolbox. • WebPartManager • WebPartZone • WebPart • EditorZone • PropertyGridEditorPart • AppearanceEditorPart • BehaviorEditorPart • LayoutEditorPart • CatalogZone • PageCatalogPart • ConnectionsZone

  17. whidbey web part manager. • non-visual control • <asp:WebPartManager runat=server … /> • set and track the state of the page • normal, design, edit, catalog • manages all web part zones and controls • add a WP Manager to add WP support.

  18. whidbey web part class. • abstract class • single user controls wrapped in an instance of GenericWebPart • multiple controls: • - contain in a user control (though you can’t set properties like this) • - server control which implements IWebPart

  19. whidbey connected web parts. • StaticConnections • node of WebPartManager • ConnectionsZone • user-configuration

  20. whidbey connected web parts. • <asp:WebPartManager runat=“server” id=“WPManager”> • <StaticConnections> • <asp:connection • ProviderID=“invoice” • ProviderConnectionPointID=“invoiceIdProvider” • ConsumerID = “item” • ConsumerConnectionPointID=“itemIdProvider” • / > • </StaticConnections> • </asp:WebPartManager>

  21. whidbey connected web parts. • [Personalizable(true), WebBrowsable(true)] • public int ItemId { • get { return _itemId; } • set { _itemId = value; } • } • [ConnectionProvider(“ItemIdProvider”, “ItemIdProvider”)] • private IItemInfo ProvideItemInfo() { • return this; • }

  22. whidbey personalization. • persist control settings • shared data • per-user data • configurable data store • built-in SQLServer and Access support • extensible via providers

  23. sharepoint v3 (2006) Windows SharePoint Services “v2” Windows SharePoint Services “Version 2” ASP.NET 1.1 ASP.NET 2.0 Windows SharePoint Services “Version 3” Windows SharePoint Services “v3” Microsoft PDC 2005

  24. sharepoint v3 and ASP.NET. Windows SharePoint Services “Version 2” Windows SharePoint Services “Version 3” Microsoft PDC 2005

  25. sharepoint v3 benefits. • Makes it easier for developers to build on top • Enable developers to use ASP.NET services, like HttpApplication or HttpModules • Provide WSS facilities as standardized services [SiteMap] • Consume more ASP.NET interfaces • Membership, Role Providers • More consistency Microsoft PDC 2005

  26. sharepoint v3 and asp.net features. • Support for .ascx controls in pages • Resource support for _layouts pages, etc. • Compilation and safe code control • Customized pages can have code • Customized pages can be compiled for performance Microsoft PDC 2005

  27. sharepoint v3 webparts. • every web part you write for whidbey will be re-usable in sharepoint v3 • the only extra step with v3 is marking safe

  28. sharepoint v3 and iis. • WSS now creates its own application • Does not “take over” the default app • No need for “exclusions” • Unified application domains • Centralized Web configuration management object model Microsoft PDC 2005

  29. sharepoint v3 webpart • ASP.NET 2.0 Web Parts supported • Full Compatibility for WSS “v2” Web Parts • WSS “v2” Web Part class rebased on .NET 2.0 web parts MyV2WebPart -> Microsoft.SharePoint.WebPartPages.WebPart -> Microsoft.Web.UI.WebControls.WebParts.WebPart • Improved user interface for Web Parts Microsoft PDC 2005

  30. sharepoint v3 connections. • Similar Connection Types • ICell -> IField, IList -> Itable • Automatic translation from WSS v2 types • ASP.NET 2.0 adds support: • custom connection interfaces • custom transformers Microsoft PDC 2005

  31. sharepoint v3 limitations. • Cannot use ASP.NET 2.0 Web Part Pages; not directly compatible as-is • Pages must include SPWebPartZones and SPWebPartManager • This is done to automatically handle compatibility issues • No built-in support for treating .ASCX files (user controls) as Web Parts • You can use .ASCXs in pages, though • Wrappers for .ASCXs can and will be created Microsoft PDC 2005

  32. Which Web Part Technology Should You Use? • Pros to ASP.NET 2.0 Web Parts: • Usable in WSS and in non-WSS ASP.NET 2.0 applications • Pros to SharePoint Web Parts: • Client side scripting & connections • Web Part data caching • WorkItem infrastructure • Where possible, build on base ASP.NET 2.0 Web Part model Microsoft PDC 2005

  33. until sharepoint v3. • WSS v2 SP2 now available! • Supports .NET 2.0 assemblies • Does not support ASP.NET 2.0 features • WSS Only: SPS 2003 does not support .NET 2.0 • You’d need to create a WSS “v2” Web Part wrapper for ASP.NET 2.0 Web Parts Microsoft PDC 2005

  34. sharepoint v3 “Son of SmartPart” • SmartPart version 2 • Community tool driven by Jan Tielens of U2U • Enables hosting ASP.NET 2.0 Web Parts and Web User Controls in WSS “v2” Web Part Pages • (The original SmartPart allowed ASP.NET 1.1 user controls to be contained in WSS/SPS Web Parts; it’s on www.gotdotnet.com) • Features include: • Connectable Web Parts / user controls • Properties support • Custom Tool Part support • For More Information: • Technology Preview on www.smartpart.info • Forthcoming Webcast Microsoft PDC 2005

  35. resources • Eidenai Innovations: • http://www.eidenai.ca/ • Eli’s World of Blog: • http://weblogs.asp.net/erobillard/ • Eli’s SharePoint Resources • http://weblogs.asp.net/erobillard/articles/SPResources.aspx

  36. references

  37. wrap-up and prizes • Thank-you!

More Related