building fast track external facing sharepoint site

21
1 External facing SharePoint site By Manish Rawat http://www.linkedin.com/in/manishra

Upload: manish-rawat

Post on 14-Jan-2015

2.818 views

Category:

Technology


2 download

DESCRIPTION

Explains external facing SharePoint site development experience, techniques in agile manner

TRANSCRIPT

Page 1: Building fast track external facing sharepoint site

1

External facing SharePoint site

By Manish Rawat

http://www.linkedin.com/in/manishra

Page 2: Building fast track external facing sharepoint site

2

Architecture and Design Choices

Page 3: Building fast track external facing sharepoint site

3

Planning - Key Decision Points

Structure

Web App & Site Collections

Site & Sub-sites hierarchies

Services

Managed Paths

Navigation

Host Headers

Site definition

Content Database separations

Objects Content Types

Site Columns

List and Libraries

Field types and Field control

Page Layouts

Master Pages

Reuse MOSS Web Parts

Strategy

Branding

Content Authors UI

Versioning and Workflow

Document Management

Search – Scope, Keywords, Best bets

Customization

Compliance requirement - SOX etc

Admin Backup Restore

Environment Needs –Farm Topology

Logging & Auditing policies

Compliance requirement - SOX etc

Zones & Alternate Access mapping (AAM)

External Access – Internet, Extranet

Security – Roles, Permission

Page 4: Building fast track external facing sharepoint site

4

Planning - Structure

Structure

Web App & Site Collections

Site & Sub-sites hierarchies

SSP Services

Managed Paths

Navigation

Host Headers

Site definition

Content Database separations

• Site Collections– It’s container of sites. Decisions

• Number (How many) and Types (What kind) needed

• Host header needs

• Managed Paths – Enables where site collection will get created & help interpret URLs to determine site paths

• Separate Content Database per site collection possible.Helps Performance and Scalability but rolling up data (query)from multiple Site collection is not OOTB

• Unique administrative & Security privileges per site collection

• Backup/Restore can happen per site collection

Page 5: Building fast track external facing sharepoint site

5

Planning – Structure… continued• SSP (v 2007) - hosting shared services that will be used any MOSS

Web applications.

• Search

• BDC – Business Data catalog to connect to any Line of Business (LOB) apps e.g. SAP

• User Profiles

• Usage Reporting …..

• Scripting

• Reusable Script needed. Useful in medium to large teams.

• STSADM is main scripting tool. Free Extensions available.

• STSADM scripts have options are not available via UI. E.g. assigning Specific DB to Site collection.

• Navigation : Custom Navigation VS. Built in.

Page 6: Building fast track external facing sharepoint site

6

Planning - Strategy

• Branding :

• Consistent Look and feel in different sites.

• UI assets location

• Document Management

• Content Organization

• Content Presentation & Customization

• Content Publishing – OOTB publishing including Quick Deploy

• Search : Sources, Scope, Keywords, Crawl, Best bets

• Versioning and Workflow:

• List versioned

• Custom Workflow needs

Strategy

Branding

Content Authors UI

Versioning and Workflow

Documents management

Search – Scope, Keywords, Best bets

Customization

Compliance requirement - SOX etc

Page 7: Building fast track external facing sharepoint site

7

Planning - Objects

Objects Content Types

Site Columns

List and Libraries

Field types and Field control

Page Layouts

Master Pages

Reuse MOSS Web Parts

• Reuse OOTB Web parts: Content Query Web Part

• Data pull from anywhere in site collection. Provide RSS capability

• Custom Look and feel : XSLT conversion

• Site ColumnsReusable and central managed entity. Its like a data type.

• Content TypeType definition/Functional unit – collection of setting & metadata.Usually references to site columns

- Supports Inheritance - Identify Hierarchy

• ListsDatabase table whose schema is defined by Content Type OR adding column individually.

• Page Layouts – Review Wireframes, Identify sections & types of layouts needed

Page 8: Building fast track external facing sharepoint site

8

Planning - Admin

• Farm Topology needs

