1 / 47

Microsoft Australia Application Platform Special Interest Group

Microsoft Australia Application Platform Special Interest Group . John Hodgson Product Technology Specialist johnhodg@microsoft.com. Agenda. Development Options Development Environment Web Part Deployment Methods Debugging Options Distribution And Management Document and Lists access

philena
Download Presentation

Microsoft Australia Application Platform Special Interest Group

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. Microsoft AustraliaApplication Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com

  2. Agenda • Development Options • Development Environment • Web Part Deployment Methods • Debugging Options • Distribution And Management • Document and Lists access • Site and List Definitions • Future Of Web Parts (i.e., “Whidbey”) • Additional Resources

  3. Programs Servers Services

  4. Enterprise Portal Solution built on top of Windows SharePoint Services Hub and Aggregator for SharePoint personal, team and portal sites • SharePoint Portal Server • News and Links • Site Directory and Connections • Personal Sites • Audience Targeting • Index, Search and Alerts • Single Sign-On • BizTalk Integration Team Collaboration Solution well beyond file servers Scalable Workspace Platform • SharePoint Services • Document Storage and Collaboration • Flexible Lists • Web Part Pages • Page Personalization • Site Life Cycle Management • Scale-Up/Out Foundation SharePoint Investments

  5. SharePoint Out of The Box

  6. Development Options • Web Parts • ASP.NET • Document Library Events • Templates

  7. Development Environments • One machine method • Your “workstation” is Windows Server 2003 • http://www.msfn.org/win2k3/ • Two (or more) machine method • Develop on Windows XP • Deploy to Windows Server 2003 • On local Virtual PC or VMWare image • On remote development server

  8. Development Workstation Requirements • Visual Studio .NET • 2002 or 2003 • Ignore its warning about FrontPage Server Extensions • Web Part Project Template for Visual Studio .NET • http://msdn.microsoft.com/sharepoint • Copy object model DLLs from Server • C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\ISAPI • Microsoft.SharePoint.DLL • Microsoft.SharePoint.Portal.DLL • Microsoft.SharePoint.Portal.SingleSignon.DLL • Microsoft.SharePoint.Portal.SingleSignon.Security.DLL

  9. Debugging Web Parts • Methods • Direct • Attach to instance of W3WP.EXE • “Automatic” • Denote URL of a given Web Part Page as application start page • You’re really debugging the page, not the Web Part assembly • One server per developer is the ideal • Not polite to pause shared Web server • If multiple instances, not easy to identify which instance of W3WP.EXE is “yours” • Web.config has useful settings

  10. Debugging Web Parts (cont.) • Deploying to the GAC makes debugging a little harder • Must be able to reach PDB file • Options: • Deploy to the bin directory while debugging • Use manual installation • Use gacutil -i on the PDB afterstsadm …… -globalinstall • Default.aspx?contents=1

  11. Web.Config Settings • Turn on debugging • <SharePoint> <SafeMode CallStack=“true" /> • <system.web> <customErrors mode="Off" /> • Change site’s Trust Level for the site • <system.web> <trust level="WSS_Minimal" originUrl= ""/> • Also “WSS_Medium” or “Full”

  12. Web.Config Settings (cont.) • Other Web Part settings under <SharePoint> • <SafeMode MaxControls="50" CallStack="false" /> • <WebPartLimits MaxZoneParts="50" PropertySize="1048576" /> • <WebPartCache Storage="CacheObject" /> • also “Database” or “None” • <WebPartWorkItem Timeout="7000" /> • <WebPartControls DatasheetControlGuid="65BCBEE4-7728-41a0-97BE-14E1CAE36AAE" /> • Substitute your own Datasheet control instead of the Office 2003 default • <OnlineLibrary Url="http://r.office.microsoft.com/r/hlidAwsGallery" /> • Also configurable in SharePoint Central Administration

  13. Distributing Web Parts • CAB files • Two-step process with STSADM • Stsadm –o addwppack –filename filename • Stsadm –o addwppack –name filename • Use WPMove Web service • Download from GotDotNet • MSI files • Install directly on each server

  14. Distributing Web Parts • Site definitions/templates • Can include custom Web Part pages • DWP info embedded as XML data islands • Converted to DB entries after page is processed • Site definitions can also include • Custom lists and libraries • Custom ASPX pages • Event handlers • Design elements and resources

  15. Connecting Parts Together • Parts sharing data through events • Imagine audio signals • Consumer and provider of data • Client and server interfaces • IList • IRow • ICell • IFilter • IParams • Transformers

  16. Developing Web Parts

  17. Accessing List DataObject Model • Available objects under Microsoft.SharePoint namespace: • SPList – Basic list object for getting to list data • SPListCollection – Collection of list objects • SPListItem – Item/Row in a list • SPListItemCollection – Collection of list items • SPView – View of a SharePoint list • SPField – Field/Column in a list • SPListTemplate – Template of a list

  18. Accessing List DataWeb Services • Remotely view and edit SharePoint List data • http://[server]/_vti_bin/Lists.asmx • Operations available

  19. ASP.Net Apps

  20. Accessing Document LibrariesObject Model • Available objects under Microsoft.SharePoint namespace: • SPFile – File object • SPFileCollection – Collection of files • SPFileVersion – Version of a file • SPFolder – Folder object • SPDocumentLibrary – Document Library object • SPDocDiscussion – Discussions on a file • SPDocTemplate – Used when creating a new file

  21. Accessing Document Libraries

  22. Extending Document LibrariesEvent Handlers • Useful for implementing workflow • Used by TeamPlate, SourceCode, Nintex • Useful for triggering business logic • Logging, notification, etc… • BizTalk Server 2004 Adapter now available • Types of events • CheckIn, CheckOut, UncheckOut • Copy, Move, Delete, Insert, Update • Events are asynchronous • Can not prevent deletions • Can not get document data

  23. Document Library Events

  24. Site / List Templates • What is a Site Definition? • What is a Custom Template? • What is a List Definition? • What is a Custom List Template?

  25. Why Create Site Definitions? • Don’t take our word for it – look at: • Visual Studio Team System • BizTalk Server 2004 Business Activity Monitor • Microsoft Business Systems Business Portal for Great Plains • Project Server 2003 • SharePoint Portal Server 2003 • Class Server (v.next)

  26. Everything is underneath: C:\Program Files \Common Files \Microsoft Shared \web server extensions \60\template File Scopes Server Language E.g., \1033 Site Definition E.g., \1033\STS List Definition E.g., \1033\STS\LISTS\DOCLIB Minimalistsite definition List definition Site definition Enumeration of site definitions Site Definition Files

  27. <FieldType="Choice" BaseType="Text" Name="Area"> <CHOICES> <CHOICE>Views</CHOICE> <CHOICE>Site Design</CHOICE> <CHOICE>Layouts</CHOICE> <CHOICE>Schema Design</CHOICE> <CHOICE>Fields</CHOICE> <CHOICE>Forms</CHOICE> <CHOICE>Projects</CHOICE> <CHOICE>Inter-Team Issues</CHOICE> <CHOICE>Schedule</CHOICE> <CHOICE>Spec</CHOICE> <CHOICE>Headcount</CHOICE> <CHOICE>Misc</CHOICE> </CHOICES> </Field> SCHEMA.XML Fields

  28. <ViewBaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="BLog HTML Preview" DefaultView="FALSE" Url="Forms/BLogAsHTML.aspx"> <GroupByHeader/> <GroupByFooter/> <ViewHeader/> <ViewBody/> <ViewFooter/> <PagedRowset/> <PagedRecurrenceRowset/> <RowLimit Paged="FALSE">1</RowLimit> <ViewEmpty/> <ViewBidiHeader/> <Toolbar Type="Standard" /> <ViewFields /> <Query /> </View> SCHEMA.XML Views

  29. <ToolbarPosition="After" Type="Freeform"> <HTML><![CDATA[ <table> .. more HTML..]]></HTML> . . <URL Cmd="New" /> . . <HTML><![CDATA[ HREF="JavaScript:void window.open(']]></HTML> . . <HttpVDir/> . . <HTML><![CDATA[');]]></HTML> </Toolbar> SCHEMA.XML Toolbars

  30. <FormType="DisplayForm" Url="DispForm.aspx" WebPartZoneID="Main"> <ListFormOpening/> <ListFormButtons/> <ListFormBody/> </Form> SCHEMA.XML Forms

  31. Site Definition Walk-Through

  32. How To Quickly Create Your Own Site Definition • Copy the ‘sts’ directory and rename it ‘stsfoo’ • Copy WEBTEMP.XML to WEBTEMPFOO.XML • Remove all but one Configuration from WEBTEMPFOO.XML • Give your Configuration an interesting title • Ensure that ‘Template Name’ points to ‘stsfoo’ • Give ‘Template ID’ a number greater than 10,000 • Run IISRESET • Create a new Site

  33. Advanced Site Definition Features • Specify a page to go to immediately after site creation • ExecuteUrl Url="config.aspx" • Replace top navigation in site pages • AlternateHeader="PortalHeader.aspx“ • Alter JScript functions (e.g. customize edit menu dropdown) • CustomJSUrl=“owscustom.js” • Add/Edit CSS attributes • AlternateCSS=“owscustom.css” • Customize the File Open/Save dialog in Office • FileDialogPostProcessor ID=[GUID] • Disable features on your site (Backup, Subsite Creation, etc...) • DisableWebDesignFeatures="wdfbackup; wdfNewSubSite“ • Provide a custom security provider to SharePoint Portal Server search • ExternalSecurityProvider ID=[GUID] Type=“...”

  34. Editing Deployed Site Definitions • ONLY modify deployed site definitions if you absolutely have to. • If possible: • Build new versions of site definitions • Operate new version in parallel with old versions • Ensure that new sites use the new versions. • Mark old site definitions as hidden but left intact • Data can be moved from old sites to new sites • Old sites can be updated in a controlled fashion with the object model

  35. Editing Deployed Site Definitions (cont.) • Guidelines for modifying a site definition already in use • Adding features is less dangerous than changing or deleting them • Changing often results in loss of data • Deleting often results in broken views • Add to the end of the <Fields> section to avoid shuffling your data • If you rely on ghosting to push your changes to all sites, beware of customized pages stored in the database • The ‘vti_hasdefaultcontent’ field available from SPFile.Properties can be used to determine whether or not a file is ghosted • If your changes affect create-time sections of the site definition, use the object model to simulate these actions on existing sites

  36. Tips And Tricks • Create a new site definition – don’t modify a shipped site definition • Start from a copy of a similar site definition • Marking configurations as ‘Hidden’ in WEBTEMP.XML is a good way to create site definitions for use by custom applications (or retire outdated ones) • The ‘ExportList’ method documented in the ‘URL Protocol’ section of the SDK is a convenient way to generate CAML • Customizations to meeting workspaces need to retain a template ID of ‘2’ • SharePoint ‘applications’ often combine Web Parts, Event Handlers, Web Services, and Site Definitions • Use the DisableWebDesignFeatures attribute of the Project element in ONET.XML to block FrontPage

  37. FrontPage 2003

  38. Understanding “Ghosting” • Pages and list schema are read from the site definition files and cached at IIS process startup • Page source is on the disk, not in the DB • Pulled from the cache at runtime • It still appears to be present in the site, hence the term “ghosted” • Pages are only written to the database when customized within a site • Browser-based customization (i.e. adding/removing web parts) does not change the actual ASPX pages, hence doesn’t unghost • FrontPage customization often changes ASPX pages • Maximizes scalability • Reuse un-customized pages across sites • Reduce unnecessary data storage and retrieval

  39. Windows SharePoint Services And ASP.NET “Whidbey” • Current version of Windows SharePoint Services will work on ASP.NET “Whidbey” • Windows SharePoint Services, after Service Pack 2, will run as-is on Whidbey runtime • ASP.NET team will provide a Windows SharePoint Services Web Part that can encapsulate a “Whidbey” Web Part • Next version of Windows SharePoint Services will build on top of ASP.NET “Whidbey” • Backward-compatible object model will permit continued use of current Web Parts

  40. ASP.NET “Whidbey” Web Parts • Web Part concept integrated directly into ASP.NET • Can be used in any type of Web site • Windows or form authentication • Provider model for persistence/personalization • Fully integrated into ASP.NET control model • Any ASP.NET server-side control can be a Web Part • User Controls can also be Web Parts • Connections are significantly enhanced • One attribute (c.f., overriding multiple methods) • Rich data types (c.f., list, row, cell, parameters) • Zones become objects, not just containers • Great Visual Studio designer experience

  41. When To Build What • Pre-Whidbey RTM deliverables should be built using current Windows SharePoint Services Web Part infrastructure • Such Web Parts will run in the next version of Windows SharePoint Services • By all means, experiment with Whidbey Web Parts during its beta period • When ASP.NET “Whidbey” ships, build new Web Parts using the new technology • Current Windows SharePoint Services sites will be able to use them once wrapper is ready

  42. Developer Information http://msdn.microsoft.com/sharepoint http://gotdotnet.com/team/sharepoint Product Information http://microsoft.com/sharepoint Web Component Directory http:/microsoft.com/sharepoint/webparts Third-Party Sites barracuda.net gotsharepoint.com sharepointd2d.com sharepointexperts.com sharepointserver.com sharepointsolutions.com sharepointuniversity.com spsfaq.com wssdemo.com wssfaq.com Web-Based Resources

  43. Books • The Rational Guide To: Building SharePoint Web Partsby Darrin Bishop (Mann – coming soon) • Microsoft SharePoint: Building Office 2003 Solutionsby Scot P. Hillier (APress)

  44. More Books • Building ASP.NET Server Controlsby Rob Cameron, Dale Michalk (APress) • Developing Microsoft ASP.NET Server Controls and Componentsby Nikhil Kothari, Vandana Datye (Microsoft Press) • Professional ASP.NET Server Controls: Building Custom Controls with C#by Matt Butler, Thiru Thangarathinam, Matt Milner, Michael Clark, Ryan O'Keefe, Angelo Kastroulis, Jan Narkiewicz, Daniel Cazzulino (Wrox)

  45. Give Documentation Feedback • Windows SharePoint Serviceswssdocs@microsoft.com • Microsoft Office SharePoint Portal Server 2003spsdoc@microsoft.com

  46. Microsoft Events and Communities • Not getting event invites anymore? Don’t know what's on in your state? • Subscribe to TechNet Flash via TechNet Lounge • http://www.microsoft.com/australia/technet • Visit MSDN Community Website and join MSDN Connections • http://www.microsoft.com/australia/msdn • Subscribe to MSDN Flash Newsletter (events) • http://msdn.microsoft.com/flash • Or…Visit the Profile Center and subscribe to all of them • https://profile.microsoft.com/RegSysSubscriptionCnt/SubCntDefault.aspx

  47. © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

More Related