Lasagna code
From Wikipedia, the free encyclopedia
Lasagna code is a type of program structure, characterized by several well-defined and separable layers, where each layer of code accesses services in the layers below through well-defined interfaces. The term is in comparison with spaghetti code, comparing program structure to pasta. The analogy stems from the layered structure of a plate of lasagna, where different ingredients (meat, sauce, vegetables, or cheese) are each separated by strips of pasta.
One common instance of lasagna code occurs at the interface between different subsystems, such as between web application code, business logic, and a relational database. Another common programming technique, alternate hard and soft layers (use of different programming languages at different levels of the program architecture), tends to produce lasagna code. In general, client-server applications are frequently lasagna code, with well-defined interfaces between client and server.
Lasagna code generally enforces encapsulation between the different "layers", as the subsystems in question may have no means of communication other than through a well-defined mechanism, such as Structured Query Language, a foreign function interface, or Remote Procedure Call. However, individual layers in the system may be highly unstructured or disorganized.
The term was coined by database guru Joe Celko in 1982.
[edit] See also
[edit] External links
- WikiWikiWeb: More Information on Ravioli Code
- What sort of pasta do you want?
- Celko, Joe: "SQL for Smarties: The Future of SQL Programming" (DBMS January 1997)