Lasagna Code

Lasagna code refers to a broad code design structure that uses several main layers of code to build a program. This is one of several pasta metaphors for code, along with the terms spaghetti code and ravioli code, which are often attributed to Texas database expert and code guru Joe Celko.

One common working definition of lasagna code is that it replaces a more scattered code methodology with one that is structured, and in some sense, unified. One criticism of lasagna code, though, is that since it tends to be monolithic, it can be hard to change one aspect of the greater program. However, fans of the lasagna code design see it as an improvement over spaghetti code, the original metaphor, where, for example, many goto statements in code can create complex sets of strings that may become tangled.

Like other "pasta theories," lasagna code should be evaluated according to how it makes code efficient and accomplishes key goals for developers.

Post a Comment

0 Comments