38

With this post I've taken a bit more of a practical turn compared to previous Post-Architecture posts: It's more aimed at providing guidance to keep (early) architecture as simple as possible. Let me know what you think!

you are viewing a single comment's thread
view the rest of the comments
[-] agressivelyPassive@feddit.de 2 points 4 months ago

To 1), that's unfortunately not entirely true. The real abstraction criticized is more like introducing a StorableEntity layer that's provided by a StorableEntityBuilderFactory. So instead of providing a compartment with a stable interface, they introduce a mess of generalizations.

Abstractions should be bulkheads, but in practice they're often more like one of those beads-on-strings door decorations.

[-] mrkeen@mastodon.social 1 points 4 months ago

@agressivelyPassive moving from 'storing a user in postgres' to 'storing anything in postgres' is a step up in abstraction. Same with moving to 'storing a user somewhere' or moving to 'storing anything anywhere'.

Moving from 'storing an entity' to 'storing an entity via a FacadeBuilderFactory' is not a step up in abstraction, it's only an extra indirection.

[-] agressivelyPassive@feddit.de 4 points 4 months ago

No, that's my point. Providing the builder factory as an abstract way to construct an entity, it is an abstraction. It removes you from the actual detail, that's an abstraction. But it also introduces extra complexity, which in turn negates the value of the abstraction.

In reality, the intention is an abstraction, the result is often enough a bad abstraction that introduces more complexity and adds indirection.

[-] mrkeen@mastodon.social 0 points 4 months ago

@agressivelyPassive if you routinely call indirections abstractions, then 'premature abstraction is the root of all evil' holds. If you separate the two concepts, you might think differently.

If my team's codebase had a business logic class that had a concrete dependency on an EntityBuilderFactory, I'd vomit a little, but I wouldn't delete it (can't piss off too many people all the time). But I would route around the damage by allowing the class to depend on the EBF *or* something else.

this post was submitted on 18 Jul 2024
38 points (97.5% liked)

Programming

17314 readers
27 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS