You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by romanasu <da...@yahoo.com> on 2012/04/20 14:40:25 UTC

Sonar (Architecture) and Wicket

There is a web application using sonar for code analyses.
I have some problems with cycling dependencies.
For example, i have a TemplatePage(in com.myPackage) which is extended by
all others pages. In the TemplatePage there are BookmarkablePageLink to some
pages from site(for example, LoginPage- in in com.myPackage.login - wich
extends TemplatePage).
Sonar is complaining that there is a suspect dependency (cycle) between
TemplatePage and LoginPage (template has a reference to login, and login
extends template).

Another similar example: I have a CustomPanel (in com.myPackage.panel) with
BookmarkablePageLink to CustomPage (in com.myPackage.customPage). Also,
suspect dependency cycle is thrown.
	
Any ideas how to resolve these problems ?

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Sonar-Architecture-and-Wicket-tp4573798p4573798.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Sonar (Architecture) and Wicket

Posted by Martijn Dashorst <ma...@gmail.com>.
Are you building software for your customers/users or to satisfy
random quirks of some fricking tool?

Martijn

On Wed, Apr 25, 2012 at 12:22 PM, romanasu <da...@yahoo.com> wrote:
> Copy&paste from Sonar:
>
> Package tangle index
> 11.7%
>> 46 cycles
>
> Dependencies to cut
> 13 between packages
> 16 between files
>
> Sonar say (probably true) that there are 'Suspect dependency (cycle)'
> between packages and also between files, and then i receive a low grade on
> Architecture.
>
> For example, one suspect cycling dependency is:
> com.myPackage.TemplatePage      USES com.myPackage.login.LoginPage
>
> If i move LoginPage to com.myPackage, sonar will be very happy, but, I don't
> like this stupid solution.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Sonar-Architecture-and-Wicket-tp4573798p4586175.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Sonar (Architecture) and Wicket

Posted by Igor Vaynberg <ig...@gmail.com>.
these types of cycles are common in applications. they are only a
problem *iff* you want to separate your base page into a different jar
than the subclass pages. if you are planning on doing that there are
well known patterns for how to do that, but they will make your code
more complex.

so you have to weigh whether or not the complexity is a reasonable tradeoff.

-igor

On Wed, Apr 25, 2012 at 3:22 AM, romanasu <da...@yahoo.com> wrote:
> Copy&paste from Sonar:
>
> Package tangle index
> 11.7%
>> 46 cycles
>
> Dependencies to cut
> 13 between packages
> 16 between files
>
> Sonar say (probably true) that there are 'Suspect dependency (cycle)'
> between packages and also between files, and then i receive a low grade on
> Architecture.
>
> For example, one suspect cycling dependency is:
> com.myPackage.TemplatePage      USES com.myPackage.login.LoginPage
>
> If i move LoginPage to com.myPackage, sonar will be very happy, but, I don't
> like this stupid solution.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Sonar-Architecture-and-Wicket-tp4573798p4586175.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Sonar (Architecture) and Wicket

Posted by romanasu <da...@yahoo.com>.
Copy&paste from Sonar:

Package tangle index
11.7%
> 46 cycles
	
Dependencies to cut
13 between packages
16 between files

Sonar say (probably true) that there are 'Suspect dependency (cycle)'
between packages and also between files, and then i receive a low grade on
Architecture.

For example, one suspect cycling dependency is: 
com.myPackage.TemplatePage 	USES com.myPackage.login.LoginPage

If i move LoginPage to com.myPackage, sonar will be very happy, but, I don't
like this stupid solution.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Sonar-Architecture-and-Wicket-tp4573798p4586175.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Sonar (Architecture) and Wicket

Posted by Igor Vaynberg <ig...@gmail.com>.
why exactly are they "problems"?

-igor

On Fri, Apr 20, 2012 at 5:40 AM, romanasu <da...@yahoo.com> wrote:
> There is a web application using sonar for code analyses.
> I have some problems with cycling dependencies.
> For example, i have a TemplatePage(in com.myPackage) which is extended by
> all others pages. In the TemplatePage there are BookmarkablePageLink to some
> pages from site(for example, LoginPage- in in com.myPackage.login - wich
> extends TemplatePage).
> Sonar is complaining that there is a suspect dependency (cycle) between
> TemplatePage and LoginPage (template has a reference to login, and login
> extends template).
>
> Another similar example: I have a CustomPanel (in com.myPackage.panel) with
> BookmarkablePageLink to CustomPage (in com.myPackage.customPage). Also,
> suspect dependency cycle is thrown.
>
> Any ideas how to resolve these problems ?
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Sonar-Architecture-and-Wicket-tp4573798p4573798.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org