Title: 'NET Development for Microsoft SharePoint 2003 Technologies
1.NET Development for Microsoft SharePoint 2003
Technologies
- Bob GermanTechnology ArchitectMicrosoft
Technology Center Boston
2Agenda
- 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 2003Overview and
Extensibility Options - Summary
3SharePoint 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
- Its 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
4SharePoint Family
Enterprise Portal Solution
SharePoint Portal Server 2003
Team Collaboration Solution
Windows SharePoint Services 2003
Windows Server 2003 Technologies
Site Framework Foundation
ASP.Net
SQL Server
5SharePoint 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/structu
re - Search, Alerts
- User Profiles, Audiences, My Site
6Demonstration
- Windows SharePoint Services 2003Out of the
Box experience
7SharePoint Development
- Web Part Development
- Event Handlers
- UI Customizations
- Style sheets
- FrontPage customizations
- Custom Pages
- Custom Site Definitions
- Web Services Interfaces
8Lists Rule in SharePoint!
- Virtual table storing item data and metadata
- Building block for collaborative applications
- Lists are everywhere!
- Obvious stuff (contacts, tasks, links, etc.)
- Clever stuff (calendars, surveys, threaded
discussions) - With attached binaries (document libraries, forms
libraries, picture libraries) - In Portal Areas (Listings)
- Custom lists and list templates
- Metadata Auto-promotion from Office
9Web 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 2
Zone 3
Content DB
Web Part
Inheritance relationship
10Demonstration
- Web Part Galleries
- Hello World Web Part
11SharePoint 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
12Composite 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 Aud
iting
WebServices
Integration BizTalk
App Server Windows.Net
Process and Integration
BT Adapters
Connectors
SAP
Siebel
. . .
Applications
13Web Part Development
- SharePoint 2003 Web Parts are controls which
- Allow non-technical end users to create site
pages - Live in Web Part Zones(or are hard-coded on
pages via FrontPage or Visual Studio more on
that later) - Are connectable (pass data to one another)
- Have metadata (to configure for all users or
individual users) - Precursor to .NET 2.0 Web Parts (will converge in
next version)
14Building Web Parts
- Quick Approach
- Define Properties
- Emit a lot of HTML in RenderWebPart
- Better Approach (Composite Control)
- Define properties
- Override CreateChildControls
- a. Instantiate controls and add to Controls
collection - b. Define OnLoad event handler for each control
- Implement OnLoad event handler(s)
- Have controls render themselves during
RenderWebPart - Cheating
- Smart Part (hosts user control with caveats)
- Client-side only (script as metadata)
15More Web Part Development
- Exception Handling
- Web Parts as User Controls
- Web Part Connections
16Demonstration
- Application Surfacing Techniques
- Connected Web Parts
17Great Web Parts
- Factors that separate average Web Parts from
great - Web Parts(a.k.a., what most people havent
quite figured out) - Reusability smart use of metadata and
connections - State management
- Caching
- Deployment and security
- Logging and debugging
18Sites, Workspaces and Areas
- Collection of pages, lists and other information
to present a set of related information - Analogous to a Site in IIS
- Same as a Site or Webin FrontPage
- Windows SharePointServices
- Team Sites
- Meeting workspaces
- Document workspaces
- SharePoint PortalServer
- Areas
- Personal sites(My Site)
19Sites 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
20Templates (WSS Only)
- List Templates and Site Templates
- Allows end-users to reuse and share
customizations - Stored in site-collection level galleries
- Packaged as .STP files (import and export from
gallery) - A FrontPage .FWP file is almost the same thing
- Rename to end in .CAB to see whats inside!
- Template changes do not affect existing sites and
lists
21Demonstration
22Page Customization
- The best thing about SharePoint
technologiesReady-to-use Out of the Box UI - The worst thing about SharePoint
technologiesReady-to-use Out of the Box UI - Customizing the SharePoint look and feel
- Themes
- Cascading Stylesheets
- FrontPage 2003
- Site Definitions
23Demonstration
- Themes and Cascading Stylesheets
- Editing with FrontPage 2003
24Ghosting and Site Definitions
- FrontPage 2003 and CSS Changes are nice but
- CSS options are limited
- FrontPage 2003 limits scalability in some cases
- You may want to modify more than web part pages
- Administrative pages
- Javascript/client-side behavior
- Requires understanding whats going on at a
deeper level ghosting and site definitions
25SharePoint Ghosting
Physical File Structure
SharePoint Database
Apparent File Structure
26Ghosting 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 doesnt 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
27Where is the content?
- Site definitions
- Admin Pages
- Javascript
- Style sheets
- Web part code
Files
Application
- Lists
- Web part placement,
- metadata
- Site metadata
- User Content
SQL
Content
28What Is A Site Definition?
- Each Site Definition defines a unique type of
SharePoint site - Multiple site definitions ship in Microsoft
Windows SharePoint Services - Team Site
- Meeting Workspace
- Document Workspace
- Still more ship in Microsoft Office SharePoint
Portal Server 2003 - Portal Topic Area
- Portal My Site
- And others are available through other products
- Great Plains
- Project Server 2003
29What Is A Site Definition? (cont.)
- Set of files located in the file system of a
Windows SharePoint Services Web server (incl.
SharePoint Portal Server) - XML files
- ASPX pages
- Document templates (.dot, .htm, etc.)
- Content files (.gif, .doc, etc.)
- Site definitions specify list types, Web pages,
navigation, and site content - Site definitions reference installed list
definitions, Web Parts, event handlers, and
custom JScript
30Templates 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 youre not careful!) - Best practice for scalability
31Resources
- SharePoint Products and Technologies on MSDN
- http//msdn.microsoft.com/sharepoint
- User Samples and informal Resource postings on
GotDotNet - http//www.gotdotnet.com
- SharePoint Customization http//www.sharepoint
customization.com - SharePoint FAQ http//www.spsfaq.com
- Web Component Directory http//www.microsoft.c
om/sharepoint/webparts - Product Information http//www.microsoft.com/s
harepoint - Newsgroups on msnews.microsoft.com
32Questions?
33SharePoint APIs
- WSS Object Model
- WSS Web Services
- SPS Object Model
- SPS Web Services
- Other interfaces
- HTTP
- WebDAV
34Accessing List DataWSS Object Model
- Available objects under Microsoft.SharePoint names
pace - 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
35Accessing List DataWSS Code Snippet
- Get a SPList or SPDocumentLibrary object
- SPList mylist web.ListsEvents
- SPDocumentLibrary myDocLib
(SPDocumentLibrary) web.ListsShared
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
)
36Accessing 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
37Web Part Integration Models
38SharePoint Portal Server Overview
39SharePoint Portal Server
- Application written on WSS platform
- Adds Portal features, including
- Flexible navigation
- Audience Targeting
- Search
- Sites Directory
- Listings
- My Site
- Single Sign-On
40Single Sign-on
- Credential Mapping Database
- Per-user credentials
- Group credentials
- Programmable at display or application tier
- Distributed Ticketing
- Integrated into BizTalk adaptors (Actional
first) - Does not require Windows.Net/2000 AD deployment
WP WP WP
1. Authenticate
Web FE
3b. Pass ticket
WS Adaptor For BizTalk
BizTalk Adaptors
BizTalk 2002
5. Login with credentials
2a. Retrieve credentials for app/user
2b. Retrieve ticket for app/user
4. Retrieve credentials for ticket
SSO
Ex. SAP
Encrypted DB storage
41SharePoint 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
42Core Search Architecture
Content Source
Documents
43Programming Search
- Using the Search Engine
- Metadata Definition
- Search.asmx
- SQL Variant for queries
- Enhancing the Search Engine
- IFilters
- Protocol Handlers
44Secure Searches
- When content source supports ACL, so does Search
- Windows file system
- Exchange
- SharePoint Portal Server/Windows Sharepoint
Services - Notes (via mapping layer)
- NT/AD groups must be domain-based and resolvable
by search server
45Scalable Indexing
Web
Files
User queries
Microsoft Exchange
Propagates
SPS
SearchServer
Notes
DedicatedIndex Builders
46Scalable Distributed Search
User queries
- Duplicated query servers
- Complete replacement of entire content and index,
including subscriptions on target - Useful for slow WANs
- Reduces load on network bandwidth
Search server
Search servers