[Cuis-dev] Push Down Improvements

Hernán Wilkinson hernan.wilkinson at 10pines.com
Wed Nov 2 07:46:49 PDT 2022


Hi Patricio!
 welcome to the Cuis community and list :-)
 I really like your suggestion, it is something we really need. I have
other suggestions for other refactorings if you want to hear them :-)
 You forgot to attach the changes file, please send it to try it out.
 About the tests, if you are using a Cuis image (not a CuisUniversity), you
need to load the package BaseImageTest.pck.st, that is where the tests are.
There you will find the on for PushDownMethod.

Cheers!
Hernan.

On Wed, Nov 2, 2022 at 10:00 AM Patricio Tourne Passarino via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> I have some ideas to improve Push Down Refactor and I was wondering if you
> could give me any feedback.
> I'm Patricio Tourne Passarino and I'm studying Software Engineering at
> FIUBA (Facultad de Ingeniería de la Universidad de Buenos Aires). I was
> introduced to Cuis in my "Algorithms and Coding III" class and I thought of
> a modification that would be usefull in the following case:
>
> I have a class "AClass" with two classes: "ASubclassOne"
> and "ASubclassTwo".
> "AClass" has "aMessage" implemented:
>
> aMessage
>
>     "AClass implementation"
>
> "ASubclassOne" has "aMessage" implemented:
>
> aMessage
>
>     "ASubclassOne implementation"
>
> ​I want to move "AClass" implementation of "aMessage" to all subclasses
> that don't have it implemented allready (without overwriting). Furthermore,
> instead of removing "aMessage" from ​"AClass", I want to change it to:
>
> aMessage
>
>     self subclassResponsibility.
>
>> I propose Push Down has options for this alternative behaviour. I
> implemented a demonstration adding the option "Push Down 2.0" in method
> refactoring options. To reproduce the behaviour described previously, the
> changes file must be imported, then right click on "aMessage" in "AClass",
> in refactorings click on Push Down 2.0, then "Preserve" and then "Yes,
> clean it". This implementation also works for messages with parameters, as
> "aMessage:".
>
> I'm looking forward for your feedback. Also, I would like to know where
> tests should go, as I wasn't able to find any testcases for the other
> refactors to use as reference.
>
> Thank you for your time,
>
> Patricio Tourne Passarino
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 

*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20221102/8351cdff/attachment.htm>


More information about the Cuis-dev mailing list