building fast track external facing sharepoint site
DESCRIPTION
Explains external facing SharePoint site development experience, techniques in agile mannerTRANSCRIPT
1
External facing SharePoint site
By Manish Rawat
http://www.linkedin.com/in/manishra
2
Architecture and Design Choices
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
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
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.
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
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
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
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
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
11
Mix Model Design
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
13
Execution
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
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
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)
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>
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)
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>
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>})
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