a dynamic journey of concerns

26
A dynamic journey of concerns Jeroen Wijdeven

Upload: jeroen-wijdeven

Post on 29-Jun-2015

176 views

Category:

Software


0 download

DESCRIPTION

How can we keep our templates clean and front-end-developer-friendly? How can we make our code testable? How can we reduce our development time, and improve quality at the same time? Some questions I asked myself before starting with the Macaw.Umbraco.Foundation. This presentation takes you on a journey through a foundation we use at Macaw. Where dynamics and separation of concerns are key.

TRANSCRIPT

Page 1: A dynamic journey of concerns

A dynamic journey of concerns

Jeroen Wijdeven

Page 3: A dynamic journey of concerns

WHY? 1

Page 4: A dynamic journey of concerns

WHY?

I don’t like

Because I don’t like code!?! In views

Page 5: A dynamic journey of concerns

WHY?

I don’t like

Because I don’t like code!?! In views

Page 6: A dynamic journey of concerns

WHY?

I don’t like

Because I don’t like code!?! In views

Page 10: A dynamic journey of concerns

Goal

, and Standarisation

• Standarisation

• Single Responsibility

• Testability

Results in:

• Improve overall quality

• Reducing development time

Page 11: A dynamic journey of concerns

Concerns and Responsibilities 2

Page 12: A dynamic journey of concerns

Concerns and Responsibilities

Separation of Concerns

• Models are for business

• Controllers are for interaction

• Views display information

Page 13: A dynamic journey of concerns

Goal reached with mainly 2 practices

Separation of Concerns

• IPropertyValueConverters (previously called IPropertyEditorValueConverter)

• Dynamic“View”models • Implement IPublishedContent so you can still use all the Umbraco beautiness • Is using the DynamicPublishedContent eco system • Act as a proxy for every IPublishedContent (RenderModel.Content) • Containing commonly used functionality like

• Hompage property for global settings • Breadcrumbs • Default ToString() string converters • etc..

Page 15: A dynamic journey of concerns

Umbraco + Foundation

Separation of Concerns

Page 16: A dynamic journey of concerns

Dynamics 3

Page 17: A dynamic journey of concerns

The dynamic type simplifies access

to APIs, or like in our case, the

IPublishedContent Properties

collection.

“ “

Page 18: A dynamic journey of concerns

Dynamics

Dynamic vs Typed

For example this:

Instead of this:

Page 22: A dynamic journey of concerns

Features 4

Page 24: A dynamic journey of concerns

Questions 5

Page 25: A dynamic journey of concerns

Contact: mail: [email protected]

twitter: @chuhukon

Page 26: A dynamic journey of concerns

• https://github.com/MacawNL/Macaw.Umbraco.Foundation

• http://jeffreypalermo.com/blog/the-onion-architecture-part-1/

• http://our.umbraco.org/documentation/Reference/Mvc/custom-controllers

• http://www.codeproject.com/Articles/66585/Comparison-of-Architecture-presentation-patterns-M

• http://msdn.microsoft.com/en-us/library/dd264736.aspx

• chuhukon.nl

Urls