Download presentation
Presentation is loading. Please wait.
Published byAlfred Welch Modified over 8 years ago
1
Welcome to the Minnesota SharePoint User Group
2
Develop and support a local community focused on Microsoft SharePoint Technologies Educate user group members about SharePoint Technologies Transfer knowledge within the community Communicate best practices Introduce new products / solutions User Group Goal / Objectives
3
Quick Intro Announcements and News Presentation Break Presentation (continued) Office 12 Updates, Q & A, Give Away! Agenda
4
Inetium (www.inetium.com)www.inetium.com Twin Cites based Microsoft consulting company Microsoft Gold Certified Partner Practice Area focused on Information Worker Technologies New Horizons – Minnesota (www.newhorizonsmn.com)www.newhorizonsmn.com Microsoft Gold Certified Partner Training on many technologies Microsoft (www.microsoft.com)www.microsoft.com I’m guessing you’ve heard of them Introductions – MNSPUG Sponsors
5
Website for user group SharePoint resource documents SharePoint resource websites links RSS Feeds Meeting Schedule Past User Group Presentations Watch for changes soon! www.sharepointmn.com
6
Next Meetings April 12 th 9:00 AM to 11:00 AM Topics: SharePoint Success Stories – Case Studies May 10 th 9:00 AM to 11:00 AM 2 yr MNSPUG Anniversary Celebration Ongoing Schedule 2 nd Wednesday of every month 9:00 to 11:00 am Microsoft’s Bloomington Office Upcoming Schedule
7
Conference Reminder SharePoint Connections April 2-5: Orlando, FL Advisor Summit on Microsoft SharePoint April 9-13: Las Vegas, NV Tech Ed June 11-16: Boston, MA
8
SharePoint Web Part Development (Part 1)
9
Building a Basic Web Part Assembly References Code Deployment
10
Assembly References What: Microsoft.Sharepoint.dll Why: We need to inherit from Webpart Others Microsoft.SharePoint.Administration Microsoft.SharePoint.Portal Microsoft.SharePoint.Portal.Search
11
The Code Inherit from WebPart Override RenderWebPart Display Something
12
Deployment – The Hard Way Code Signing Create DWP Deploy Files /bin or GAC /wpcatalog SafeControl Edit web.config
13
Deployment – The Easy Way Make a CAB Visual Studio Setup Project Manifest.xml Deployment made simple stsadm.exe -o addwppack -filename myfile.cab –url http://myportal/
14
Demo – Hello World
15
Personalization – What can we do? Storage Personal, Shared, None Default Values Categories User Editing
16
Demo – Hello Whoever You Are
17
Beyond Simple Webparts Using Web Controls Wiring up Events Making Polite Web Parts
18
Using Web Controls Commonly Used Server Controls TextBox Label DataGrid Intitialize these controls in CreateChildControls You can override RenderWebPart Use EnsureChildControls() to ‘ensure child controls’
19
Events Not as intuitive as in WinForms Uses similar Event/Delegate model Needs to be initialized early in the Lifecycle
20
Web Part Life Cycle Web Part Constructor Web Part Init Load ViewState Create Child Controls Web Part Load Web Part PreRender Save ViewState Web Part Render Web Part Unload
21
Making Polite Web Parts Errors can cause big problems PIC Wrap calls with try/catch
22
Demo – Hello DataGrid
23
Using User Controls in SharePoint User Controls Can be visually Designed Deployed as ascx Files Aren’t Natively Supported in SharePoint
24
User Controls – The Solution SmartPart Freely Downloadable Tool Wraps a User Control in a Server Control Supports Basic Personalization and Connections Alternatives Write your own wrapper The Secret Is In LoadControl
25
Demo – HelloSmartPart
26
Break!
27
SharePoint Web Part Development (Part 2)
28
Web Part Connections Web Parts can communicate via connection interfaces Can implement both provider and consumer interfaces Can maintain multiple concurrent connections
29
Web Part Connections ProviderConsumerShares ICellProviderICellConsumerSingle value IRowProviderIRowConsumerSingle row IListProviderIListConsumerList of data IFilterProviderIFilterConsumerFilter string IParametersOutProviderIParametersOutConsumer List of parameters – provider defined IParametersInProviderIParametersInConsumer List of parameters – consumer defined
30
Web Part Connections Built in transformers allow additional connection options ProviderConsumer IRowProvider ICellConsumer IRowProviderIFilterConsumer IParametersOutProviderIParametersInConsumer IRowProviderIParametersInConsumer
31
Demo ICellProvider Web Part
32
SharePoint Object Model Microsoft.SharePoint.Portal.WebControls.BaseAreaWebPart GetAreaInformation GetAreaPath GetSubAreas Web Parts can gain access to their current SPSite and SPWeb Microsoft.SharePoint.WebControls.SPControl.GetContextSite() Microsoft.SharePoint.WebControls.SPControl.GetContextWeb()
33
Demo MyWebs Web Parts
34
SharePoint Web Services WSS Provides several Web Services Located in the [site]/_vti_bin/ directory
35
SharePoint Web Services Administration Provides methods for managing a deployment ofWindows SharePoint Services, such as for creating or deleting sites. Alerts Provides methods for working with alerts for list items in a SharePoint site. Document Workspace Exposes the Document Workspace Web service and its eleven methods for managing Document Workspace sites and the data they contain. Forms Provides methods for returning forms used in the user interface when working with the contents of a list. Imaging Provides methods that enable you to create and manage picture libraries. List Data Retrieval Provides a method for performing queries against lists in Microsoft Windows SharePoint Services. Lists Provides methods for working with lists and list data. Meetings Provides methods that enable you to create and manage Meeting Workspace sites. Permissions Provides methods for working with the permissions for a site or list. Site Data Provides methods that return metadata or list data from sites or lists in Microsoft Windows SharePoint Services. Sites Provides a method for returning information about the site templates for a site collection. Users and Groups Provides methods for working with users, site groups, and cross-site groups. Versions Provides methods for working with file versions. Views Provides methods for working with views of lists. Web Part Pages Provides the methods to send information to and retrieve information from XML Web services. Webs Provides methods for working with sites and subsites.
36
SharePoint Web Services NameDescription AddWebPart Adds a new Web Part to a Web Part Page. DeleteWebPart Deletes a Web Part. GetWebPart Returns the XML data for a Web Part. GetWebPart CrossPageCompatibility Returns the compatibility information of providerPartID with all the parts on the target page. GetWebPart PageConnectionInfo Returns group and interface information for all parts on the same page as well as compatibility results for the provider part (providerPartID) with other parts on the same page. GetWebPartPageDocument Returns the Web Part Page, complete with Web Parts and properties included within each Web Part zone. GetWebPartProperties Returns an XML string of all Web Parts associated with a Web Part Page. GetXmlDataFromDataSource Returns the XML from a data retrieval service. RenderWebPartForEdit Returns an XML blob including part property information and rendering HTML. SaveWebPart Saves changes to an existing Web Part.
37
Demo Web Part Inventory
38
ASP.NET 2.0 Web Parts Built using the 2.0 Framework Requires ASP.NET Personalization Can exist outside of SharePoint Specialized Zones to provide SharePoint WebPart functionality
39
ASP.NET 2.0 Web Parts WebPartManger Required for all Web Part pages Manages the DisplayMode for the page –DesignDisplayMode –EditDisplayMode –CatalogDisplayMode –ConnectDisplayMode –BrowseDisplayMode ProxyWebPartManager Used only when using Master Pages Placed on a content page to allow configuration of static connections (since you don’t have access to the WebPartManager at designtime)
40
ASP.NET 2.0 Web Parts WebPartZone Container for your Web Parts Allows configuration, dynamic placement, etc Can define style for WebParts placed into the Zone
41
ASP.NET 2.0 Web Parts CatalogZone Container for CatalogParts Allows users to add Web Parts to Web Part Zones Displayed only when in CatalogDisplayMode DeclarativeCatalogPart Add Web Parts to the “Gallery” at design time Would have to write the “Virtual Server Gallery” functionality to pull from a server side listing of available Web Parts PageCatalogPart Similar to the “Page Gallery” in SharePoint Holds closed Web Parts ImportCatalogPart Used to import Web Part Description Files (.webpart)
42
ASP.NET 2.0 Web Parts EditorZone Container for EditorParts Allows users to configure Web Part properties Displayed only when in EditDisplayMode AppearanceEditorPart Manage Title, Direction, Width/Height BehaviorEditorPart Manage Description, Title link, icons, and behavior rules (close, edit, hide, etc..) LayoutEditorPart Manage Zone, Zone index PropertyGridEditorPart Manage public Web Part properties decorated with [Personalizable(true)] [WebBrowsable(true)]
43
ASP.NET 2.0 Web Parts ConnectionsZone Used to create Part-to-Part connections at Runtime
44
ASP.NET 2.0 Web Parts Courtesy of Jan Tielen’s Blog: http://weblogs.asp.net/janhttp://weblogs.asp.net/jan
45
Demo ASP.NET 2.0 Web Parts
46
WebPart Templates for VS2k3: –http://www.microsoft.com/downloads/details.aspx?familyid=CAC3E0D2-BEC1- 494C-A74E-75936B88E3B5&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?familyid=CAC3E0D2-BEC1- 494C-A74E-75936B88E3B5&displaylang=en Rational Guide to Building SharePoint Web Parts –http://www.amazon.com/gp/product/0972688862http://www.amazon.com/gp/product/0972688862 Professional Web Parts and Custom Controls with ASP.NET 2.0 –http://www.amazon.com/gp/product/076457860Xhttp://www.amazon.com/gp/product/076457860X SharePoint Products and Technologies 2003 Software Development Kit –http://www.microsoft.com/downloads/details.aspx?FamilyId=AA3E7FE5-DAEE- 4D10-980F-789B827967B0&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=AA3E7FE5-DAEE- 4D10-980F-789B827967B0&displaylang=en SmartPart Resources –http://www.gotdotnet.com/workspaces/releases/viewuploads.aspx?id=6cfaabc8- db4d-41c3-8a88-3f974a7d0abehttp://www.gotdotnet.com/workspaces/releases/viewuploads.aspx?id=6cfaabc8- db4d-41c3-8a88-3f974a7d0abe Resources
47
Thanks for coming. See you next month!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.