Overview for 'matthiasnoback'
Written by Matthias Noback
/ Original link
on Mar. 2, 2021
A lot can happen in 9 years. Back then I was still advocating that you should unit-test your controllers and that setter injection is very helpful when replacing controller dependencies with test doubles. I've changed my mind: constructor injection is the right way for any service object, including…
Written by Matthias Noback
/ Original link
on Feb. 25, 2021
Where should it go? If you're one of those people who make a separation between an application and a domain layer in their code base (like I do), then a question you'll often have is: does this service go in the application or in the domain layer? It sometimes makes you wonder if the distinction be…
Written by Matthias Noback
/ Original link
on Feb. 24, 2021
This is an excerpt from my book PHP for the Web. It's a book for people who want to learn to build web applications with PHP. It doesn't focus on PHP programming, but shows how PHP can be used to serve dynamic web pages. HTTP requests and responses, forms, cookies, and sessions. Use it all to build…
Written by Matthias Noback
/ Original link
on Feb. 23, 2021
As a rather unusual pastime for the Saturday night I attended the third Domain-Driven Design Africa online meetup. Thomas Pierrain a.k.a. use case driven spoke about his adaptation of Hexagonal architecture. "It's not by the book," as he said, but it solves a lot of the issues he encountered over…
Written by Matthias Noback
/ Original link
on Feb. 19, 2021
You've picked a good refactoring goal. You are prepared to stop the project at anytime. Now how to determine the steps that lead to the goal? Bottom-up development There is an interesting similarity between refactoring projects, and regular projects, where the goal is to add some new feature to the…
Written by Matthias Noback
/ Original link
on Feb. 18, 2021
Refactoring is often mentioned in the context of working with legacy code. Maybe you like to define legacy code as code without tests, or code you don't understand, or even as code you didn't write. Very often, legacy code is code you just don't like, whether you wrote it, or someone else did. Sinc…