Although the term "Software Product Line Engineering" is becoming more widely known, there is still uncertaintyamong developers about how it would apply in their own development context. Inthis article we tackle this problem by describing the design and automatedderivation of the product variants of a Software Product Line using an easy to understand, practical example.
One increasing trend in software development is the need to develop multiple, similar software products instead of just a single individualproduct. There are several reasons for this. Products that are being developedfor the international market must be adapted for different legal or culturalenvironments, as well as for different languages, and so must provide adapteduser interfaces. Because of cost and time constraints it is not possible forsoftware developers to develop a new product from scratch for each new customer,and so software reuse must be increased. These types of problems typically occurin portal or embedded applications, e.g. vehicle control applications [Ste04]. SoftwareProduct Line Engineering (SPLE) offers a solution to these not quite new, but increasingly challenging, problems [Cle01].
The basis of SPLE is the explicit modelling of what is common and what differs between product variants. Feature Models [Kan90],[Cza00] are frequently used for this. SPLE also includes the design andmanagement of a variable software architecture and its constituent (software) components.
This article describes how this is done in practice, using the example of a Product Line of meteorological data systems. Using this examplewe will show how a Product Line is designed, and how product variants can be derived automatically.
Software Product Lines
However, before we introduce the example, we will take a small detour into the basis of SPLE. The main difference from"normal", one-of-a-kind software development is a logical separationbetween the development of core, reusable software assets (the platform),and actual applications. During application development, platform software is selected and configured to meet the specific needs of the application.
The Product Line's commonalities and variabilities are described in the Problem Space. This reflects the desired range ofapplications ("product variants") in the Product Line (the"domain") and their inter-dependencies. So, when producing a productvariant, the application developer uses the problem space definition to describethe desired combination of problem variabilities to implement the product variant.
An associated Solution Space describes the constituent assets of the Product Line (the "platform") and its relation to theproblem space, i.e. rules for how elements of the platform are selected whencertain values in the problem space are selected as part of a product variant.The four-part division resulting from the combination of the problem space and solution space with domain and application engineering is shown in Figure 1.
Figure 1 Overview of SPLE activities
Several different options are available for modelling the information in these four quadrants. The problem space can be described e.g.with Feature Models, or with a Domain Specific Language (DSL).There are also a number of different options for modelling the solution space,for example component libraries, DSL compilers, generative programs and also configuration files. [Cza00].
In the rest of this article we will consider each of these quadrants in turn, beginning with Domain Engineering activities. We will firstlook at modelling the problem space - what is common to, and what differsbetween, the different product variants. Then we will consider one possibleapproach for realising product variants in the solution space using C++ as anexample. Finally, we will look at how Application Engineering is performed byusing the problem and solution space models to create a product variant. Inreality, this linear flow is rarely found in practice. Product Lines usuallyevolve continuously, even after the first product variants have been defined and delivered to customers.
Our example Product Line will contain different products for entry and display of meteorological data on a PC. An initial brainstormingsession has led to a set of possible differences (variation points)between possible products: meteorological data can come from different sensorsattached to the PC, fetched from appropriate Internet services or generateddirectly by the product for demonstration and test purposes. Data can be outputdirectly from the application, distributed as HTML or XML through an integratedWeb server or regularly written to file on a fixed disk. The measurements tomake can also vary: temperature, air pressure, wind velocity and humidity couldall be of interest. Finally the units of measure could also vary (degrees Celsius vs. Fahrenheit, hPa vs. mmHg, m / s vs. Beaufort).