410 likes | 519 Views
Welcome to the Minnesota SharePoint User Group. Agenda. Quick Intro Announcements SharePoint Development Business Case What and Why Getting Started – The Development Environment [5-10 minute break?] Getting Started – Developing a Basic Web Part Deployment Options
E N D
Agenda • Quick Intro • Announcements • SharePoint Development • Business Case • What and Why • Getting Started – The Development Environment • [5-10 minute break?] • Getting Started – Developing a Basic Web Part • Deployment Options • Advanced SharePoint Customization • Q & A
Introductions – MNSPUG Sponsors • Inetium (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) • Microsoft Gold Certified Partner • Training on many technologies • Microsoft (www.microsoft.com) • I’m guessing you’ve heard of them
User Group Goal / Objectives • Build 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
www.sharepointmn.com • Website for user group • SharePoint resource documents • SharePoint resource websites links • RSS Feeds • Meeting Schedule • Past User Group Presentations www.sharepointmn.com
Upcoming Schedule • Next Meeting • April 13th 9:00 AM to 11:00 AM • Microsoft’s Bloomington Office • Topic: You tell us – Survey out on http://www.sharepointmn.com • Ongoing Schedule • 2nd Wednesday of every month • 9:00 to 11:00 am • Microsoft’s Bloomington Office
SharePoint Advisor Magazine (coming soon) • New Magazine focusing on SharePoint • “The Advisor Guide to using Microsoft SharePoint technology, Windows SharePoint Services, SharePoint Portal Server, and more, including Microsoft Office System and SharePoint, enterprise integration and administration, and innovative SharePoint-based solutions, with how-to, tips, code, downloads, training, step-by-step, and more...” • Have contacted editor -- hope to get some free first issues for the Minnesota SharePoint User Group www.sharepointadvisor.com
SharePoint Advisor Live Conference • Technical conference focusing on SharePoint • Tips • Tricks • Code • How To’s • $1295 Main Event Registration by May 2 2005 • $1495 Main Event Registration after May 2 2005 • http://advisorevents.com/cmt0506p.nsf/w/main-cms June 12 - 16, 2005Las Vegas, NevadaJW Marriott Las Vegas Resort
SharePoint Web Part Development: Business Case
Scenarios to use Custom Web Parts • Human Resources – Self Service • Custom web parts to expose functionality to create a Self-Service environment for employees • If existing system for HR tie into the data in the backend system using custom web parts to access the data • If no existing system for HR, possible to create a self service system using custom web parts • Examples (each would use logged in users account): • My Timesheet web part • My Vacation web part • My 401k web part • etc.
Scenarios to use Custom Web Parts • Accounting System – Web Access to Data • Create a SharePoint environment to access data from backend accounting system using custom web parts • Extends the audience of accounting data • Existing solution: • Microsoft Business Portal (Great Plains, Solomon) • Based on WSS • Examples: • Account Information web part to pull account information out of backend system • Purchase Orders web part to pull PO and PO Detail information
Scenarios to use Custom Web Parts • Project Collaboration • Create a SharePoint environment to collaborate on projects • Internally with co-workers • Externally with clients / contractors (extranet) • If existing Customer Relationship Management (CRM) system, a custom web part to pull account and contact information into SharePoint for each project • If existing Project Management system, link to data in system to present list of tasks to wider audience • Create a custom web part to create a ‘New Project’ process • Create WSS site • Write data to backend systems
Web Parts: What & Why?
What is a Web Part? • User’s Perspective • The building blocks of a SharePoint Page • Content Manager’s Perspective • Containers of information from SharePoint and/or other sources • Developer’s Perspective • Enhanced ASP.NET Server Controls • Every List/Library has a corresponding Web Part
How are Web Parts Consumed? • Galleries • Web Part Page Gallery • Team Web Site Gallery or Portal Site Gallery • Virtual Server Gallery • Online Gallery – Can be customized • Export/Import • DWP (Web Part Description xml File) Tip: Customized Online Gallery http://msd2d.com/newsletter_tip.aspx?section=Sharepoint&id=52204aa4-e9d7-40d1-8f08-e486808ddce2
How are Web Parts Consumed? • Web Part Zones • Customizable • Key Properties • Orientation • AllowCustomization • AllowPersonalization • LockLayout • Managed through FrontPage or custom Site/Area Definitions <WebPartPages:WebPartZone runat="server" Title="loc:TitleBar" ID="TitleBar" LockLayout=“true” AllowPersonalization=“false” />
How are Web Parts Configured? • Managing Web Part Settings • Tool Pane • Web Part specific Properties • Extensible • General SharePoint Properties
Why Create Custom Web Parts? • Extend the functionality of SharePoint • Leverage the Object Model • e.g. My Sub Sites, Custom Advanced Search, … • Integrate Existing Data/Functionality • Other Data sources • Consume Web Services • e.g. Line of Business Data • Dashboards/Reporting • Single Point of Entry • e.g. Analytics (Charts, Graphs, Gauges) • SQL Reporting Services
Getting Started The SharePoint Developer Environment
Basic Development Environment Requirements • Visual Studio .NET • Local Version of SharePoint Assemblies • Microsoft.SharePoint.dll • Required for all Web Parts • Microsoft.SharePoint.Portal.dll and other Portal Assemblies • Required for leveraging Portal-specific functionality (i.e. Audiences, Portal Searching, User Profiles, etc.)
Basic Development Environment Requirements • VS.NET Web Part Project Template (available on MSDN) • Project Template for DWP, Manifest, Basic Web Part Class, etc. • Access to a machine running Windows SharePoint Services • Portal is ONLY required for Portal-specific web parts • Tip: Leverage Virtual Server or Virtual PC • SDK for WSS and Portal for Object Model Documentation
Getting Started Developing a Basic Web Part
The Core Your Web Part A DWP file(XML-based) storingsome commonproperty valuesand points tothe .NET assemblyto be loaded Safe Control Settings and Trust Level in the virtual server’s Web.config .NET Assemblyencapsulatingthe server-sidecode and therendering of the HTML
The DWP – Web Part Description File <?xml version="1.0" encoding="utf-8"?> <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2" > <Title> My Customers </Title> <Description> Displays a list of customers for the current user. </Description> <Assembly> MnSPUG.March.WebParts </Assembly> <TypeName> MnSPUG.March.WebParts.MyCustomersWebPart </TypeName> </WebPart>
The Web.config – Config Settings for Virtual Server <configuration> … <SharePoint> <SafeControls> <SafeControl Assembly="MnSPUG.March.WebParts" Namespace="MnSPUG.March.WebParts" TypeName="*" Safe="True"/> </SafeControls> </SharePoint> … </configuration>
The Web Part Framework – Web Part Class • Derive from Microsoft.SharePoint.WebPartPages.WebPart • ToolboxData • XmlRoot • Your Class [ToolboxData("<{0}:MyCustomersWebPart runat=server></{0}:MyCustomersWebPart>"), XmlRoot(Namespace="MnSPUG.March.WebParts")] public classMyCustomersWebPart : Microsoft.SharePoint.WebPartPages.WebPart
The Web Part Framework - Properties • Public “Serializable” properties are visible on the Tool Pane • string, bool, int, float, enum, System.DateTime, and System.Drawing.KnownColor • Decorate Public Properties with Attributes [Browsable(true), DefaultValue(0), WebPartStorage(Storage.Personal), Description("Determines the maximum number of customer records to return (a 0 implies all customers)."), FriendlyName("Max Customer Records"), Category("Configuration")] public int MaxRecords { get { return _maxRecords; } set { _maxRecords = value; } }
The Web Part Framework – CreateChildControls • Override for Composite Controls • Leverage existing ASP.NET server controls (Calendar, Button, etc.) • Wire-up Events protected override void CreateChildControls() { _button = new Button(); _button.Text = "Click Me"; _button.Click += new EventHandler(button_Click); this.Controls.Add(_button); }
The Web Part Framework – RenderWebPart • Override to Emit HTML/Render your Control protected override void RenderWebPart(HtmlTextWriter output) { output.Write(“Please click my button <br />”); this._button.RenderControl(output); }
Demo Create a Basic Web Part
Deployment Options • Manual • Assembly in bin or GAC (must be signed if in GAC!!!) • web.config SafeControl • STSADM • Manifest • CAB File • stsadm.exe -o addwppack • WPPackager • Download from MSDN • MSI File to Install on Web Server • InstallAssemblies • Download from MSDN • Similar to STSADM
Advanced Web Part Development & Other SharePoint Customization Opportunities
Custom Tool Parts • Why and When? • Create a Custom Tool Part Class • Derive from ToolPart • Override GetToolParts() • Synchronize Custom Tool Part Properties with your Web Part Properties • Examples: • Leverage Existing External/SharePoint Data • Web Part Settings that are Collections
Part-to-Part Communication My Customers to Customer Orders
Part-to-Part Communication • Why and When? • OOTB SharePoint Web Parts provide this functionality (Lists/Libraries) • Implement SharePoint Interfaces • Providers • IFilterProvider, IRowProvider, etc. • Consumers • IFilterConsumer, IRowConsumer, etc • Override Base WebPart Methods • EnsureInterfaces, PartCommunicationConnect, etc.
Part-to-Part Communication Customer Orders to Order Details
Demo Part-To-Part Communication
Other Advanced Customization Topics • Leverage SharePoint Object Model • Custom Definitions • Site/Area • List/Library • SmartPart • GotDotNet Workspace • UserControls as Web Parts • DHTML Behaviors • Attach to HTML elements via CSS and inject client-side functionality • Leverage Web Services • Single Sign-on • Document Library Event Handlers
Resources (just a few…) • SharePoint SDKs • http://msdn.microsoft.com/office/understanding/sharepoint/documentation/default.aspx • SmartPart • http://www.smartpart.info • WPPackager • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_sp2003_ta/html/sharepoint_deployingwebparts_msi.asp • Integration • SAP: • http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&EventID=1032267591&CountryCode=US • SQL Reporting Services: • http://weblogs.asp.net/jan/archive/2005/01/21/358073.aspx • SharePoint Bloggers • http://sharepointblogs.com/mkruger/archive/2005/02/15/1310.aspx • Web Part Testing Checklist • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_SP2003_ta/html/Office_SharePointWebPartsTestingChecklist.asp