Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg...

43
Windows SharePoint Windows SharePoint Services (Part 2) Services (Part 2) including Enterprise including Enterprise Search Search David Gristwood James Akrigg Microsoft Limited

Transcript of Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg...

Page 1: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Windows SharePoint Windows SharePoint Services (Part 2)Services (Part 2)including Enterprise including Enterprise SearchSearch

David GristwoodJames AkriggMicrosoft Limited

Page 2: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

AgendaAgenda

Windows SharePoint Services - part 2

Enterprise Search

Page 3: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

AgendaAgenda

Windows SharePoint Services part 2Follow on from part 1User Interface focus

Uses HelpDesk sampleQuick review

TopicsMaster PagesWeb PartsForms and rendering

Page 4: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

SharePoint for ASP.NET SharePoint for ASP.NET DevelopersDevelopers

Page 5: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

ASP.NET Integration ASP.NET Integration OverviewOverview

SharePoint v3 has better integration with ASP.NET

Built on top of ASP.NET

More ASP.NET features

“shine through”

Still some conceptualdifferences; SharePoint has

Template Model for fast site creation

Users can edit and customise pages

ASP.NET 2.0ASP.NET 2.0

Windows Windows SharePoint SharePoint Services Services

“v3”“v3”

Windows Windows SharePoint SharePoint Services Services

“v2”“v2”

ASP.NET 1.1ASP.NET 1.1

Page 6: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Under the coversUnder the covers

SharePoint v2Integrated II6 and ASP.NET 1.10 via ISAPI

Requests routed to Windows SharePoint Services before ASP.NET

Issue around context, extending sites, etc

SharePoint v3Uses ASP.NET 2.0 HttpModule and HttpHandler

Fully initialised before Windows SharePoint Services code executes

IIS Metabase Wildcard means all requests routed regardless of extension (e.g. .pdf, .docx, etc)

Page 7: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

.ASPX Page Architecture.ASPX Page ArchitectureWSS v2

ASP.NET 1.1 page parser only works with files in local file systems

SharePoint architecture stores pages in SQL Server

Windows SharePoint Services v2 team had to build own .ASPX parser

Didn’t support all features

WSS v3ASP.NET 2.0 virtual path provider removes dependency on file system

SharePoint v3 has SPVirtualPathProvider for SQL Server

Page 8: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Other differencesOther differences

Need to understand template model

No-code Pages, so code behind model

SafeControls list of allowable controls

Template Template ASPX PagesASPX Pages

_layouts _layouts Application Application ASPX PagesASPX Pages

Customized Customized ASPX Pages ASPX Pages

Web Front Web Front EndEnd

Content Content DatabaseDatabase

Page 9: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Master PagesMaster Pages

Page 10: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Master Page ConceptsMaster Page Concepts

One page (master) holds the “chrome”

Many pages point at the Master

Master Page defines “placeholders” which can be overridden in child page

Master Page “Chrome” (default.master)Master Page “Chrome” (default.master)

Content Page Content Page (default.aspx)(default.aspx)

Page 11: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Master Pages ConceptsMaster Pages Concepts

Master file: “A.master”

Content file: “B.aspx”

<%@ master %>

Rendered web page

<%@ page masterpagefile=“A.master”%>

<asp:ContentPlaceHolder runat=“server” ID=“Main” />

<asp:ContentPlaceHolder runat=“server” ID=“Footer” />

<asp:Content runat=“server” ContentPlaceHolderID=“Main”>

</asp:Content>

<asp:Content runat=“server” ContentPlaceHolderID=“Footer”>

</asp:Content>

Page 12: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Master Master Pages Pages PlaceholderPlaceholderss

Page 13: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Master Pages In WSSMaster Pages In WSS

• Each WSS site has a Master Page Gallery• Site metadata indicates where WSS looks

for a master page • Level of indirection so required to change

every page to use different master page• Can be set programmatically

• Tokens• ~masterurl/default.master• ~masterurl/custom.master• ~sitecollection/default.master• ~site/default.master

Page 14: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

SharePoint Page LayoutSharePoint Page Layout

default.aspx

spweb.MasterUspweb.MasterUrlrl

.aspx .master

Content Pages - http://myserver/

/ /_catalogs/masterpage/allitems.aspx

.aspx

/shared documents/

create.aspx

.aspx

/_layouts/

Application Pages

.master

/_layouts/

application.master

File System - \.. \web server extensions\12\

default.aspxSiteTemplates\STS Global\

viewpage.aspx

Pages\

default.master

“ghosting” / “uncustomized page”

default.master

Page 15: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Master Pages Master Pages In SharePoint SitesIn SharePoint Sites

Master Page via FeatureMaster Pages in SharePoint Designer

Page 16: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Extending The User Extending The User InterfaceInterface

Hooks in the User Interface to add your own

Extensible Toolbars, Menus, Settings Pages

Link to pagesCan use ASP.NET controls on toolbarsAssociate by List type, Content type, File Type

All feature based

Page 17: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Display Form ToolBarDisplay Form ToolBar

View View ToolBarToolBar

Welcome Welcome MenuMenu

Site ActionsSite Actions

DropdownsDropdowns

Page 18: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Extending and Extending and Customising the UI:Customising the UI:Enterprise SearchEnterprise Search

Page 19: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Search CenterSearch Center

Page 20: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Anatomy Of Results PageAnatomy Of Results Page

SEARCH BOX

CORE SEARCH RESULTS

PAGINATIONSTATISTICS

ACTION LINKS

