Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A dynamic journey of concerns

515 views

Published on

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.

Published in: Software, Technology
  • Be the first to comment

  • Be the first to like this

A dynamic journey of concerns

  1. 1. A dynamic journey of concerns Jeroen Wijdeven
  2. 2. Agenda 1. WHY? 2. Concerns and Responsibilities 3. Dynamics 4. Features 5. Questions
  3. 3. WHY?1
  4. 4. WHY? I don’t like Because I don’t like code!?! In views
  5. 5. WHY? I don’t like Because I don’t like code!?! In views
  6. 6. WHY? I don’t like Because I don’t like code!?! In views
  7. 7. Why? This seems a lot cleaner to me
  8. 8. Why? This seems a lot cleaner to me
  9. 9. Why? This seems a lot cleaner to me
  10. 10. Goal , and Standarisation • Standarisation • Single Responsibility • Testability Results in: • Improve overall quality • Reducing development time
  11. 11. Concerns and Responsibilities2
  12. 12. Concerns and Responsibilities Separation of Concerns • Models are for business • Controllers are for interaction • Views display information
  13. 13. 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..
  14. 14. Umbraco Separation of Concerns
  15. 15. Umbraco + Foundation Separation of Concerns
  16. 16. Dynamics3
  17. 17. The dynamic type simplifies access to APIs, or like in our case, the IPublishedContent Properties collection. “ “
  18. 18. Dynamics Dynamic vs Typed For example this: Instead of this:
  19. 19. Dynamics Example implementation
  20. 20. The Proxy
  21. 21. DynamicModel
  22. 22. Features4
  23. 23. Talk is cheap. Show me the code! “ “
  24. 24. Questions5
  25. 25. Contact: mail: Jeroen.Wijdeven@macaw.nl twitter: @chuhukon
  26. 26. • 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

×