this post was submitted on 03 Nov 2025
119 points (96.9% liked)

Programming

23417 readers
245 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 2 years ago
MODERATORS
 

As a Java engineer in the web development industry for several years now, having heard multiple times that X is good because of SOLID principles or Y is bad because it breaks SOLID principles, and having to memorize the "good" ways to do everything before an interview etc, I find it harder and harder to do when I really start to dive into the real reason I'm doing something in a particular way.

One example is creating an interface for every goddamn class I make because of "loose coupling" when in reality none of these classes are ever going to have an alternative implementation.

Also the more I get into languages like Rust, the more these doubts are increasing and leading me to believe that most of it is just dogma that has gone far beyond its initial motivations and goals and is now just a mindless OOP circlejerk.

There are definitely occasions when these principles do make sense, especially in an OOP environment, and they can also make some design patterns really satisfying and easy.

What are your opinions on this?

you are viewing a single comment's thread
view the rest of the comments
[–] davidagain@lemmy.world 1 points 6 days ago (1 children)

I have a hard time believing that microservices can possibly be a well designed architecture.

We take a hard problem like architecture and communication and add to it networking, latency, potential calling protocol inconsistency, encoding and decoding (with more potential inconsistency), race conditions, nondeterminacy and more.

And what do I get in return? json everywhere? Subteams that don't feel the need to talk to each other? No one ever thinks about architecture ever again?

I don't see the appeal.

[–] Guttural@jlai.lu 1 points 2 days ago (1 children)

It works in huge teams where teams aren't closely integrated, for development velocity.

Defining a contract that a service upholds, and that dependents can write code against, with teams moving at will as long as the contract is fulfilled is valuable.

I'll grant you it is true that troubleshooting those systems is harder as a result. In the huge organization I was in, it was the job of a non-coder specialist even.

But given the scope, it made a ton of sense.

[–] davidagain@lemmy.world 1 points 2 days ago (1 children)

But if the contract were an interface, for example, the compiler would enforce it on both sides, and you would get synchronous communication and common data format for free, and team A would know that they'd broken team B's code because it wouldn't pass CI and nothing drastic would happen in production.

[–] Guttural@jlai.lu 1 points 2 days ago* (last edited 2 days ago) (1 children)

At that scale, contracts are multiple interfaces, not just one. And C#/Java /whathaveyou interfaces are largely irrelevant, we're talking way broader than this. Think protocol, like REST, RPC...

[–] davidagain@lemmy.world 1 points 2 days ago

At that scale, contracts are multiple interfaces, not just one.

Good job all the compilers I can remember since the last 30 years or so can compile more than one file into a project then.

We're taking past each other. I'll saying that I don't see how adding networking makes anything simpler and you're saying that you need a bunch of network protocols. Why?

I'm not saying you shouldn't ever have networking, but then again, I wouldn't call it a microservices architecture if you're only using networking when it's necessary. At that point you just have services because it's genuinely a network.

It's not microservices unless you have unnecessarily added a bunch of networking, and unnecessarily adding a bunch of networking is innecessarily adding a bunch of complexity that I can't see makes anything better.