Aspect Modelling and wide interfaces

From: Clifford Heath <cjh_nospam_at_managesoft.com>
Date: Mon, 17 Jun 2002 12:42:29 +1000
Message-ID: <3D0D4C95.4C94E485_at_managesoft.com>


Martin Fowler wrote:
> A class with that many attributes is a bad smell. Often such classes
> should be split into smaller classes.

Sometimes I come across such classes, where the attributes and behaviours can easily be partitioned into functional groups. An example: in a library, the class "Book" has a number of separate facets (logical groups of features of a class, each supporting a set of related interactions. It has interactions with Asset management (purchase records, condition), with Borrowing, and with some other mostly orthogonal aspects. Existing languages allow these groups to be separated into different interfaces, which can reduce complexity in a meaningful way.

I use this insight as the underlying driver behind my thoughts about aspect orientation. The class exposes a facet to more than one aspect of the system, an aspect here being the group of facets that support some system role. I'm designing a data definition language called ADL (Aspect Definition Language) which properly supports facet isolation at a data modelling level.

However, to map that to procedural constructs requires a complete rework of lifecycle concepts from typical O-O languages. I don't know of a language which provides support for isolating the implementation of facets of a single class though. An object may be constructed without all of its facets being "realised". A facet may then later be realised to an existing object. As I see it currently, this requires the RDB notion of key (attributes that form a unique identifier), but I'm still working with that.

In any case, I'd like to know if anyone else is thinking down these lines. (Yes, I'm aware of www.aosd.net - not much of the work indexed there seems to attempt the things I'm after).

--
Clifford Heath
Received on Mon Jun 17 2002 - 04:42:29 CEST

Original text of this message