Download - Ep structured share point development - v.4
A Structured / Repeatable Approach to Building SharePoint Solutions
Ivan Sanders
SharePoint ArchitectDimension Solutions inc.
Agenda SharePoint architecture Review typical SharePoint Development SharePoint customization vs development Development with SharePoint Features Deployment using WSS solution packages Tips and tricks to SharePoint development
SharePoint Architecture SharePoint v4 built on top of .NET 3.5 Majority of SharePoint files installed
within SharePoint “14” RootFolder Each SharePoint Web application
has its own Web root on file system File system of SharePoint sites is virtualized Many pages and files map to files on
the file systemBut not all…
Templates Versus Instances Concept
Files in a site exist in the siteobject model as SPFile objects
All files live within folders (SPFolder) Customized versus uncustomized files
Uncustomized file – source on the file systemCustomized file – source in sites content DB
Customization appliesonly to site pages and filesApplication pages (/_layouts/*) don’t apply
File Source Retrieval Process
SharePoint(HTTP
Application/Modules/Handlers)
File template/definition[ .. ]\12\TEMPLATE\FEATURES\SomeFeature\
PageTemplate.aspx
SharePoint Designer
Browser/Web Services
SPFilehttp://foo/
somePage.aspx
* if file is uncustomized, underlying template is fetched
Source of the file is retrieved… first
the content database is checked
Typical Site Development Infrastructure assets
Create site column andcontent types via browser
Layout assetsCreate master pages and page
layouts with SharePoint Designer 2010Modify look and feel, adding CSS and
images using SharePoint Designer 2010
"Big Picture" Challenges How do you make this development
process repeatable? How to automate it? What about source control?
SharePoint has version control on lists and libraries No version control for infrastructure assets No version control for site pages and files
What about a true softwaredevelopment lifecycle process?
What about change management process?
SharePoint Customization Creating and editing instances of assets
that live exclusively in the site’s content DB Even if originally based off a template,
source still lives in content DB Tools used in SharePoint customization
SharePoint API SharePoint browser interfaceSharePoint Designer 2010
SharePoint Customization Advantages
Plenty of resources documenting the processWYSIWYG development
with SharePoint Designer 2010Easily make changes in multiple environments
DisadvantagesSite columns and content types are
not easily moved between environmentsChallenging to package and deploy
○ New files and changes to existing files○ Multiple environments
Challenges In Creating Publishing Sites
Publishing sites exacerbate the challenges All projects require sharing assets
Between developers on project team Between environments (Dev/QA/UAT/Prod)
How to move asset change to other environments? Manually move infrastructure and layout assets Backup/restore (*** bad bad bad option! ***) Content deployment
Does not promote code reuse!
SharePoint Development Goals
Developers work at a lower level (file system)Keep infrastructure/layout assets out of DB
Developers Developers Developers SharePoint Feature schema
allows creation of all kinds of assets Upon activation, Feature creates
uncustomized instances in the site SharePoint solutions enable packaging
of Features in one portable file
SP DevelopmentDisadvantages
SharePoint Features are tedious to buildNo visual designerLots of CAML (XML) markupMinimal debugging support
Provisioning files requires double development (but does it) Feature deactivation leaves artifacts (Can this be avoided) Current tools do not promote this approach (Tooling)
SP DevelopmentAdvantages
Developers stay in Visual Studio Keeps layout files uncustomized on server Easy to package changes in order to
Share with other members on project dev teamDeploy to other environments
Fully leverage existing SCM solutions Easier to adhere to SDL and change control Full control of site columns and content types
Avoiding the _x0020_ in site columns!
Structured SharePoint Solution Development
DEMO…
Tips And Tricks To SP Dev Add CAML IntelliSense to Visual Studio
via Visual Studio XML Schema Cache Using existing tools as IDE, then “Featurize”
Use browser for site column and content typesUse SharePoint Designer 2010 to create
master pages and page layouts fasterUtilize SharePoint API to extract assets
○ STSADM.EXE Custom Commands○ VSeWSS 1.3
Automate process of building WSP’sWSPBuilder
Third Party Tools & Demos Stramit.CamlViewer2010 Beyond Compare 2 Elumenotion SharePoint Skinner AFR SharePoint_Tips_Utility_Pack SPContentDeploymentWizard Fiddler2 SharePoint Manager 2010 Visual Studio 2008 SP1 – VSTA, VSTO, SharePoint SDKs, Windows SDK ColorPic Bewise.SharePoint.QuickLaunch Bewise.View.Permissions PowerISO WildCard Search Faceted Search Cascading Lookup Columns