is like RavioliCode
, but using several layers of code.
You can't just replace one layer with another, they are are tangled together.
I think one problem with LasagnaCode
is that it often has a handful of completely un-tangled layers (perhaps in which dependency only goes in one direction), but each layer taken individually is a BigBallOfMud
. It's as if folks created rules for how layers should interact with each other, and as long as they follow those rules, anything is fair game -- there is little or no InformationHiding
within a single layer. The result is that it is simple to replace an entire layer, but still difficult to replace individual components within a layer.
Perhaps a solution is that if you decide you want a layered architecture, then each layer of lasagna should have the characteristics of RavioliCode
claims to have coined the term "LasagnaCode
"; anyone know whether that's true?
He said: "I coined the term "lasagna code" in my column in Information Systems News (now Information Week) in 1982 for a occurrence that was well-known among people teaching structured methods. In those days, we were worried about "spaghetti code," which referred to programs with indiscriminate GOTO statements that jumped forward and backward in the program. This tangled structure left you with a path of control through the program that looked like a plate of spaghetti."
"The standard solution was to replace the GOTOs with nested IF-THEN-ELSE statements and switches that were layered so deep and had so much redundancy that you had a path of control that looked like a plate of lasagna instead. When you have a program with complicated logic, you really should make a decision table and code from it."
A type of PastaCode