3.4 Library-Centric Software Design

Another approach to increase re-usability is to apply a LCSD which allows to increase the efficiency of application development in the sense that code reuse decreases development time [77]. LCSD can be seen as the natural companion of the generic programming paradigm, in the sense that functionality is not embedded into a structure but extracted and generalized into a standalone library offering its functionality via an API so it can be accessed by applications or other libraries.

LCSD - although introducing additional short-term development overhead - amortizes in the long run, when the number of utilizing applications or libraries increases. This holds especially true in an academic setting, where typically various simulation codes are available requiring a plethora of functionality. A popular example of the LCSD approach with respect to C++ is the Boost library collection [47].

Overall, LCSD fosters slim applications, meaning that the application itself merely interfaces with various libraries, thus allowing the opportunity to keep the application’s code base to a minimum. This fact not only improves development time of the application, but also supports maintenance, as a small code base results in reduced maintenance time in a straightforward manner.

Figure 3.2 depicts the introduced design concepts with respect to initial development effort as well as degree of reusability and maintainability. The LCSD approach offers the highest initial development effort but also the highest degree of reusability and maintainability.


pict


Figure 3.2: Comparison between monolithic, modular, and LCSD approaches. Left: With monolithic design, functionality is tailored to a specific application, and is thus challenging to reuse or maintain in other projects. Middle: Modular design encapsulates functionality into more accessible modules. Right: LCSD focuses on extracting functionality into libraries. This not only reduces the code base of applications but also enables other libraries to make use of synergy effects. An increasing level of reusability and maintainability typically claims an increased initial development effort, due to additional development overhead.