Feature-Oriented programming

Mikkel Kjær Jensen, kjmikkel@diku.dk

Feature–Oriented programming is a programming methodology which holds that the best way to remove redundancy and improving efficiency, is to create a large number of minor features, which are then linked together in the functions/methods/procedures (from this point on referred to as functions) which takes care of the core functionality. In terms of abstraction, Feature-Oriented Programming primarily focus on the features of a system, instead of the objects that comprise it (as one would in an Object-Oriented language) [1].

Feature–oriented programming can in other words be seen as a modular methodology, which promotes small, tightly focused, but still general purpose, functions, at the expense at large, specific, functions. Most functions should in other words be seen as a single specific tool to complete a single general task (such as a tool in a Swish army knife), while the program itself should have a clear specific purpose. One task that could easily be envisioned would be a sorting function, which relies on a predicate/comparator to know how to sort, since it is so universally useful. Along the same lines one would find that most mathematical functions today are integrated directly into many programming languages' library's (because they are used so often).

The proponents of Feature-oriented programming hold that it would create greater consistency in programming, since the programs would only depend on code being written once, and then referred to (though the code might contain features to change it behaviour under certain conditions). Another benefit is that most functions would be placed centrally, which would mean, unlike Object-Oriented Programming which spread their features across several objects – even though the chain of program calls would always be the same, the functions would be readily available to most of the code.

Feautre-Oriented programming is connected to the field of Generative programming, since the mix-and-match mentality of standardized code “modules” fits well with the idea of a flexible automated code generation system, at a reasonable memory and CPU cost.

[1]

Roberto E. Lopez-Herrejon, University of Texas at Austin Understanding Feature Modularity in Feature Oriented Programming and its Implications to Aspect Oriented Programming

[2]

Christian Prehofer, Münich Technical University Feature-Oriented Programming A Fresh Look at Objects

[3]

Fatima Beltagui, Lancaster University Features and Aspects: Exploring feature-oriented and aspect-oriented programming interactions

Back to the Glossary of Generative Programming Terms
Back to the course home page


Contributor: Mikkel Kjær Jensen
Last modification: 3/2 2006