The KILROY case – Umbraco DK Festival                             Building KILROY                    Umbraco DK Festival 2...
The KILROY case – Umbraco DK Festival                                        Agenda   About Us   Brief Project Overview ...
The KILROY case – Umbraco DK Festival                                                        Please interrupt     We don’t...
The KILROY case – Umbraco DK Festival                                        About Us  Emil Rasmussen  Project Manager    ...
The KILROY case – Umbraco DK Festival                                 About Novicell   Based in Aarhus   38 employees  ...
The KILROY case – Umbraco DK Festival                                   Project Brief   New platform for KILROYs online m...
The KILROY case – Umbraco DK Festival                                By the Numbers   7 languages (soon to be 8)   21 si...
The KILROY case – Umbraco DK Festival       Theme 1: Using Umbraco                                        15
The KILROY case – Umbraco DK Festival                       10,000 destination pages  Problem: create and maintain 10.000 ...
The KILROY case – Umbraco DK Festival                                        Discussion   What do you do when you need to ...
The KILROY case – Umbraco DK Festival       Theme 2: Performance                                        22
The KILROY case – Umbraco DK Festival               The Umbraco Macro Cache - #h5is      Your are in big trouble, when you...
http://tourismeautrement.files.wordpress.com/2010/04/slow.jpg
The Law of Leaky Abstractions      "All non-trivial abstractions, to some degree, are leaky.      Abstractions fail. Somet...
The KILROY case – Umbraco DK Festival                      A Robust Caching Solution  1.   Use the standard ASP.NET cache ...
The KILROY case – Umbraco DK Festival            4 Quick Tips for Good (Razor)                                Performance ...
The KILROY case – Umbraco DK Festival           Wisely use HasProperty and HasValue if (myDynamicNode.HasProperty("myCoolP...
The KILROY case – Umbraco DK Festival          Use DynamicNode Extensions and Razor common helper  public static class Doc...
The KILROY case – Umbraco DK Festival                 Use Children if first level search  Be aware of performance when usi...
The KILROY case – Umbraco DK Festival            Dynamic notation considered harmfull?  Be aware of performance using dyna...
The KILROY case – Umbraco DK Festival                                        Discussion        What is your hard learned t...
http://media.photobucket.com/image/toolbox/LilToe01/Shop/Toolbox017.jpgWhat’s in Our Toolbox?
The KILROY case – Umbraco DK Festival                              The Basics + a Tip       Visual Studio 2010 (and Resha...
The KILROY case – Umbraco DK Festival                                   Deployment   Deployment        Web Deploy from V...
The KILROY case – Umbraco DK Festival                                        Discussion                              How d...
Any final Questions                  or Comments?http://www.europaszkola.pl/O%20szkole_html_4ff13fb7.jpg
Umbraco  festival Building Killroy
Umbraco  festival Building Killroy
Umbraco  festival Building Killroy
Umbraco  festival Building Killroy
Umbraco  festival Building Killroy
Umbraco  festival Building Killroy
Umbraco  festival Building Killroy
Umbraco  festival Building Killroy
Umbraco  festival Building Killroy
Umbraco  festival Building Killroy
Umbraco  festival Building Killroy
Upcoming SlideShare
Loading in …5
×

Umbraco festival Building Killroy

1,205 views

Published on

Presentation of Using Umbraco to managing 10.000 destination pages.
Performance issues, our lessons learned.

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,205
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
9
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Umbraco festival Building Killroy

  1. 1. The KILROY case – Umbraco DK Festival Building KILROY Umbraco DK Festival 2012 - Aarhus Friday 13th April 1
  2. 2. The KILROY case – Umbraco DK Festival Agenda  About Us  Brief Project Overview  3 Themes 1. Using Umbraco – Managing 10.000 destination pages 2. Performance – A Leaky Abstraction & Lessons Learned 3. The Toolbox – From Team Development to Deployment  Final Questions 2
  3. 3. The KILROY case – Umbraco DK Festival Please interrupt We don’t mind getting derailedhttp://www.flickr.com/photos/gorillaradio/2474695970/ 3
  4. 4. The KILROY case – Umbraco DK Festival About Us Emil Rasmussen Project Manager @emilr Fabrice Loudet Senior .NET developer 4
  5. 5. The KILROY case – Umbraco DK Festival About Novicell  Based in Aarhus  38 employees  Full service web development agency  Proud Umbraco Gold Partner 5
  6. 6. The KILROY case – Umbraco DK Festival Project Brief  New platform for KILROYs online marketing activities  Migrate content and URLs  Launched July 2011  Peaked at a 5 man development team  Still in active development - 1 week release schedule  Umbraco 4.7.1.1 (patched) 6
  7. 7. The KILROY case – Umbraco DK Festival By the Numbers  7 languages (soon to be 8)  21 sites  30 content editors  94 master pages (templates)  100 razor macros  830 dictionary items  5000 images  26000 pages  33000 active nodes  700.000 monthly visitors  2.800.000 monthly page views 14
  8. 8. The KILROY case – Umbraco DK Festival Theme 1: Using Umbraco 15
  9. 9. The KILROY case – Umbraco DK Festival 10,000 destination pages Problem: create and maintain 10.000 destination pages. Solution: common destination structure with automatic creation of sub pages. And onPublish event update of JSON data files. 16
  10. 10. The KILROY case – Umbraco DK Festival Discussion What do you do when you need to create a database of stuff (e.g. staff list, product videos, events, etc.)? 21
  11. 11. The KILROY case – Umbraco DK Festival Theme 2: Performance 22
  12. 12. The KILROY case – Umbraco DK Festival The Umbraco Macro Cache - #h5is Your are in big trouble, when you entire performance strategy is the Umbraco Macro Cache… 23
  13. 13. http://tourismeautrement.files.wordpress.com/2010/04/slow.jpg
  14. 14. The Law of Leaky Abstractions "All non-trivial abstractions, to some degree, are leaky. Abstractions fail. Sometimes a little, sometimes a lot. Theres leakage. Things go wrong. It happens all over the place when you have abstractions." Joel Spolsky, http://www.joelonsoftware.com/articles/LeakyAbstractions.htmlhttp://lifeattheendoftheroad.files.wordpress.com/2009/07/270709-022.jpg
  15. 15. The KILROY case – Umbraco DK Festival A Robust Caching Solution 1. Use the standard ASP.NET cache  Problem: when we deploy or when the AppPool recycles, we loose the cache 2. Use Microsoft AppFabric.  It provides a distributed, in-memory, application cache service in separate process than the webserver.  Problem solved: we have a persistent cache – even when the web server restarts or the AppPool recycles We update the cache OnPublish events or after timeout. 26
  16. 16. The KILROY case – Umbraco DK Festival 4 Quick Tips for Good (Razor) Performance …besides using custom caching :-) 27
  17. 17. The KILROY case – Umbraco DK Festival Wisely use HasProperty and HasValue if (myDynamicNode.HasProperty("myCoolProperty") && myDynamicNode.HasValue("myCoolProperty")) { int tmpInt; if (int.TryParse(myDynamicNode.GetProperty("myCoolProperty") .Value, out tmpInt)) .... } 28
  18. 18. The KILROY case – Umbraco DK Festival Use DynamicNode Extensions and Razor common helper public static class DocumentExtensions { public static bool IsValidProperty(this DynamicNode doc, string propertyAlias) { if (doc.HasProperty(propertyAlias) && doc.HasValue(propertyAlias)) return true; return false; } public static string GetPropertyAsString(this DynamicNode doc, string propertyAlias) { if (!doc.IsValidProperty(propertyAlias)) return string.Empty; return doc.GetProperty(propertyAlias).Value; } public static int? GetPropertyAsInt(this DynamicNode doc, string propertyAlias) ... } Usage int? myIntProp = myDynamicNode.GetPropertyAsInt("mypropertyAlias"); 29
  19. 19. The KILROY case – Umbraco DK Festival Use Children if first level search Be aware of performance when using DynamicNode.Descendant(docType). Use "Children" if possible. For example to get a direct child node : Don’t use: DynamicNode dNode = rootNode.Descendants("myDocType").Items.FirstOrDefault(); You can use instead : DynamicNode dNode = rootNode.GetChildrenAsList .Items.FirstOrDefault(x => x.NodeTypeAlias == "myDocType"); 30
  20. 20. The KILROY case – Umbraco DK Festival Dynamic notation considered harmfull? Be aware of performance using dynamic notation like node.DocTypeName => same problem as last slide. To get a direct child node : Don’t use: dynamic rootNode = new DynamicNode(xxx); DynamicNodeList allMyDocType = rootNode.MyDocType; // can have performance issue // PS : string myProp = rootNode.MyProp is OK is the prop exist You can use instead: DynamicNode dNode = rootNode.GetChildrenAsList .Items.FirstOrDefault(x => x.NodeTypeAlias == "myDocType"); 31
  21. 21. The KILROY case – Umbraco DK Festival Discussion What is your hard learned tips for blinding fast Umbraco performance? 32
  22. 22. http://media.photobucket.com/image/toolbox/LilToe01/Shop/Toolbox017.jpgWhat’s in Our Toolbox?
  23. 23. The KILROY case – Umbraco DK Festival The Basics + a Tip  Visual Studio 2010 (and Resharper)  Kiln (Mercurial)  Shared MS SQL Database XmlCacheEnabled = false 34
  24. 24. The KILROY case – Umbraco DK Festival Deployment  Deployment  Web Deploy from Visual Studio  XML Config transformations  Updating Umbraco Doc Types and other settings  Two approaches:  Create an Umbraco Package containing every Doc Type, every template, every macro and so on  Create an Umbraco Package containing new and updates Doc Types, templates etc. 35
  25. 25. The KILROY case – Umbraco DK Festival Discussion How do you deploy? Have you felt the pain of updating an highly utilized DocType? 36
  26. 26. Any final Questions or Comments?http://www.europaszkola.pl/O%20szkole_html_4ff13fb7.jpg

×