Types of Reuse
Concerning motivation and driving factors, reuse can be:
- Opportunistic - While getting ready to begin a project, the team realizes that there are existing components that they can reuse.
- Planned - A team strategically designs components so that they'll be reusable in future projects.
Opportunistic reuse can be categorized further:
- Internal reuse - A team reuses its own components. This may be a business decision, since the team may want to control a component critical to the project.
- External reuse - A team may choose to license a third-party component. Licensing a third-party component typically costs the team 1 to 20 percent of what it would cost to develop internally. The team must also consider the time it takes to find, learn and integrate the component.
Concerning form or structure of reuse, code can be:
- Referenced - The client code contains a reference to reused code, and thus they have distinct life cycles and can have distinct versions.
- Forked - The client code contains a local or private copy of the reused code, and thus they share a single life cycle and a single version.
Fork-reuse is often discouraged because it's a form of code duplication, which requires that every bug is corrected in each copy, and enhancements made to reused code need to be manually merged in every copy or they become out-of-date. However, fork-reuse can have benefits such as isolation, flexibility to change the reused code, easier packaging, deployment and version management.
Read more about this topic: Code Reuse
Famous quotes containing the words types of and/or types:
“Science is intimately integrated with the whole social structure and cultural tradition. They mutually support one otheronly in certain types of society can science flourish, and conversely without a continuous and healthy development and application of science such a society cannot function properly.”
—Talcott Parsons (19021979)
“The wider the range of possibilities we offer children, the more intense will be their motivations and the richer their experiences. We must widen the range of topics and goals, the types of situations we offer and their degree of structure, the kinds and combinations of resources and materials, and the possible interactions with things, peers, and adults.”
—Loris Malaguzzi (19201994)