Jump to content

Concern (computer science)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Cander0000 (talk | contribs) at 19:12, 2 December 2007 (refined category using AWB). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Template:Otheruses2

In computer science, a concern is a general term that refers to any particular piece of interest or focus in a program. A non-exhaustive list of example concerns are:

Concerns do not exist until someone is concerned about them, i.e. an arbitrary set of source files does not constitute a concern until a programmer has some reason to be interested in all of them at once. For example, a programmer may realize that a set of source code files collectively implement a design pattern. Thereby, those source files become a concern implementing that design pattern.

Concerns are also created forwards, not retroactively. Programmers write programs in order to achieve certain goals or create features, such as credit card billing or sending email. The source code implementing these features are concerns. Note that features denote behavior itself but that concern denotes the implementation of the behavior.

Typically, the implementation of those features that is most essential to the program are the core concerns since they are core to the way the program behaves.

A concern is cross-cutting to the extent that it is scattered and tangled amongst other concerns. Cross-cutting concerns are generally considered a bad thing when creating software.

For example, when programmers simply insert calls to cross-cutting concerns (such as logging, object persistence, etc.) everywhere in the source code where needed, the resulting program leads to a highly-coupled system. Such systems can be difficult to change. Every time programmers make even a small change to one of these cross-cutting concerns, there is the danger that the change can have wide-spread ramifications to the entire program.

For this reason, Separation of concerns (SoC) forms an important goal in program design. Numerous programming paradigms have arisen to assist in SoC: