Re: Best way to handle circular references

2009-09-28 Thread Daniel Stoch
Hi, We have (in our team) the same thoughts :). We treat circular references between packages as an error (bad architecture design) and we use an automatic test case for all projects to check if there are any cycles in packages. So project with such cycles does not pass the tests. It can be a

Re: Best way to handle circular references

2009-09-25 Thread Giovanni Cuccu
I have no problem other than i dont like it, but since I don't like it I'd like to know if someone else had the same thoughts I had and what was the conclusion. Giovanni what is the actual problem you are having with this other then i dont like it? -igor On Wed, Sep 23, 2009 at 3:21 AM,

Re: Best way to handle circular references

2009-09-25 Thread Martin Makundi
Best solution is ignore circular dependencies ;) ** Martin 2009/9/25 Giovanni Cuccu giovanni.cu...@cup2000.it: I have no problem other than i dont like it, but since I don't like it I'd like to know if someone else had the same thoughts I had and what was the conclusion. Giovanni what is

Re: Best way to handle circular references

2009-09-25 Thread Igor Vaynberg
a simple way to decouple the menu from the pages is to mount all the pages and pass the mount urls into the menu instead of the page classes. that way you wont have any imports other then java.lang.String -igor On Fri, Sep 25, 2009 at 12:06 AM, Giovanni Cuccu giovanni.cu...@cup2000.it wrote: I

Re: Best way to handle circular references

2009-09-24 Thread Christian Beil
Hi Giovanni, I absolutely understand what you mean. I recently refactored some Swing GUI code and also tried to remove the circular references. The menu bar of the app's main frame needed a reference to this frame in order to show a modal dialog on it. The frame embeds the menu bar and

Best way to handle circular references

2009-09-23 Thread Giovanni Cuccu
Hi all, I'm developing a wicket application and I'm facing a problem. I built a menupanel that shows the menu to access the various aplication pages; since the panel needs to show the pages it contains a list of links that when clicked simply do the the following

Re: Best way to handle circular references

2009-09-23 Thread Pedro Santos
It looks like you are looking for cohesion. In the class menupanel.java I must reference Page In the class Page.java I must reference MenuPanel menupanel can to be an parameter to PageXXX; PageXXX can to be abstract and have an abstract method : abstract protected Page

Re: Best way to handle circular references

2009-09-23 Thread Giovanni Cuccu
Thanks for the response, I try to clarify my point of view. Before using wicket I don't remember that my classes were cross references, I always paid attention that if class A references Class B Class B can't reference Class A (even in imports). After starting wicket development I've

Re: Best way to handle circular references

2009-09-23 Thread Igor Vaynberg
what is the actual problem you are having with this other then i dont like it? -igor On Wed, Sep 23, 2009 at 3:21 AM, Giovanni Cuccu giovanni.cu...@cup2000.it wrote: Hi all,        I'm developing a wicket application and I'm facing a problem. I built a menupanel that shows the menu to access