Design Patterns in the 21st Century: Conclusion

17 Apr 2015

Cogs, by Arthur John Picton
SC London
The place where passionate Software Craftspeople, Community, Experts & Thought Leaders come together
Book your ticket now!

This is part five of my talk, Design Patterns in the 21st Century.


Over the past week, we've seen three examples of design patterns that can be drastically improved by approaching them with a functional mindset. Together, these three span the spectrum.

  • The Abstract Factory pattern is an example of a creational pattern, which increases flexibility during the application wiring process
  • The Adapter pattern, a structural pattern, is a huge aid in object composition
  • The Chain of Responsibility pattern is a good demonstration of a behavioural anti-pattern that actually makes the communication between objects more rigid

We took these three patterns, made them a lot smaller, removed a lot of boilerplate, and knocked out a bunch of extra classes we didn't need in the process.

In all cases, we split things apart, only defining the coupling between them in the way objects were constructed. But more than that: we made them functional. The difference between domain objects and infrastructural code became much more explicit. This allowed us to generalise, using the built-in interfaces to do most of the heavy lifting for us, allowing us to eradicate lots of infrastructural types and concentrate on our domain.

It's funny, all this talk about our business domain. It's almost as if the resulting code became a lot more object-oriented too.


This post was cross-posted to my personal blog.

Blogs Relacionados

Get content like this straight to your inbox!

Codurance Logo

Software es nuestra pasión.

Somos Software Craftspeople. Construimos software bien elaborado para nuestros clientes, ayudamos a los desarrolladores a mejorar en su oficio a través de la formación, la orientación y la tutoría y ayudamos a las empresas a mejorar en la distribución de software.

Últimos Blogs




Contacto

3 Sutton Lane, planta 3
Londres, EC1M 5PU

Teléfono: +44 207 4902967

2 Mount Street
Manchester, M2 5WQ

Teléfono: +44 161 302 6795

Carrer de Pallars 99, planta 4, sala 41
Barcelona, 08018

Teléfono: +34 937 82 28 82

Correo electrónico: hello@codurance.es