link
Avalon
Avalon Central
Home PlanetProductsCentral
Introduction

The concept of using different points of view within the system goes a long way in the overall comprehension of the system.

You can get more formal information in this paper: Multi-Dimensional Separation of Concerns.

What it Means

"Separation of Concerns" in its simplest form is separating a problem into different points of view. For instance, the documentation uses the "Separation of Concerns" pattern to make the documents comprehensible (we have separate documents for developers, administrators, and block implementers). The documents also use the pattern with XML and XSL so that the look is separated from the content. Either can change without breaking the other.

This pattern is less clear to point out in the code, however the concept is evident. There are several interfaces included in Avalon that identify an object's role within the system. For instance, all components have certain contracts -- therefore any object that implements the Component interface must comply with those contracts. This allows developers to manipulate components using a standard interface, without worrying about the semantics of the implementation. They are separate concerns.

How to Use It

There are many ways to separate concern areas, but in Avalon we use interfaces to define the concern areas addressed in code.

Every time you use interfaces within Object Oriented Programming (OOP), you are using the "Separation of Concerns" Pattern. The interface separates the concern of the implementation from the concern of the user of the interface. For example, every object that can be configured implements the Configurable interface. The contract surrounding the Configurable interface is that the instantiator of the object passes a Configuration object to the Configurable object (see "Inversion of Control"). Just what the Configurable object does with the passed Configuration object is irrelevant to the instantiator.