Oo-spaghettio web architecture

I noticed that most of the enterprise web applications I've been working on over the past few years seem to have misused the authority of the oo.

What once would have been 1000 lines of HTML and a script often now turned into 10,000 lines of code, 50 classes and method calls 2000 to do basically the same thing. That is, oo and tiered architecture are apparently overused and / or poorly used, which often leads to longer development time, more expensive and often nightmare maintenance.

  • How often do other people see this?

  • How can you use oo effectively, as the Buddha himself said: as much as possible, try not to harm ... try to help ...

+4
source share
2 answers

"The road to hell is paved with the best of intentions."

I personally have not come across this myself, but all the time I have heard stories, it seems that the problem is the architecture of the astronauts (people who think too much time) or poor developers (people who think too little time).

In the early days of programming, you did not see so much due to limitations in hardware, languages, etc.

However, developers are now trying to focus on writing code that people understand for free connectivity and maintainability by including as many design patterns and OO principles as possible, but just like anything that can be redone.

On the other hand, some developers may simply not think enough about the problems that they are trying to solve, and write additional code just because it does its job and does not think about the bigger picture.

In any case, developers may not be malicious or even incompetent and want the best for the projects they are working on, but they still overestimate the principles simply because they try too hard.

So, I would say that the solution is to remind developers to use OOP principles as guidelines, but thatโ€™s it. There comes a time when you need to find a happy environment between thinking and programming and just stop thinking and start programming.

See: Jeff wrote a good blog post about only such things: KISS and YAGNI .

+1
source

I see this all the time :( Basically, if people are going to make a mess, they will do it, trying or not to use the design of the oo. In both cases, it is equally terrible.

Update 1: it is important to understand how / what will be reused (but not crazy about it, since it will hinder performance), since we donโ€™t want to get tons of classes, each of them is not reused and has many different functions.

Basically the main problem is understanding and caring about what is being built, since you can use oo, tdd, ddd, whatever, and if the developers do not understand what they are doing, this will end in the same mess ... or worse: (

Below, these things help, but they are not magical, they will not replace the skills of developers to create supported code.

Update 2: Also note that a checklist or some tokens will not do this. I mean, I love SOLID, and a lot of things are happening, and I think they really clarify the situation, but they usually have the greatest impact on people who tried to avoid the mess.

+1
source

All Articles