330 likes | 462 Views
.NET Development for Microsoft SharePoint™ 2003 Technologies. Bob German Technology Architect Microsoft Technology Center – Boston. Agenda. What is this SharePoint thing (and why should I care?) Product Architecture and Development Basics Web part development
E N D
.NET Development for Microsoft SharePoint™ 2003 Technologies Bob GermanTechnology ArchitectMicrosoft Technology Center – Boston
Agenda • What is this SharePoint thing(and why should I care?) • Product Architecture and Development Basics • Web part development • Data management via lists and document libraries • UI Customization • Application Integration Options • SharePoint Portal Server 2003:Overview and Extensibility Options • Summary
SharePoint™ 2003 Technologies Correcting some Common Misconceptions: • There is no product called “SharePoint” • Windows SharePoint Services 2003 • SharePoint Portal Server 2003 • SharePoint 2003 products are scalable and managable • Stateless web servers and SQL Server back-end • It’s come a long way since 2001! • FrontPage 2003 is not a toy • Greatly improved in 2003 • SharePoint-aware – some tasks best done in FrontPage, others in Visual Studio 2003
SharePoint Family SharePoint Portal Server 2003 Enterprise Portal Solution Team Collaboration Solution Windows SharePoint Services 2003 Windows Server 2003 Technologies Site Framework Foundation ASP.Net SQL Server
SharePoint Family • Windows SharePoint Services • Site Framework Foundation • Web Parts/Web Parts Pages • Page ghosting • Lists • Sites • Collaboration Features • Document management • Workspace sites • Surveys, discussions, etc. • SharePoint Portal Server • An application of WSS • Areas and Listings – provides organization/structure • Search, Alerts • User Profiles, Audiences, “My Site”
Windows SharePoint Services 2003:“Out of the Box” experience Demonstration
SharePoint Development • Web Part Development • Event Handlers • UI Customizations • Style sheets • FrontPage customizations • Custom Pages • Custom Site Definitions • Web Services Interfaces
Web Parts and Page Rendering • Web Parts are* ASP.NET WebControls • Web Parts Pages are* ASP.NET Pages • Standard .ASPX format (without inline script) • Standard page object is in class hierarchy • Can use standard ASP.NET server (a.k.a. custom) controls ASP.NET Page Web Part Framework ASP.NET Page Zone 1 Zone 3 Zone 2 Content DB Web Part * Inheritance relationship
Web Part Galleries • “Hello World” Web Part Demonstration
SharePoint Page Rendering • ISAPI filter handles • Ghosting • Web parts (if applicable) • API context • ASP.NET handles • Page and control rendering • By this time • Ghosted pages appear to be just pages • Web parts appear to be just web controls IIS 6.0 ISAPI Filter Web Part Framework Site V. Server Profile ASP.NET
Composite Applications WebPart Interaction Personalization Categorization Search Single Sign-On Web Part Web Part Web Part Portal SharePoint Portal Single Sign-On Orchestration Business Rules Schema Mapping Load Balancing Sync/Async Auditing WebServices Integration: BizTalk App Server: Windows.Net Process and Integration BT Adapters Connectors SAP Siebel . . . Applications
Application Surfacing Techniques • Connected Web Parts Demonstration
Great Web Parts Factors that separate average Web Parts from great Web Parts:(a.k.a., what most people haven’t quite figured out) • Reusability – smart use of metadata and connections • State management • Caching • Deployment and security • Logging and debugging
Sites and Workspaces • Refer to WSS (whether or not SPS is installed) • Technically, Site == Workspace • “Top-level” sites are islands (without SPS site directory) • Child sites are sub-directories below their parents • “Top-level site” and its children are called a “Site Collection” • Site collection stores common: • Web Part Gallery • List Template Gallery • Site Template Gallery Top-Level Site Child Site Child Site Child Site Child Site Site Collection
Site Templates Demonstration
Page Customization The best thing about SharePoint technologies:Ready-to-use “Out of the Box” UI The worst thing about SharePoint technologies:Ready-to-use “Out of the Box” UI Customizing the SharePoint look and feel: • Themes • Cascading Stylesheets • FrontPage 2003 • Site Definitions
Themes and Cascading Stylesheets • Editing with FrontPage 2003 Demonstration
Site or Area 1 Site or Area 4 Site or Area 1 2 3 4 2 3 SharePoint “Ghosting” Physical File Structure Apparent File Structure SharePoint Database
Ghosting and Site Definitions • Pages and list schema are read from the site definition files and cached at IIS process startup • 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 changes ASPX pages, always unghosts • Scalability impact: • “One-off” unghosting is NO PROBLEM • Site templates can propagate hundreds orthousands of unghosted pages: PROBLEM
Templates vs. Site Definitions • Site and List Templates • Stored in the database • Starting point for a site or list(if the template changes, derived sites and lists stay the same) • Easy, end-user accessible • Site Definitions • Stored in the filesystem (all the goodies which are ghosted) • Basis for a site or list(if the site definition changes, all derived sites and lists change – or break if you’re not careful!) • Best practice for scalability
Resources • SharePoint Products and Technologies on MSDN http://msdn.microsoft.com/sharepoint • User Samples and informal Resource postings on GotDotNet http://www.gotdotnet.com • SharePoint Customizationhttp://www.sharepointcustomization.com • SharePoint FAQhttp://www.spsfaq.com • Web Component Directoryhttp://www.microsoft.com/sharepoint/webparts • Product Informationhttp://www.microsoft.com/sharepoint • Newsgroups on msnews.microsoft.com
SharePoint API’s • WSS Object Model • WSS Web Services • SPS Object Model • SPS Web Services • Other interfaces: • HTTP • WebDAV
Accessing List DataWSS Object 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
Accessing List DataWSS Code Snippet • Get a SPList or SPDocumentLibrary object: • SPList mylist = web.Lists[“Events”]; • SPDocumentLibrary myDocLib = (SPDocumentLibrary) web.Lists[“Shared Documents”]; • Call .Items property to get list items collection: • SPListItemCollection items = mylist.Items; • Call GetItems() method and pass a SPQuery object to get subset of list items: • SPListItemCollection items = mylist.GetItems(query);
Accessing List DataWSS Code Snippet • To get data for a field, specify field name in indexer for an SPListItem: foreach (SPListItem item in items) { Response.Write(item["Due Date"].ToString()); Response.Write(item["Status"].ToString()); Response.Write(item["Title"].ToString()); } • Note: SPEncode.HtmlEncode() should be used for HTML output
Web Clip \ Page Graft Web Clip \ Page Graft Web Clip \ Page Graft Data Cache \ Warehouse Data Cache \ Warehouse Web Part Web Part Web Part Web Part Web Part Web Part Web Part Web Part Web Part Web Part Web Part Web Part Web Part Web Part Web Part DB/DW DB/DW HTML / XML / HTTP HTML / XML / HTTP HTML / XML / HTTP App App App App App App App App App App App App App App App App App App App App Point to Point Point to Point App/Integration Server Web Part Web Part Web Part Web Part Web Part Web Part Web Part Web Part Web Part App / Integration Server WebServices / SQL / Custom WebServices / SQL / Custom App App App App App App App App App App App App Web Part Integration Models
SharePoint Portal Server • Application written on WSS platform • Adds Portal features, including: • Flexible navigation • Audience Targeting • Search • Sites Directory • Listings • My Site • Single Sign-On
SharePoint Search • Content Sources • Microsoft SharePoint™ Portal Server sites • Microsoft Windows SharePoint™ Services sites • Exchange 2000 Server folder • File share • Lotus Notes™ • Any web page orweb site • Site registry • Interactive Search • Alerts
Microsoft Search Service Filter Daemon Gatherer Protocol Handler Search Engine Index Engine User queries Word-breakers IFilters Full-text Index Notifications(optional) Stemmers Core Search Architecture Content Source Documents
Programming Search • Using the Search Engine • Metadata Definition • Search.asmx • SQL Variant for queries • Enhancing the Search Engine • IFilters • Protocol Handlers