• Small/Medium/Large Farm

• Different environments connectivity

• Automated build needs

• Securing SharePoint-

• Intranet, Internet, Extranet

• Zones requirements

• Roles and Permission

• Data Protection, Recovery and Availability

• Monitoring needs

• Scalability & Capacity Planning

Admin

Environment Needs –Farm Topology

Logging & Auditing policies

Zones & Alternate Access mapping (AAM)

External Access – Internet, Extranet

Security – Roles, Permission

Backup Restore

Page 9: Building fast track external facing sharepoint site

9

Design Choices

• Use SharePoint Field Controls vs. Webparts/Lists

Source : Andrew Connell book - http://www.wrox.com/WileyCDA/WroxTitle/productCd-0470224754.html

Field Control Web parts

Content Storage

Personalization

Versioning

When to use

Stored in field as part of Page.

No

Complete history. Tied to Page.

Atomic Content rendering and editing

With in WebPart

Yes

No history

Functionality

• Provide easy and flexible Page Content authoring (Inline)

• Project Structure/Processes setup to minimize need of SharePoint

knowledge

• Use OOB controls/infrastructure of SharePoint

• XCopy (WSP) based deployment

• Run in Minimal Trust level

• Feature Based development

Page 10: Building fast track external facing sharepoint site

10

Models - .NET App & SharePoint App

Mix Model

Mix team.

Not everyone needs to know SharePoint

Not everyone needs to install SharePoint

Individually scalable (Mix of .NET servers & SharePoint servers)

Isolated application builds

Shared elements

Form based authentication

User Controls

Navigation

Customization elements in SharePoint and pure Functionality elements in .NET

Only SharePoint

Everything is customizable

Streamlined deployment using WSP

Shared Application cache

Farm based session in SSP

Learning Curve

• Mix Model : Application consist of combination of SharePoint & asp.net web app

• SharePoint Only : Application consist SharePoint only

Page 11: Building fast track external facing sharepoint site

11

Mix Model Design

Page 12: Building fast track external facing sharepoint site

12

Mix Model Design – continued…• ASP.Net page can use API to get content from

SharePoint

• Form Authentication cookie can Shared between multiple Web apps

• Navigation Providers of ASP.NET & SharePoint combined to give Unified Look

Page 13: Building fast track external facing sharepoint site

13

Execution

Page 14: Building fast track external facing sharepoint site

14

Dev Environment• No one size fit all.

• Own Domain environment (AD, TFS, DB, Middle tier Servers all in one domain)

• All developers (10 to 12) machines/servers in same domain

• Each developer has its own MOSS setup

• Testing and Integration environment in same domainAdvantages

Independent AD and own working environment.

Easy to build and deploy.

Disadvantages

Content sync up between developers

Page 15: Building fast track external facing sharepoint site

15

Dev Machines Setup• Create Base machine (Use 64 bit dev machines )

• Use Scripts to setup/configure in medium to large Teams/Farms

• Unattended MOSS installation scripts

• Setup PDF ifilter to search pdfs

• Create SSP via scripts

• Create Web Application

• Next Steps

Option 1

Create web application and empty site collection via script (STSADM)

Install Application Solution Packages (Features)

Load content via STSADM Import

Activate Features

Extend the site (external facing) via scripts

Enable lockdown features on site collection

Option 2

Create web application, site hierarchy, lists/document libraries via scripts

Install Application Solution Packages

Load content via custom tool (used a feature)

Activate Features

Extend the site (external facing) via scripts

Enable lockdown features on site collection

Page 16: Building fast track external facing sharepoint site

16

Solution Structure – Separation of Projects

• Feature based development is recommended development

methodology. It’s a way to deploy functionality (e.g. Page

Layout, List) to SharePoint infrastructure

• Typical SharePoint solution will have

• Branding Project: Contains master page, page layouts and their corresponding content types

• Types Project: Contains CAML definition of site columns, List content types etc

• UserControl Project: Contains ascx controls . V2010 supports visual web parts

• WebParts Project: Contains web parts definitions and code

