「 Coolest Fristi 」 on Nostr: sometimes I look at current day php code in frameworks or composer packages and I'm ...
sometimes I look at current day php code in frameworks or composer packages and I'm just like
why the fuck must EVERYTHING have an interface, god dayum
The simplest of things consists of 50 goddamn classes because EVERYTHING needs to be modular and interchangeable and whatnot.
guys it's okay to make monolithic modules, and not every class needs to follow some strict design pattern if it's unlikely that said class needs to be often extended or otherwise maintained.
I'd like to call this anti-pattern "class explosion" as that is what it looks like; something that could've been one or two classes, has exploded into 10 or 20 classes, interfaces and whatnot surrounding it. It makes your codebase look like a maze and a garbage dump in one.
Please know WHEN to actually apply design patterns. And know that maintainability can also be achieved by keeping your codebase small.
why the fuck must EVERYTHING have an interface, god dayum
The simplest of things consists of 50 goddamn classes because EVERYTHING needs to be modular and interchangeable and whatnot.
guys it's okay to make monolithic modules, and not every class needs to follow some strict design pattern if it's unlikely that said class needs to be often extended or otherwise maintained.
I'd like to call this anti-pattern "class explosion" as that is what it looks like; something that could've been one or two classes, has exploded into 10 or 20 classes, interfaces and whatnot surrounding it. It makes your codebase look like a maze and a garbage dump in one.
Please know WHEN to actually apply design patterns. And know that maintainability can also be achieved by keeping your codebase small.