Generator based reuse


Concept reuse through patterns relies on describing the concept in an abstract way and leaving it up to the software developer to create an implementation. An alternative approach to concept reuse is generator-based reuse (Biggerstaff, 1998). In this approach reusable knowledge is captured in a program generator system that can be programmed by domain experts using either a domain-oriented language or an interactive CASE tool that supports system generation. The application description specifies, in an abstract way, which reusable components are to be used, how they are to be combined and their parameterisation. Using this information, an operational software system can be generated (Figure 1).

Generator-based reuse takes advantage of the fact that applications in the same domain, such as business systems, have common architectures and carry out comparable functions. For example, as I discuss in Chapter 28 (web chapter), data processing systems normally follow an input-process-output model and usually include operations such as data verification and report generation. Therefore, generic components for selecting items from a database, checking that these are within range and creating reports can be created and incorporated in an application generator. To reuse these components, the programmer simply has to select the data items to be used, the checks to be applied and the format of reports.

Figure 1 Generator-based reuse

Generator-based reuse has been particularly successful for business application systems and there are many different business application generator products available. These may generate complete applications or may partially automate application
creation and leave the programmer to fill in specific details. The generator-based approach to reuse is also used in other areas, including:

These approaches to generator-based reuse take advantage of the common structure of applications in these areas. The technique has also been used in more specific application domains such as command and control systems (O'Connor, et al., 1994) and scientific instrumentation (Butler, 1994) where libraries of components have been developed. Domain experts then use a domain-specific language to compose these components and create applications. However, there is a high initial cost in defining and implementing the domain concepts and composition language. This has meant that many companies are reluctant to take the risks of adopting this approach.

Generator-based reuse is cost-effective for applications such as business data processing.It is much easier for end-users to develop programs using generators compared to other component-based approaches to reuse. Inevitably, however, there are inefficiencies in generated programs. This means that it may not be possible to use this approach in systems with high-performance or throughput requirements.

Generative programming is a key component of emerging techniques of software development that combine program generation with component-based development. Czarnecki and Eisenecher’s book (Czarnecki and Eisenecher, 2000) describes these approaches.

References

Biggerstaff, T. (1998). A perspective of generative reuse. Annals of Software Engineering, 5, 169–226.

Butler, H. (1994). Virtual remote: the centralized expert. HP Journal, 45(5), http://www.hpl.hp.com/hpjournal/94oct/oct94a13.htm.

Czarnecki, K. and Eisenecher, U. (2000). Generative Programming: Methods, Tools, and Applications. Boston: Addison-Wesley.

O’Connor, J., Mansour, C., et al. (1994). Reuse in command and control systems. IEEE Software, 11(4), 70–9.

 


(c) Ian Sommerville 2008