Glue code
In computer programming, glue code is code that allows components to interoperate that otherwise are incompatible. The adapter pattern describes glue code as a software design pattern.
Glue code describes language bindings or foreign function interfaces such as the Java Native Interface (JNI).
Glue code may be written to access existing libraries, map objects to a database using object-relational mapping, or integrate commercial off-the-shelf programs.
Glue code may be written in the same language as the code it is gluing together, or in a separate glue language.
Glue code can be key to rapid prototyping.
See also
- Adapter pattern
- Scripting language
- Shell script
- SWIG
- Lua (programming language)
- Glue logic
- WinGlue
- Wrapper function
- Wrapper library
- Method stub
References
- Stolpmann, Gerd. "Chapter 5. Complex packages: Glue code". findlib User's Guide. Caml City.
- Pryce, Nathaniel. "Glue Code". Scripting. Patterns. Department of Computing, Imperial College London. Archived from the original on 2017-03-31.
- Lethbridge, Timothy C.; Laganière, Robert (2001-11-21) [Summer 2001]. "Object Oriented Software Engineering: Practical Software Development using UML and Java". McGraw Hill / University of Ottawa. Glue Code. Archived from the original on 2017-07-12.