when less is more

85
1

Upload: douglas-robar

Post on 22-May-2015

374 views

Category:

Technology


0 download

DESCRIPTION

Learn the key differences between v4 and v5 in my "When Less is More" presentation, given at Umbraco Codegarden 12. For those who learned version 5, this presentation shows you what you need to know about version 4. By the end I think you'll agree that Umbraco 4 is a great product that meets real-world needs.

TRANSCRIPT

Page 1: When Less is More

1

Page 2: When Less is More

2

I’ve taught Umbraco for years (v2, 3, 4, and 5)

I love XSLT. I also enjoy Razor.

Page 3: When Less is More

3

Have you used Umbraco 5? Umbraco 4?

Page 4: When Less is More

Let’s get the preliminaries out of the way with a quick bit of history…

4

Page 5: When Less is More

5

Page 6: When Less is More

6

Page 7: When Less is More

Umbraco is the Danish word for an allen key or a hex key

…you know, like you get with IKEA furniture

…the thing that brings everything together to fit perfectly

That's the original umbraco logo in the corner, by the way.

7

Page 8: When Less is More

It’s just as well it’s a type because “unbrako” is a registered trademark

And now when you search for ‘umbraco’ you get results all about the cms

8

Page 9: When Less is More

Difference?

Umbraco is not a SYSTEM you adapt to, Umbraco Is a Framework you form into something you can work with and fit

your needs.

Lotus Elise versus SUV on cruisecontrol

Page 10: When Less is More

2-fold goal of umbraco sites – fun to build, easy to live with. These are NOT incompatible goals

Page 11: When Less is More

Umbraco isn’t for every situation.

Though you can use Umbraco for almost anything, be aware of what it’s best at to get the most from it.

Page 12: When Less is More
Page 13: When Less is More

These are the big 3 building blocks of Umbraco.

Today we’ll handle these in order, starting with document types

13

Page 14: When Less is More
Page 15: When Less is More

15

Page 16: When Less is More

In my opinion, this is the situation between v4.7 and v5.1

All these slides are my opinion.

These things are better in v5, IMO.

But these are also easily corrected in v4 and there are packages to help even today.

16

Page 17: When Less is More

17

Page 18: When Less is More

This isn’t better or worse, simply different.

18

Page 19: When Less is More

19

Page 20: When Less is More

20

Page 21: When Less is More

21

Page 22: When Less is More
Page 23: When Less is More
Page 24: When Less is More

It’s true, Razor is even better in v4 than in v5!

And, you can use XSLT if you want to.

Page 25: When Less is More

The differences between v4 (Master pages) and v5 (views) is mostly about the syntax. The ideas are extremely

similar.

Page 26: When Less is More
Page 27: When Less is More
Page 28: When Less is More

Just like with id’s on <div>’s in your html that your CSS will target,

So the content will target the placeholder by it’s id.

Nested or master/child templates.

Eliminate redundancy… make site-wide changes quickly

28

Page 29: When Less is More

Toolbar buttons make it easy.

29

Page 30: When Less is More

30

Page 31: When Less is More

Multiple place holders with default content (saves work later)

Page 32: When Less is More

Better in v4

32

Page 33: When Less is More
Page 34: When Less is More

34

Page 35: When Less is More

New in Umbraco 4.7, you can use Razor macros;

… and can simply point to the file rather than making a macro in umbraco.

… Easier source code control and reusability across projects that way.

Lee Kelleher is working on a similar capability for XSLT

35

Page 36: When Less is More
Page 37: When Less is More

There’s a syntax difference in v4… you use @Model. In v5 you used either @CurrentPage or @DynamicModel.

Otherwise it’s the same.

37

Page 38: When Less is More

38

Page 39: When Less is More

Could also have @Model.Children.Where(“!umbracoNaviHide”)

39

Page 40: When Less is More

40

Page 41: When Less is More

Be sure to check for a property’s existence in v4

41

Page 42: When Less is More

42

Page 43: When Less is More
Page 44: When Less is More

Translators aren’t in v5. It’s a very strong feature of v4.

And there are two excellent helps to make living with multi-lingual sites even easier because editing is easier than

creating (remember to always check the validity of a machine translation before publishing of course)

44

Page 45: When Less is More

Name change – they’re just called Macros in v4

Page 46: When Less is More

Same capabilities

Page 47: When Less is More

Syntax change in the markup, but same functionality.

V4 shown above, equivalent v5 shown below

47

Page 48: When Less is More

Only available in v4.

Use the cool “square bracket syntax” for macro parameters to automatically select values based on a page’s content,

a visitors cookie, or from a form value

48

Page 49: When Less is More

49

Page 50: When Less is More

Add the ?umbDebugShowTrace=true querystring parameter to your url to see a full performance trace output

50

Page 51: When Less is More

While we’re talking about performance… Here’s a real-world example

During the site and tour launch there were 138 visitors every second.

Even under that load the large homepage rendered in 0.016 seconds (16 thousandths of a second!)

BTW, Umbraco is ready for load balancing (and Azure)!

51

Page 52: When Less is More

Macro caching is free speed!

A slow umbraco macro might take 5 hundredths of a second.

(fix the speed problem if you can)

With caching it takes just 1 ten-thousandths of a second!

52

Page 53: When Less is More

Just specify how long a macro’s output should be cached before it is run again.

53

Page 54: When Less is More

54

Page 55: When Less is More

These don’t (yet?) exist in v4 or aren’t as strong.

Get involved and make it happen!

55

Page 56: When Less is More

Personally, I don’t like Canvas (aka ‘live’) editing and always disable it for users. But at least it’s possible in v4.

56

Page 57: When Less is More

All you need to do is set the publish and/or unpublish date and time and Umbraco will dutifully take care of

everything.

This is not available in v5.

57

Page 58: When Less is More

Yes, I really like XSLT. I also like Razor. It’s great having the choice to use the best/preferred tool for the job.

58

Page 59: When Less is More

There are over 500 packages for v4!

59

Page 60: When Less is More

60

Page 61: When Less is More

61

Page 62: When Less is More

62

Page 63: When Less is More

(make your own and share!)

63

Page 64: When Less is More

64

Page 65: When Less is More

65

Page 66: When Less is More

66

Page 67: When Less is More

Reserved urls and paths let you put your pages and applications in an umbraco site and tells umbraco to leave them

alone.

Turn off debug mode when going live – it also disables the output trace from ?umbDebugShowTrace=true

67

Page 68: When Less is More

Specify (culture-specific) 404 pages for your site

Built-in task schedular

Redirect users to your own customized help pages when they click the help icon in the back office

68

Page 69: When Less is More

69

Page 70: When Less is More

70

Page 71: When Less is More

Not in v5

71

Page 72: When Less is More

72

Page 73: When Less is More

Not only can you make your own custom dashboard controls (really easy to do!)

… but you can show/hide it based on who is logged in to Umbraco

73

Page 74: When Less is More

74

Page 75: When Less is More

75

Page 76: When Less is More

76

Page 77: When Less is More

77

Page 78: When Less is More

These aren’t just big names, they demonstrate that you can build whatever you want with Umbraco.

No limits.

78

Page 79: When Less is More

79

Page 80: When Less is More

80

Page 81: When Less is More

Don't feel this way… for long, anyway.

81

Page 82: When Less is More

Become a karmanator yourself!

82

Page 83: When Less is More

Become part of the Umbraco Community!

People WANT to help you!

They have been in exactly the same situation and know what you're going through.

83

Page 84: When Less is More

There are more all over the world. Get local.

If there isn’t one nearby, start one yourself

84

Page 85: When Less is More

85