Re: [BLACKBOX] Questions about inheritance

From: [at]} <Rainer>
Date: Sun, 13 Mar 2011 07:57:09 +0100

----boundary-LibPST-iamunique-1857719385_-_-
Content-type: text/plain

My motivation up to now is just learning how to create high quality
software with CP.
I am now with CP for some years, but I never had to use OO features.
Creating clean modules and applying classes to get abstract data
types was sufficient for my projects in the past.

Now I am in a situation to know about an interesting technical
problem in detail which I would like to implement in CP as home work,
not as an official project in my company. It's about process control
and deals with automatic test equipment. The application should be
customisable with respect to some different topics (e.g. type of
serial communication to external hardware should be selectable via a
configuration file: RS232 or TCP; some control algorithms should be
adaptable according to the configuration of the machine and the like).

The big picture of the technical process to be controlled is always
the same. But in reality there are some different types of machines,
because they have different number and type of hardware equipment,
different types of control algorithms and different types of calls to
a relational data base for retrieving data about the parts to be
tested automatically and for storing the results of the tests
respectively.

For me as a novice in object oriented design this project seems to
require a small framework which is adaptable to the technical
hardware at hand. Unfortunately I don't know when to apply which of
all these interesting OO concepts and how to do this.

What I have available for learning is
- Hanspeter Mössenböck's book "Object-Oriented Programming in
Oberon-2", 3rd edition
- Clemens Szyperski's book "Component Software", 1st edition
- the BB framework

Implementation inheritance is discouraged in the BB framework and
replaced by object composition. I know about the "fragile base class
problem" and my motivation for posting my questions in this mailing
list is just learning how to do it right the first time :-)

Best regards,
Rainer


Am 13.03.2011 um 03:34 schrieb Wojtek Skulski:

>> I want to avoid implementation inheritance in CP programs. What are
>> the language features I have to rule out ?
>> Is it just the super call which I have to avoid or something else ?
>
> What is the motivation for your desire to avoid some language
> features?
> Research, or practical observations? If the latter, what kind of
> problems
> did the inheritance cause?
>
> Thank you -- W.
>
>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
> LISTSERV{([at]})nowhere.xy


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1857719385_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydG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