SharePoint Web Content Management - Lessons Learnt/top 5 tips

3,566 views

Published on

My presentation to the UK SharePoint User Group (200+ attendees) in Oct 2008 on Web Content Management in SharePoint. Includes top 5 WCM tips and general lessons learnt.

Published in: Technology
  • Be the first to comment

SharePoint Web Content Management - Lessons Learnt/top 5 tips

  1. 1. Lessons learnt: Building MOSS Content Management sites 16/10/2008 Chris O’Brien SharePoint MVP www.sharepointnutsandbolts.com
  2. 2. <ul><li>The WCM landscape </li></ul><ul><li>Key topics </li></ul><ul><ul><li>Security </li></ul></ul><ul><ul><li>Optimisation </li></ul></ul><ul><ul><li>Accessibility </li></ul></ul><ul><ul><li>Deployment – Features vs. Content Deployment? </li></ul></ul><ul><li>Chris’s top 5 WCM tips </li></ul><ul><li>Q & A </li></ul>What we’ll cover London, 16/10/2008 | SharePoint User Group – MOSS Web Content Management |
  3. 3. <ul><li>Very different to using SharePoint for collaboration </li></ul><ul><ul><li>Typically emphasis is on ‘development’ not ‘customisation’ </li></ul></ul><ul><li>SharePoint provides great tools – but we generally build on them </li></ul><ul><li>Challenge of moving sites from Dev -> QA -> UAT -> Live </li></ul>London, 07/06/09 | SharePoint User Group – MOSS Web Content Management | The WCM landscape
  4. 4. <ul><li>Prevent end users accessing back-end pages </li></ul><ul><ul><li>Use ‘Lockdown Feature’ for anonymous users </li></ul></ul><ul><ul><li>Allow authenticated users to read items but not view list pages </li></ul></ul><ul><li>Consider dedicated authoring server within firewall </li></ul><ul><ul><li>Allows internet servers to be more secure </li></ul></ul><ul><li>Standard steps: </li></ul><ul><ul><li>Validate input for SQL injection/cross-site scripting attacks, avoid storing passwords etc . </li></ul></ul>London, 07/06/09 | SharePoint User Group – MOSS Web Content Management | Key topic - security
  5. 5. <ul><li>Many internet sites must meet accessibility guidelines </li></ul><ul><ul><li>Standard SharePoint pages/controls not AA-compliant </li></ul></ul><ul><ul><li>Two ways to work around: </li></ul></ul><ul><ul><ul><li>Build your own controls on top of SharePoint </li></ul></ul></ul><ul><ul><ul><li>Use ‘control adapters’ to correct the SharePoint controls </li></ul></ul></ul><ul><li>Accessibility Kit for SharePoint (AKS) can help </li></ul>London, 07/06/09 | SharePoint User Group – MOSS Web Content Management | Key topic - accessibility
  6. 6. <ul><li>Different forms of caching </li></ul><ul><ul><li>Typically more complex for sites which aren’t anonymous only </li></ul></ul><ul><li>Housekeeping </li></ul><ul><ul><li>Removing core.js where possible </li></ul></ul><ul><ul><li>Removing ugly ‘name.dll’ message in IE7 http://support.microsoft.com/kb/931509 </li></ul></ul>Key topic – performance London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  7. 7. Key topic - deployment <ul><li>Different approaches here: </li></ul><ul><ul><li>Deploy functionality/files using Features </li></ul></ul><ul><ul><li>Deploy using Content Deployment </li></ul></ul><ul><ul><ul><li>My ‘Content Deployment Wizard’ provides ability to deploy selected items only (e.g. page layouts) </li></ul></ul></ul><ul><li>My rule of thumb – use CD if single site collection, use Features if multiple </li></ul><ul><li>My blog has several articles on factors to consider </li></ul>London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  8. 8. <ul><li>Andrew Connell </li></ul><ul><ul><li>MSDN article: Prescriptive Guidance for WCM sites http://msdn.microsoft.com/en-us/library/cc879144.aspx </li></ul></ul><ul><ul><li>Book: SharePoint 2007 WCM Development (Wrox Press) </li></ul></ul><ul><li>Accessibility Kit for SharePoint </li></ul><ul><ul><li>http://aks.hisoftware.com </li></ul></ul><ul><li>‘ Optimising MOSS WCM sites for performance’ </li></ul><ul><ul><li>http://msdn.microsoft.com/en-us/library/bb727371.aspx </li></ul></ul>Key resources London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  9. 9. Tips from the field Lessons learned
  10. 10. <ul><li>Implement HTML markup in user controls, not SPD </li></ul><ul><ul><li>Faster development experience - no SPD pain </li></ul></ul><ul><ul><li>Page layout markup now in primary source control </li></ul></ul><ul><ul><li>Much simpler deployment of updates </li></ul></ul>Implementation tip #1 London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  11. 11. Implementation tip #1 London, 07/06/09 | SharePoint User Group – MOSS Web Content Management | Markup in page layout in SPD: Markup in user control in Visual Studio:
  12. 12. <ul><li>Add custom virtual directory pointing to your web project files </li></ul><ul><ul><li>Store user controls/page furniture files (e.g. image/XSL) here. Remove code files for non-dev environments </li></ul></ul><ul><ul><li>Faster development experience – no files to copy, no post-build events. Just save and F5! </li></ul></ul><ul><ul><li>Important if using tip #1 – don’t want to have to compile project for a HTML change </li></ul></ul>Implementation tip #2 London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  13. 13. Implementation tip #2 London, 07/06/09 | SharePoint User Group – MOSS Web Content Management | Custom IIS virtual directory pointing at VS web project:
  14. 14. <ul><li>Make life easier for the site authors/admins </li></ul><ul><ul><li>Reduce their stress and they’ll be on your side.. </li></ul></ul><ul><ul><li>Consider providing custom tools if the ‘SharePoint way’ is not simple enough (e.g. user management) </li></ul></ul><ul><ul><li>If you use custom lists for site data, provide a link for authors to find them (e.g. using CustomAction) </li></ul></ul><ul><ul><li>Remember these people are rarely SharePoint gurus </li></ul></ul>Implementation tip #3 London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  15. 15. <ul><li>Custom links on Site Actions menu to back-end lists/custom screens: </li></ul>Implementation tip #3 London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  16. 16. <ul><li>Custom ‘create user’ screen with detailed feedback of action: </li></ul>Implementation tip #3 London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  17. 17. <ul><li>Plan for unexpected errors </li></ul><ul><ul><li>Implement ‘friendly’ pages for: </li></ul></ul><ul><ul><ul><li>404/page not found </li></ul></ul></ul><ul><ul><ul><li>Unhandled errors </li></ul></ul></ul><ul><ul><li>Typically use custom HTTP module to override default behaviour, checking for: </li></ul></ul><ul><ul><ul><li>HttpContext.Current.Server.GetLastError() </li></ul></ul></ul><ul><ul><ul><li>HttpContext.Current.Response.StatusCode = 404 </li></ul></ul></ul>Implementation tip #4 London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  18. 18. Implementation tip #4 London, 07/06/09 | SharePoint User Group – MOSS Web Content Management | Friendly error page for end users:
  19. 19. <ul><li>Plan for unexpected errors (ctd) </li></ul><ul><ul><li>Implement e-mail notifications to developers for errors </li></ul></ul><ul><ul><li>Means an error cannot happen without the team being aware </li></ul></ul><ul><ul><li>We built this for production, but was even more useful in dev/testing </li></ul></ul><ul><ul><li>Implemented in same custom HTTP module as error page redirection </li></ul></ul>Implementation tip #4 (ctd) London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  20. 20. <ul><li>E-mail received by development team when an unhandled error occurs: </li></ul>Implementation tip #4 (ctd) London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  21. 21. <ul><li>Plan for unexpected errors (ctd) </li></ul><ul><ul><li>Implement proper tracing – it could save your project! </li></ul></ul><ul><ul><li>Provides ability to quickly locate bugs in your code </li></ul></ul><ul><ul><li>Trade off is time/effort to implement </li></ul></ul><ul><ul><li>Consider productivity tools such as ReSharper/CodeRush to lessen impact </li></ul></ul>Implementation tip #4 (ctd) London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  22. 22. <ul><li>Using tracing (shown here with DebugView) to quickly find bugs in code: </li></ul>Implementation tip #4 (ctd) London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  23. 23. <ul><li>Design for flexibility </li></ul><ul><ul><li>Use SP lists for values the client may wish to edit, but consider caching </li></ul></ul><ul><ul><ul><li>My ‘Config Store’ solution on Codeplex does this ( www.codeplex.com/SPConfigStore ) </li></ul></ul></ul><ul><ul><li>Implement base page (custom master page class) to easily run code across the site </li></ul></ul><ul><ul><ul><li>Examples on our site: </li></ul></ul></ul><ul><ul><ul><li>Check if trial user/when trial access ends </li></ul></ul></ul><ul><ul><ul><li>Check if accepted Terms & Conditions </li></ul></ul></ul><ul><ul><ul><li>Check has supplied their initial user profile info </li></ul></ul></ul><ul><ul><ul><li>Enforce use of HTTPS </li></ul></ul></ul>Implementation tip #5 London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  24. 24. <ul><ul><li>Using Config Store ( www.codeplex.com/SPConfigStore ) for configuration settings: </li></ul></ul>Implementation tip #5 London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  25. 25. <ul><li>Key topics - security, performance, accessibility (if your client requires it) </li></ul><ul><li>Chris’s top 5 WCM tips: </li></ul><ul><ul><li>HTML markup in user controls, not SPD </li></ul></ul><ul><ul><li>Custom virtual directory for web files </li></ul></ul><ul><ul><li>Make life easy for authors/admins </li></ul></ul><ul><ul><li>Plan for errors </li></ul></ul><ul><ul><ul><li>Friendly 404/error pages </li></ul></ul></ul><ul><ul><ul><li>Error e-mails for developers </li></ul></ul></ul><ul><ul><ul><li>Implement tracing </li></ul></ul></ul><ul><ul><li>Design for flexibility </li></ul></ul><ul><ul><ul><li>Provide switches for things which might change </li></ul></ul></ul>What was he talking about?? London, 07/06/09 | SharePoint User Group – MOSS Web Content Management |
  26. 26. Contact: LinkedIn: http://www.linkedin.com/in/chrisobrienmvp Blog: www.sharepointnutsandbolts.com Thank you  Q & A

×