# Code Reuse
Code reuse is the practice of designing and writing code that can be employed in multiple contexts or applications, thereby avoiding the need to create new implementations for each function or application. Its primary objective is to "write once, use many times."
This practice offers numerous advantages, including:
- Efficiency: Reduces development time and effort by eliminating redundant code writing.
- Consistency: Ensures uniform behavior of functions across different parts of an application or in various applications.
- Maintainability: Simplifies updates and error corrections by centralizing the code in a single, reusable base.
Code reuse in web application development is achieved through the utilization of libraries, frameworks, the creation of reusable components, and a code organization that facilitates easy referencing and application of its parts across different sections of an application.
# Implementing code reuse with Modyo
Modyo provides diverse alternatives for code reuse, which may include, depending on the project type:
- Liquid code snippets.
- Widgets shared across multiple sites.
- Micro frontends deployed in various web applications.
- Intermediary libraries or repositories.
- Web Components.
- Design Systems.
- Integration of external libraries into websites or web applications.
Architecture Guide
This guide explores various methods for code reuse, applying patterns and techniques from our reference architecture to optimize the efficiency of development teams.
For questions or support, contact our team of experts (opens new window).