Your SlideShare is downloading. ×
Schaeflein Dev409 Enterprise Branding Using Site Definitions
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Schaeflein Dev409 Enterprise Branding Using Site Definitions


Published on

Published in: Technology

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Enterprise Branding Using Site Definitions DEV409
  • 2. Mark Ferraz
      • SolutionsMark
      • Houston, TX
      • President, SolutionsMark. Mark is an Senior Information Architect and Developer specializing in Information Management, Collaboration Tools, and Knowledge Management systems for medium to large enterprises. Mark has over ten years of experience designing, managing, and implementing complex technology projects involving application implementation, supporting infrastructure, custom development, and integration. Most recently Mark has been working with the team at Chevron as the Technical Development Lead for one of the largest SharePoint deployments to date.
  • 3.
    • Paul Schaeflein, MCTS
      • Mindsharp
      • [email_address]
  • 4. Topics
    • Design Options
    • Site Definition Basics
    • Creating a Custom Site Definition
    • Deploying Site Definitions
    • Advanced Techniques
    • Demo
  • 5. Best Practice
    • Treat SharePoint Development just as you would any other software development project, by:
      • Adopting well defined development processes
      • Ensuring proper representation of stakeholders
      • Deciding early on a systems development lifecycle (SDLC) and sticking to it
      • Implementing the necessary tools and procedures to assure the rules of engagement are followed
  • 6.  
  • 7. Themes
  • 8. SharePoint Designer
  • 9. Site Definitions
  • 10. Site Definitions vs. Designer
    • Deployment considerations
      • Deployed repeatedly
      • Deployed across site collections
    • Maintainability
      • Upgrade via Solution deployment
    • Advanced artifacts
      • Content types
      • Custom list views
  • 11. Best Practice
    • Choose the design option that best suits your specific needs, while balancing upgrade risk and future anticipated flexibility needs?
    • Are you deploying SharePoint as a Service?
    • Have you determine architectural guidelines for your deployment?
    • Have you considered the upgradability of your customizations?
  • 12.
    • Site Definition Basics
  • 13. Master Page Composition
  • 14. Style (CSS)
    • Be aware of loading order of linked stylesheets
      • You need to load after CORE.CSS
    • Where possible, use built-in class names for custom components
      • Reduce the number of class names
    • Use Designer as a tool for exploring CSS attributes and determining the load order
  • 15. Style (CSS)
    • Avoid inline style declarations
    • Keep styles out of the content database
      • Maintenance becomes difficult
      • Styles library
      • Changes made in SharePoint Designer (SPD)
  • 16. Master and Layout Pages
    • Use the Minimal Master Page method of hiding unused controls rather than deleting them to avoid inconsistent errors
    • Use SharePoint Designer to validate design before deploying pages
    • Inline code is permissible in unghosted pages
    • Use CSS override methods for custom styles and beware CSS inheritance order
  • 17. Presentation
    • Pages are comprised of base master page and linked layout page
      • Default.aspx serves as layout page
    • WSS pages may only reference Default.Master or Custom.Master properties
    • Publishing (Portal) pages are more flexible – other master and layout pages may be used
  • 18. Presentation
    • Master Page Changes
      • Small tweaks
        • Copy and edit
      • Large changes
        • Use a “Minimal Master”
          • Heather Solomon (
          • MSDN
  • 19. Application Pages
    • Uses separate master page from site pages
      • Application.Master
    • DO inherit alternate style settings
    • No “supported” method for modifying application.master
  • 20. Application Pages
    • Run-time methods:
      • Page-level inline code
      • Inline code within master page
      • Server and user controls
      • HttpModule to switch master page at run-time (unsupported)
  • 21. Site Galleries and Local Files
    • Site Galleries are UI-specific libraries created during site provisioning
    • Contain uncustomized versions of source files
      • File system changes will be reflected in all uncustomized objects
    • Files are not customized until modified in SP Designer or via the web interface
    • All customizations made to files in site galleries are local – they do not apply to other sites (including subsites)
  • 22. Best Practice
    • Only create and deploy custom site and list definitions when you need to create a new type of site, which aligns with a defined service definition.
    • Are you deploying SharePoint as a Service?
    • Do you really need a new site type?
    • Are there any other alternatives available besides a custom site or list definition?
  • 23.
    • Create a custom site definition
  • 24. Key Elements WSS MOSS Features  Master Page(s) ✔ ✔  Layout Page(s) ✔  Site Columns ✔  Content Type(s) ✔  Web Parts ✔ ✔  Lists ✔ ✔ Solution Package  Configuration Files ✔ ✔  Styles ✔ ✔  Images ✔ ✔
  • 25. Prime Objective
  • 26. ONET.XML and CAML
    • ONET.XML defines how a site is provisioned, what lists it contains, what features are enabled, and what content is included
    • ONET.XML is the ‘blueprint’ of a site definition
    • ONET.XML syntax is based on Collaborative Application Markup Language (CAML)
    • ONET.XML modifications only apply to site-provisioning (no post deployment modifications)
  • 27. Features
    • Site definition functionality is determined by the Features associated with the Site Def
      • Lists
      • Master Pages
      • Subwebs
    • Features may be stapled to a Site Def or specified in ONET.XML
    • The entire Site Def is deployed as a Solution Package – no manual file edits
  • 28. Global Customizations
    • Global customizations impact all sites which share same source files
      • Default.Master
      • BlueBand.Master
      • Default.aspg
      • DefaultLayout.aspx
    • Styles in /_layouts/1033/Styles and Images in /_layouts/Images are global
    • Changes to application pages are shared by all sites
    • Files deployed via features are also global (for each site which uses specific feature)
  • 29. Content Types
    • Related Site Columns and Content Types may be combined into a single Feature for portability
    • Insure consistency between layout page and column reference names
    • To { } or not to { }?
    • Remember to bind content types to target libraries!
  • 30. Supporting Files
    • WEBTEMP, ControlTemplates and other config/supporting files cannot be featurized; deploy manually in solution package
    • Local (site specific) images and CSS should be deployed as Features; global files should be deployed manually in solution package
  • 31. Feature Stapling
    • Use to append Feature “packages”
    • Be aware of feature activation order
      • Validate dependencies
    • Some customization elements (content types, list views) cannot be stapled and must be declared in ONET.XML unless you are using event handler code to perform the roll-down operations
  • 32. Best Practice
    • Always arrange dependent functionality and resources together into logical features which can be expressed as SharePoint Features, which can be enabled within target sites.
    • Feature dependencies?
    • Feature visibility?
    • Feature deactivation cleanup code, while respecting user settings changes?
  • 33. DEMO
    • Creating a Custom MOSS Site Definition
  • 34.
    • Deploying Site Definitions
  • 35. Key Artifacts
  • 36. Deployment
    • Package entire definition into single Solution Package for ease of maintenance
    • Use FeatureReceivers for post-provisioning programming tasks (settings, etc. – always cleanup after yourself with appropriate Deactivation events)
    • Check dependencies (web parts, workflows, etc.)
  • 37. Maintenance
    • Once a site is provisioned from a custom definition, removal of the source Solution Package may fail
    • Use the UpgradeSolution command for iterative deployments
      • ONET changes will not be applied to existing sites
      • Some Feature with resources in use may not upgrade in existing site definitions
        • Use code to update declarative elements that may be in use or for which the update may not be supported
  • 38. Advanced Techniques
    • Use a DelegateControl or Self-Hiding CustomAction menu item to configure sites or lists using code
    • Allows for you to avoid the upgrade pitfalls of custom site and list definitions
    • Can perform any action through code and control when the action occurs
    • Allows for the management of change over time within existing sites or lists
  • 39. Best Practice
    • Always deploy developed functionality using a SharePoint Solution, which manages the deployment of code and resources to all WFEs.
    • Internalize qualities of service.
    • Use Source Control.
    • Use advanced techniques such a delegate controls and composite controls to manage change over time.
  • 40. DEMO
  • 41. Resources
    • Site Definition Articles
      • Site Definitions and Configurations [MSDN]
      • Creating a Custom WSS Site Definition [Eric Shupps]
      • Creating a Custom Site Definition in WSS v3 / MOSS [Todd Baginski]
      • SharePoint Designer vs. Custom Site Definitions [Eric Shupps]
      • Site Definitions – The Good, The Bad and The Ugly [Eric Shupps]
      • Managing Code When Customizing SharePoint [Rob Bogue]
      • How to Use Site Definitions in SharePoint [Rob Bogue]
  • 42. Thank you for attending! Please be sure to fill out your session evaluation!
    • Post conference DVD with all slide decks
    Sponsored by