<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<document>
  <header>
    <title>Avalon Framework - Guide - Multi Dimensional Separation of Concerns</title>
    <authors>
      <person name="Berin Loritsch" email="bloritsch@apache.org"/>
    </authors>
  </header>
  <body>
    <section name="Introduction">
      <p>
        The concept of using different points of view within the system
        goes a long way in the overall comprehension of the system.
      </p>
      <p>You can get more formal information in this paper:
        <a href="http://www.research.ibm.com/hyperspace/MDSOC.htm">Multi-Dimensional Separation of Concerns</a>.
      </p>
      <subsection name="What it Means">
        <p>
          "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.
        </p>
        <p>
          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.
        </p>
      </subsection>
      <subsection name="How to Use It">
        <p>
          There are many ways to separate concern areas, but in Avalon
          we use interfaces to define the concern areas addressed in
          code.
        </p>
        <p>
          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.
        </p>
      </subsection>
    </section>
  </body>
</document>
