Posted by : stefan in (Software Architecture)

Some Things Will Mix – Others Won’t

Tagged Under :

Today , after spending some weeks overthrowing my good intensions over and over to do so, I start this blog on Software Architecture with this posting – I just came home from my usual sunday trip to the Coffee Parlor where I read Grady Booch’s Book on OOA ( ok. actually I’m reading the german translation) which gave me lots of these moments of enlightenment – which come as side effect when faint beliefs and half knowledge got busted, hurling away in a laugh, and a clearer structure becomes visible.
One of the lessons learned this time were for example the the concept of mix-in classes which seem to become useful which languages supporting multiple inheritance – in brief – they add a further layer of abstraction in the class tree deriving from one common super class, while encapsulating certain features of one subcategory of derived classes which is uncommon with another subcategory – such as drums and flutes are both musical instruments – but a parameter “skin tension” does not make any sense in the case of a wind instrument like the flute but on congas, bongos or djembes – therefore “skin tension” will be included in the drum mixin, saving the wind instruments from carrying this burden – while drums won’t have to know anything about mhh.. say parameters like “pipe length”. A mixin always remains abstract – it never ever will be instantiated – but it contains information relevant only to a family of subclasses while others deriving from the same root class stay untainted.
The crucial link between multiple inheritance and mixins, is that mixins could be seen as a further level of indirection – but indeed they wont add no – instead of a new level in the tree the concerned subclasses inherit from the mixin as well as from the base class – in C++ the example might result in a the following declaration public class Conga:public DrumMixin, public MusicalInstrument { ...... }

Posted by : stefan in (Software Architecture)

The start of the journey ..

In the older times every architect started off as a journeyman , visiting many of the important construction sites on the continent -learning by working with the locals, picking up the bits and pieces, which are necessary to develop an understanding of the field, meeting with the masters , and though becoming able to push the state of the art a humble step ahead. I’ll keep this notion while editing this blog, which is some kind a diary of my own journey – if you like to follow me – be my guest – if you see problems, misconceptions or omissions – feel free to comment to make me aware of them – I’m on my way to learn – however you may even do so if think you made profit from reading my blog – enjoy !