Why was it rewritten, because it was difficult to maintain? It sounds like whomsoever rewrote it failed to make it more maintainable, then I would say that is a failure on the part of the person than on the concept of a framework.
Aren't frameworks supposed to prevent this type of thing exactly?
If there's no guarantee, how do we ensure that we don't create an even bigger nightmare code structure when using frameworks? This risk has to be understood before framework choices are made.
> Aren't frameworks supposed to prevent this type of thing exactly?
I'm generalizing, but frameworks reduce program complexity when applied in a thoughtful way to a suitable problem space. If you adopt a framework that isn't suitable to your particular problem, or adopt one that is suitable but fail to learn to use it properly, you will probably increase complexity.
When I said that it was a failure on the part of the person, I meant that there is a possibility that the people responsible for rewriting probably did a bad job at choosing a framework for their problem (perhaps it was too big and complicated?), or maybe they chose a suitable framework but didn't do a good job of implementing it (perhaps they tried to code in their old style?).
> If there's no guarantee, how do we ensure that we don't create an even bigger nightmare code structure when using frameworks? This risk has to be understood before framework choices are made.
This is obvious and I don't believe I made any argument to the contrary. Just like choosing any tool, one must understand it first to make good use of it.