Concept Reuse – Design patterns and Generator Based Reuse

Before we gain the understanding of Concept Reuse , we must have idea on the reuse landscapae.

The Reuse Landscape

Although reuse is often simply thought of as the reuse of system components, there are many different approaches to reuse that may be used.

  • Reuse is possible at a range of levels from simple functions to complete application systems.
  • Many techniques have been developed to support software reuse.
  • The reuse landscape covers the range of possible reuse techniques.

Concept Reuse

Fig: The reuse landscape

Concept reuse

  • When you reuse program or design components, you have to follow the design decisions made by the original developer of the component.
  • This may limit the opportunities for reuse.
  • However, a more abstract form of reuse is concept reuse when a particular approach is described in an implementation independent way and an implementation is then developed.

The two main approaches to concept reuse are:

  • Design patterns
  • Generator based reuse


1. Design Patterns

Design pattern is a general repeatable solution to a commonly occurring problem in software design.

  • A design pattern is not a finished design that can be transformed directly into code. Rather, it is a description or template for how to solve a problem that can be used in many different situations.
  • Design patterns can speed up the development process by providing tested, proven development paradigms.
  • Reusing design patterns helps to improve code readability for coders and architects familiar with the patterns.
  • This should be sufficiently abstract so that it can be reused in different system settings.
  • These patterns often rely on the characteristics of the object characterized by the inheritance and polymorphism.
  • A template for design solution can be reused in different ways but not a concrete design.

Design Pattern Elements

  • Name: A meaningful pattern identifier.
  • Problem description: The complete description of the problem to be addressed.
  • Solution description: A template for a design solution that can be instantiated in different operational context. It is not a concrete design. It is often illustrated graphically.
  • Consequences: The results and trade-offs of applying the pattern. It includes the analysis and experience.

Example: The Observer pattern

  • Name: Observer
  • Description: Separates the display of object state from the object itself allowing alternative displays.
  • Problem description: Used when multiple display of states are needed.
  • Solution description: It is based on the UML description.
  • Consequences: Object optimizations to enhance the performance of a particular display are impractical.Concept Reuse

Fig: Multiple displays using observer pattern

2.  Generator Based Reuse

  • The program generators involve the reuse of standard programs and algorithms.
  • These are embedded in the generator and parameterized by the user command and a program is then automatically generated.
  • Generator-Based reuse is possible when domain abstraction and their mapping to executable code can be identified.
  • A domain specific language is used to compose and control these abstractions.

Types of program generator

  1. Application generator for business data processing
  2. Parse and lexical analyzer generator for language processing
  3. Code generators in CASE tools

Generator based reuse is very cost effective but its applicability is limited to a relatively small number of application domains.It is easier for end-users to develop programs using generators compared to other component based approaches to reuse.


373 total views, 3 views today

A Soon-to-be Computer Engineer by profession, he has profound devotion to add Data Scientist as a prefix to his name. He’s been to the nooks of the web (at least of the surface web) and planning to add some real figures in his pocket!

Leave a Reply