Project refactoring - need some feedback and criticism

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Project refactoring - need some feedback and criticism

David T. Lewis
While working on making MVC reloadable, I found that PopUpMenu needed
some attention. PopUpMenu is in package ST80-Menus, but it is not an
MVC class, and is used widely in both MVC and Morphic projects.

I found what I think is a fairly reasonable way to deal with this,
but I'd like to hear some criticism before applying it to trunk. The
specific concern was that PopUpMenu has some logic that is MVC and
Morphic dependent, but that is not of any general utility and should
not be implemented in Project.

Here is what I did:

- Move PopUpMenu from ST80-Menus to Tools-Menus.

- Implement Project>>dispatchTo:addPrefixAndSend:withArguments: to allow
classes with MVC and Morphic dependencies to dispatch through Project
current to invoke appropriate methods.

- Remove explicit MVC and Morphic dependencies from PopUpMenu. Add the
MVC and Morphic methods to ST80-Tools and Morphic-Tools packages, and
invoke them through Project>>dispatchTo:addPrefixAndSend:withArguments:.

- In packages Morphic and ST80, add support for
Project>>dispatchTo:addPrefixAndSend:withArguments: and for the project
dependent parts of PopUpMenu.

Why this might not be a good idea:

Project>>dispatchTo:addPrefixAndSend:withArguments: relies on string
conversion and naming conventions to invoke methods.

Why this might not be so bad after all:

It works. It is fairly easy to understand. It provides a way to
prevent Project from accumulating a lot of implementation logic for
which it should not be responsible.

The updates are in the inbox, and if nobody thinks this is too horrible
I'll move them into trunk in a day or so.

Thanks,
Dave