Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
This sounds like someone very “experienced” in the field. Interfaces are there for a reason. Didn’t know utils oriented programming is a thing nowadays.
-
@immutable just put everything in the main method, why are you people so difficult with all those classes smh
-
arcioneo7705yIs multiple instances using that code?
Because if it is, that might lead to a lot of errors.
I think it depends on what your library and implementations does, also, there are some other patterns that can be applied in here, like STRATEGY pattern -
I'd rather have too many classes than too few! I have a colleague that throws all the logic into the events... On the upside you know where to find everything, but on the downside it's all right there, jumbled together...
Even if 11 classes were too much (not saying they are!) Proper interface implementation leaves a lot of options open down the road :-) -
I decided to abstract it through an interface because those business logic for each class are frequently changing.
The thing is, that guy is so afraid of interfaces to the point that you won't find any interface in the whole repo, other than the standard Service/Repository interfaces. -
@immutable so instead of changing class or even using dependency injection, you're now stuck with rewriting the method every time? Seems fucking stupid tbh...
-
@phorkyas if business logic is changing regularly, you DO need that interface structure though.
I have an interface implemented by 11 classes, coz u kno, it's "SOLID". But today i felt my life is a lie when a developer refactored my code and deleted all those classes and placed them in a Utils class with static methods, and slapped me with "Let's make it simple".
rant