According to Wikipedia, the term was originally coined by database expert Joe Selco in 1982, and here is a quote from his 1997 article which shows what he meant by this: โThe standard [structured programming] solution was to replace GOTO nested IF-THEN-ELSE statements and switches that were so deep and so redundant that you had a control path that looked like a plate instead of lasagna. "
However, the same Wikipedia entry defines the term differently, explicitly referring to multi-level applications: "... different subsystems, such as ... web application code, business logic, and a relational database." Thus, the term โmeaningโ evolved as programmers developed new methodologies and architectures.
I can imagine two modern definitions of "Lasagna code":
- layers of a software application that are excessive, over-engineered, or trivial (obviously)
- Layers of software applications that do not have unit tests with proper isolation. The developers only tested the system, disassembling and consuming several layers at once.
The term obviously means criticism (just as you can criticize my stuff by calling it a "spaghetti code"). But what does this mean for you and when do you use it?
source share