4 ms·
His biggest contribution may be the documentation and defining the vocabulary, but when he defines a pattern with a word that has an obvious negative connotatio
by dvlsg 7y ago
His biggest contribution may be the documentation and defining the vocabulary, but when he defines a pattern with a word that has an obvious negative connotation ("anemic"), it feels manipulative.
A while ago I was told by members of a separate team that I was writing the core of my javascript application incorrectly. I was following "functional core, imperative shell"[1] and intentionally separating my data from my functions[2]. Specifically, the code was considered to be wrong because it was "anemic", and I was sent a link straight to that 16 year old page about anemic domain models[3]. The suggestion to fix was to add a bunch of mutable state.
Don't get me wrong - I still almost always appreciate Martin Fowler's writing, as it's often quite good, including the original post. But I also understand some of the skepticism here.
---
1: https://www.destroyallsoftware.com/screencasts/catalog/functional-core-imperative-shell https://www.destroyallsoftware.com/screencasts/catalog/funct...
2: https://softwareengineering.stackexchange.com/q/203077 https://softwareengineering.stackexchange.com/q/203077
3: https://martinfowler.com/bliki/AnemicDomainModel.html https://martinfowler.com/bliki/AnemicDomainModel.html
- charlieflowers 7y agoI think that's a case of misguided developers with tunnel vision misusing Fowler's material. I have never met Fowler and I'm completely speculating here, but I would bet money he is both well-versed in, and a big fan of, the "functional core, imperative shell" concept when it is a good fit. Devs often get overly dogmatic, and when they do, they often reach for Fowler quotes to back themselves up. But don't blame Fowler for that.
- UK-Al05 7y agoDid you explain that you were following a functional model in your particular app? Traditional OO (Tatical)DDD does involve creating aggregates with mutating state
- lonelappde 7y agoOO vs Functional is a religious debate that will never be solved. It's like Catholics and Protestants. Fowler is from the Church of OO (Smalltalk).