On Wed, 2005-07-20 at 08:43 +0200, Borislav Sabev wrote:
> a k wrote:
> 
> >In the process of writing an Action class, I realized that it needs
> >some application functionality (not general utility kinda
> >functionality) that is already part of a method in a different Action
> >class.
> >
> >So, Action MyAction1 needs to access method myMethod2 in Action
> >MyAction2. Here are the options that I could think of:
> >  
> >
> IMHO this breaks OO principle: a class to have one and only one purpose. 
> So instantiate MyAction2 just to use one of it's methods is a bad practice.
> 

It is a bad practice, but it DOES NOT break the OO principle, that's why
OO is an obsolescent model. 

If you look into component-oriented or responsibility (contract) -
oriented architectures, you would find this principle :-)

regards
Leon



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to