Lasagna code
From Wikipedia, the free encyclopedia
This article may not meet the notability guideline for neologisms. If you are familiar with the subject matter, please expand or rewrite the article to establish its notability. The best way to address this concern is to reference published, third-party sources about the subject. If notability cannot be established, the article is more likely to be considered for redirection, merge or ultimately deletion, per Wikipedia:Guide to deletion. This article has been tagged since April 2008. |
This article needs additional citations for verification. Please help improve this article by adding reliable references. Unsourced material may be challenged and removed. (April 2008) |
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.[citation needed]
[edit] See also
- Spaghetti code
- Ravioli code