+ All Categories
Home > Technology > Umbraco festival Building Killroy

Umbraco festival Building Killroy

Date post: 19-May-2015
Category:
Upload: novicell
View: 992 times
Download: 7 times
Share this document with a friend
Description:
Presentation of Using Umbraco to managing 10.000 destination pages.Performance issues, our lessons learned.
Popular Tags:
37
The KILROY case – Umbraco DK Festival 1 Building KILROY Umbraco DK Festival 2012 - Aarhus Friday 13 th April
Transcript
Page 1: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

1

Building KILROY

Umbraco DK Festival 2012 - Aarhus Friday 13th April

Page 2: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

2

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

Page 3: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

3

Please interrupt

We don’t mind getting derailed

http://www.flickr.com/photos/gorillaradio/2474695970/

Page 4: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

4

About Us

Emil Rasmussen

Project Manager

@emilr

Fabrice Loudet

Senior .NET developer

Page 5: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

5

About Novicell

Based in Aarhus

38 employees

Full service web development agency

Proud Umbraco Gold Partner

Page 6: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

6

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)

Page 7: Umbraco  festival Building Killroy
Page 8: Umbraco  festival Building Killroy
Page 9: Umbraco  festival Building Killroy
Page 10: Umbraco  festival Building Killroy
Page 11: Umbraco  festival Building Killroy
Page 12: Umbraco  festival Building Killroy
Page 13: Umbraco  festival Building Killroy
Page 14: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

14

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

Page 15: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

15

Theme 1: Using Umbraco

Page 16: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

16

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.

Page 17: Umbraco  festival Building Killroy
Page 18: Umbraco  festival Building Killroy
Page 19: Umbraco  festival Building Killroy
Page 20: Umbraco  festival Building Killroy
Page 21: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

21

Discussion

What do you do when you need to create a database

of stuff (e.g. staff list, product videos, events, etc.)?

Page 22: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

22

Theme 2: Performance

Page 23: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

23

The Umbraco Macro Cache - #h5is

Your are in big trouble, when you entire performance

strategy is the Umbraco Macro Cache…

Page 24: Umbraco  festival Building Killroy

http://tourismeautrement.files.wordpress.com/2010/04/slow.jpg

Page 25: Umbraco  festival Building Killroy

http://lifeattheendoftheroad.files.wordpress.com/2009/07/270709-022.jpg

"All non-trivial abstractions, to some degree, are leaky.

Abstractions fail. Sometimes a little, sometimes a lot. There's leakage. Things go wrong. It happens all over the place when you have abstractions."

Joel Spolsky, http://www.joelonsoftware.com/articles/LeakyAbstractions.html

The Law of Leaky Abstractions

Page 26: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

26

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.

Page 27: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

27

4 Quick Tips for Good (Razor)

Performance

…besides using custom caching :-)

Page 28: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

28

Wisely use HasProperty and HasValue

if (myDynamicNode.HasProperty("myCoolProperty") &&

myDynamicNode.HasValue("myCoolProperty"))

{

int tmpInt;

if (int.TryParse(myDynamicNode.GetProperty("myCoolProperty")

.Value, out tmpInt))

....

}

Page 29: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

29

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");

Page 30: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

30

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");

Page 31: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

31

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");

Page 32: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

32

Discussion

What is your hard learned tips for blinding fast

Umbraco performance?

Page 33: Umbraco  festival Building Killroy

What’s in Our Toolbox?

http://media.photobucket.com/image/toolbox/LilToe01/Shop/Toolbox017.jpg

Page 34: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

34

Visual Studio 2010 (and Resharper)

Kiln (Mercurial)

Shared MS SQL Database

The Basics + a Tip

XmlCacheEnabled = false

Page 35: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

35

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.

Page 36: Umbraco  festival Building Killroy

The KILROY case – Umbraco DK Festival

36

Discussion

How do you deploy?

Have you felt the pain of updating an highly utilized

DocType?

Page 37: Umbraco  festival Building Killroy

http://www.europaszkola.pl/O%20szkole_html_4ff13fb7.jpg

Any final Questions

or Comments?


Recommended