|
|
Re: Swing Design Patterns
|
Posted: Dec 20, 2002 4:40 PM
|
|
> It is an interesting question, because someone who knows > Swing can probably understand the cut-and-pasted code, but > not be able to as quickly understand your Chain of > Responsibility implementation. I would say, if it makes > the code more complex (try to imagine it from the point of > view of someone you just hired to maintain the code after > your refactorings), then you need to think some more about > how to make it clean and simple, without all the > cut-and-paste duplication. It if seems like it will be > more clear, then of course, go for it. Sometimes a lot > of duplicate code can be removed by simply creating a few > helper objects or methods.
thx for your reply. in fact the goal of this refactoring is to make the user's Action(s) pluggable into the GUI by means of configuration file. think of Struts , this kind of separation between view and actions and the chaining of handlers once understood becomes a powerful tool, and adding features to the application becomes more easy . Helper classes could be a first step in the refactoring and I've already done half of the work. but it seems to me that at certain level of a development cycle, it's important to have the core of the application stabilized once for all and that addition of features does'nt affect this core with any change.that's my point of view
|
|