• MetaTag Project – supports adding (http://www.mtelligent.com/journal/2008/1/11/using-the-delegate-control-to-add-meta-tags-to-sharepoint-pa.html)

Page 17: Building fast track external facing sharepoint site

17

Requirement-Design phase

• Conditions /Needs

• Requirements not fully flushed => Page Template/Layout keeps changing

• PLD (Presentation developer) need isolated environment within SharePoint (Branding VS. Net Project)

• Process

• Person ‘X’ to be owner of SharePoint content database. i.e. responsible for types/building blocks

• Change to Lists, Content Type, Site columns to be performed by Person ‘X’ and distribute the content database backup to team.

• Page Layout

• Person ‘X’ to create page layout with required elements (coming from content type)

• PLD to use SharePoint designer to design Page Layout.

• Use DisplayMode (Edit /Display) if SharePoint control default rendering is not sufficient

 <PublishingWebControls:editmodepanel runat="server" id="editmodepanelEditModeQuickLinks" PageDisplayMode="Edit" >       <PublishingWebControls:RichLinkField FieldName="QuickLink1" runat="server" id="RichLinkField0" /></li></PublishingWebControls:editmodepanel> <PublishingWebControls:EditModePanel runat="server" id="QuickLink1DisplayMode" PageDisplayMode="Display">     <pmxServerControls:LinkFieldRenderer runat="server" LinkFieldName="QuickLink1" /></PublishingWebControls:EditModePanel>

Page 18: Building fast track external facing sharepoint site

18

Design-Development phase

• Conditions /Needs

• Requirements close to finalization => Page Template/Layout doesn’t change often

• PLD need isolated environment within SharePoint

• Process

• Move SharePoint assets as Features

• Anyone is team is owner of SharePoint content database.

• Page Layout

• PLD to use Visual Studio to design Page.

• PLD to use Visual Studio -> WSPBuilder -> Copy to 12 Hive to test page. (v 2007)

Page 19: Building fast track external facing sharepoint site

19

Securing External facing site

• Enable ViewPageLockdown Feature http://technet.microsoft.com/en-us/library/cc263468.aspx

stsadm -o activatefeature -url <site collection url> -filename ViewFormPagesLockDown\feature.xml

• Allowing and denying access by using the Web.config filehttp://technet.microsoft.com/en-us/library/ee191479.aspx

<location path="_vti_bin“> <system.web> <authorization> <deny users="?" /> </authorization> </system.web> </location>

Page 20: Building fast track external facing sharepoint site

20

Securing Sensitive documents

• Use Separate Site Collection (if possible)

• Break permission inheritance & disable Anonymous

• Set NoCrawl property to True

• Exclude Library in SSP Search Index crawling

• HTTPHandler to retrieve document - use following in code to retrieve document from library. SPSecurity.RunWithElevatedPrivileges (delegate() { <Insert/Select code to document library>})

Page 21: Building fast track external facing sharepoint site

21

Tools

• WSPBuilder (v 2007)

• Package of related file set deployable to SharePoint from VS.NET

• Copy to 12 Hive -> Use once a features is deployed

• You can controls where the assemblies will go (Bin vs. GAC). Bin is preferred because GAC assemblies runs in full control by default.

• Highly configurable

• Andrew Connell stsadm extensions• Usage: Create Site columns, content types from SharePoint GUI and use

following to generate XML to create them as a Feature

• Generate Site columns from existing SharePoint infrastructure‣ STSADM.EXE -o GenSiteColumnsXml -url http://wcm -outputFile "c:\siteColumns.xml“

• Generate Site Content Types from existing SharePoint infrastructure‣ STSADM.EXE -o GenContentTypesXml -url http://wcm -outputFile "c:\ContentTypes.xml"

• Generate Site columns from existing SharePoint infrastructure‣ STSADM.EXE -o GenSiteColumnsXml -url http://wcm -outputFile "c:\sitecolumn.xml“

• http://www.andrewconnell.com/blog/articles/MossStsadmWcmCommands.aspx