Overview for 'matthiasnoback'
Written by Matthias Noback
/ Original link
on Mar. 8, 2021
I recently heard this interesting question: if your project uses a static analysis tool like PHPStan or Psalm (as it should), should the tests by analysed too? The first thing to consider: what are potential reasons for not analysing your test code? Why not? 1. Tests are messy in terms of types Tes…
Written by Matthias Noback
/ Original link
on Mar. 4, 2021
This article is an excerpt from my book Advanced Web Application Architecture. It contains a couple of sections from the conclusion of Part I: Decoupling from infrastructure. This chapter covers: A deeper discussion on the distinction between core and infrastructure code A summary of the strategy…
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…