MATCHING KEYWORDS

AND BEST BETS

HIGH CONFIDENCE MATCH

HIDDEN SHARED OBJECT

Page 21: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Search UI ProgrammabilitySearch UI Programmability

Easy to powerful:Customize using web part properties

Customize using XSLT, XML, and scriptManipulate URL parameters

Build web parts and apps using the query OM

keyword and SQL syntax

Remote apps using the query web service

Page 22: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Customing Search Web Customing Search Web PartsParts

Search query and results

Page 23: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

POST or GETsearch results page

Query.Execute()Query.Execute()

Get Doc IDs from index,Properties from search DB

Get Doc IDs from index,Properties from search DB

Return results in set of IDataReader objects

Return results in set of IDataReader objects

Wrap results in XML

Wrap results in XML

•CSS applied•Client-side code runs

Get query, scope from request parameters

Get query, scope from request parameters

Get SELECT list from tool pane

Get SELECT list from tool pane

Build links withURL

parameters

Build links withURL

parameters

TransformRender

TransformRender

Change the transform

Edit style

sheets

Write custom Web Parts to

OM

Results Page Information Results Page Information FlowFlowBrowserBrowser

ServerServer

Search OMSearch OM

ServiceService

Page 24: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Customize UI With XSLTCustomize UI With XSLT

Web part property specifies query columns

Search web parts get results XML

Web parts apply transform to XML nodes

Search page URL parameters enablequery manipulations

Appropriate for scenarios requiring

Change results layout, look and feel

Keyword syntax queries

Page 25: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Web PartsWeb Parts

Page 26: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Web PartsWeb Parts

End-user customizable controls

Custom web parts popular extension point for developers

Web part framework now in ASP.NETSupport for assembly-based ASP.NET 2.0 partsGreat backwards compatibility with WSS v2 Web Parts

Improved user interface for Web PartsEasier to build solutions around dashboards

Page 27: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.
Page 28: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Types Of Web Types Of Web PartsParts

WSS v2 Web PartsMicrosoft.SharePoint.WebPartPages.WebPart

Some architectural changes requirede.g. Client Connections, Caching, Work Items

“rebased” to inherit from WebPart rather than Control class

Hybrid Web PartsMicrosoft.SharePoint.WebPartPages.WebPart

Use for Migration

ASP.NET Web PartsMicrosoft.Web.UI.WebControls.WebParts.WebPart

Main focus for WSS v3 development

Page 29: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

ASP.NET 2.0 Web PartsASP.NET 2.0 Web Parts

Adding a Web Part User ExperienceVisual Studio Web Part projectDeploying a Web Part as Safe Control

Page 30: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

ASP.NET Web Part ASP.NET Web Part ConnectionsConnections• “pump” data between web parts

• Users configure as required

• WSS v2 used Connection Types• Generic “late bound” model• ICell -> IField, IList -> Itable

• WSS v3 uses ASP.NET 2.0• New Custom connection interfaces and

Custom transformers• Automatic translation from WSS v2

types

Page 31: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

ASP.NET 2.0 ASP.NET 2.0 Web Part ConnectionsWeb Part Connections

HelpDesk Picker/Display Web Parts

Page 32: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Integration LimitationsIntegration Limitations

Cannot use ASP.NET 2.0 Web Part Pages

Not directly compatible as-isPages must include SPWebPartZones and SPWebPartManager

This is done to automatically handle compatibility issues

No built-in support for treating .ASCX files (user controls) as Web Parts

You can use .ASCXs in pages, thoughWrappers for .ASCXs can and will be created

Page 33: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

SharePoint Control LibrarySharePoint Control Library

Out of the box SharePoint controlsHave SharePoint look and feel

Controls:SPGridViewSPTreeViewField Controls

DateField, TextField, UrlField, UserField

Validators

Page 34: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

FormsForms

Page 35: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Forms In SharePointForms In SharePoint

Page 36: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

CAML (Collaboration Application Markup Language)

XML dialect for SharePoint list data, views, fields, queries, etc

Extremely performant

Deprecated for v3 for froms

Support for more commonly-used alternatives being added with each major release of WSS

Forms In SharePoint v2Forms In SharePoint v2

Page 37: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Forms In SharePoint v3Forms In SharePoint v3

• ASP.NET Control Templates based model

• Override out-of-box control templates

• Support custom Field Types• SPDataSource to bind ASP.NET

controls• XSLT-based DataForms• Limitations

• Out-of-Box List Views are still CAML XML-based

Page 38: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

ASP.NET FormsASP.NET Forms

Page 39: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

XSLT-Based Forms And XSLT-Based Forms And ViewsViews

DataViewWebPart (deprecated)

DataFormWebPartMisnomer - for views and formsTake data from SP and render it via XSLTCan query SQL Server, OLEDB, Web Services

Use SharePoint Designer to create these

Page 40: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Extensible Field RenderingExtensible Field Rendering

E.g. Business Data Catalog has its own extensible field rendering

Define at two levels

1.ViewsMust use CAML XML for view renderingField’s base type is the default

2.FormsShare the CAML XML view renderingUse a custom control for form rendering

Page 41: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

Extensible Field Extensible Field Type RenderingType Rendering

Page 42: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

SummarySummary

Tools for your web application toolbox

SharePoint Designer Master Pages and tokensFeaturesReusable SharePoint Controls Web part FrameworkFormsExtensible Types

Page 43: Windows SharePoint Services (Part 2) including Enterprise Search David Gristwood James Akrigg Microsoft Limited.

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