You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Vincenzo Vitale <vi...@gmail.com> on 2007/08/24 10:34:16 UTC

Wicket and Spring MVC compared.

Hi all,

any performance comparison out there between Spring MVC and Wicket?


I do want to convince people I'm working with to use Wicket for the
next presentation projects but someone has concerns about the session
usage and performances with Ajax.

There are a lot of post in which is explained this is not a problem
and for example I know using Detachable models is the first best
practice for the first problem but I want to show numbers to my
colleagues... :-)

To compare the memory usage performance I wrote the same simple
application in Wicket (Detachable Models used) and Spring MVC. Both
are using the same service layer (Spring + Hibernate) to retrieve
objects from the db; in the applications there are two stateless
pages: the first one is just a list page without pagination and the
second one is a detail page.

In the database there are 50 elements and I wrote a JMeter script in
which a request for each page is done (a CookieManager is used to
create always a new session) , 10 threads are used with 1 sec of ramp
up and 20 loops per threads. Each application is deployed "alone" in a
JBoss instance.
Then I launch the Jmeter script and use JConsole for the memory analysis.

Something wrong with this? Any Suggestions (more elements in the db,
more threads, more something...)?



Thanks a lot,
Vicio.

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


Re: Wicket and Spring MVC compared.

Posted by Matej Knopp <ma...@gmail.com>.
You should also make sure that you are using DiskPageStore as pagestore.

-Matej

On 8/24/07, Igor Vaynberg <ig...@gmail.com> wrote:
> who cares, he says he has a database in there so the tests should be pretty
> even.
>
> for all we know wicket might be five times slower then spring mvc! and it
> may very well be because spring mvc is so simple in comparison. but who
> cares? a five fold improvement of something that is only five percent of the
> request time to start with is insignificant.
>
> anyway, the only thing to really look for is to make sure the wicket app is
> running in deployment mode when you run the tests. there is also a jmeter
> page on wiki somewhere if you want more clues.
>
> -igor
>
>
> On 8/24/07, Matej Knopp <ma...@gmail.com> wrote:
> >
> > There is not much point in comparing Wicket to Spring MVC. Spring MVC
> > is a very simple action based framework with very little functionality
> > (and probably minimal overhead). So what you would really be comparing
> > is Wicket to JSP (assuming you use JSP as your view layer). Now again,
> > Wicket is a full blown component based framework with advanced state
> > management, while JSP is a simple templating engine. You're trying to
> > compare apples with  cars :)
> >
> > -Matej
> >
> > On 8/24/07, Vincenzo Vitale <vi...@gmail.com> wrote:
> > > Hi all,
> > >
> > > any performance comparison out there between Spring MVC and Wicket?
> > >
> > >
> > > I do want to convince people I'm working with to use Wicket for the
> > > next presentation projects but someone has concerns about the session
> > > usage and performances with Ajax.
> > >
> > > There are a lot of post in which is explained this is not a problem
> > > and for example I know using Detachable models is the first best
> > > practice for the first problem but I want to show numbers to my
> > > colleagues... :-)
> > >
> > > To compare the memory usage performance I wrote the same simple
> > > application in Wicket (Detachable Models used) and Spring MVC. Both
> > > are using the same service layer (Spring + Hibernate) to retrieve
> > > objects from the db; in the applications there are two stateless
> > > pages: the first one is just a list page without pagination and the
> > > second one is a detail page.
> > >
> > > In the database there are 50 elements and I wrote a JMeter script in
> > > which a request for each page is done (a CookieManager is used to
> > > create always a new session) , 10 threads are used with 1 sec of ramp
> > > up and 20 loops per threads. Each application is deployed "alone" in a
> > > JBoss instance.
> > > Then I launch the Jmeter script and use JConsole for the memory
> > analysis.
> > >
> > > Something wrong with this? Any Suggestions (more elements in the db,
> > > more threads, more something...)?
> > >
> > >
> > >
> > > Thanks a lot,
> > > Vicio.
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>

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


Re: Wicket and Spring MVC compared.

Posted by Igor Vaynberg <ig...@gmail.com>.
who cares, he says he has a database in there so the tests should be pretty
even.

for all we know wicket might be five times slower then spring mvc! and it
may very well be because spring mvc is so simple in comparison. but who
cares? a five fold improvement of something that is only five percent of the
request time to start with is insignificant.

anyway, the only thing to really look for is to make sure the wicket app is
running in deployment mode when you run the tests. there is also a jmeter
page on wiki somewhere if you want more clues.

-igor


On 8/24/07, Matej Knopp <ma...@gmail.com> wrote:
>
> There is not much point in comparing Wicket to Spring MVC. Spring MVC
> is a very simple action based framework with very little functionality
> (and probably minimal overhead). So what you would really be comparing
> is Wicket to JSP (assuming you use JSP as your view layer). Now again,
> Wicket is a full blown component based framework with advanced state
> management, while JSP is a simple templating engine. You're trying to
> compare apples with  cars :)
>
> -Matej
>
> On 8/24/07, Vincenzo Vitale <vi...@gmail.com> wrote:
> > Hi all,
> >
> > any performance comparison out there between Spring MVC and Wicket?
> >
> >
> > I do want to convince people I'm working with to use Wicket for the
> > next presentation projects but someone has concerns about the session
> > usage and performances with Ajax.
> >
> > There are a lot of post in which is explained this is not a problem
> > and for example I know using Detachable models is the first best
> > practice for the first problem but I want to show numbers to my
> > colleagues... :-)
> >
> > To compare the memory usage performance I wrote the same simple
> > application in Wicket (Detachable Models used) and Spring MVC. Both
> > are using the same service layer (Spring + Hibernate) to retrieve
> > objects from the db; in the applications there are two stateless
> > pages: the first one is just a list page without pagination and the
> > second one is a detail page.
> >
> > In the database there are 50 elements and I wrote a JMeter script in
> > which a request for each page is done (a CookieManager is used to
> > create always a new session) , 10 threads are used with 1 sec of ramp
> > up and 20 loops per threads. Each application is deployed "alone" in a
> > JBoss instance.
> > Then I launch the Jmeter script and use JConsole for the memory
> analysis.
> >
> > Something wrong with this? Any Suggestions (more elements in the db,
> > more threads, more something...)?
> >
> >
> >
> > Thanks a lot,
> > Vicio.
> >
> > ---------------------------------------------------------------------
> > 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: Wicket and Spring MVC compared.

Posted by Eelco Hillenius <ee...@gmail.com>.
On 8/24/07, Vincenzo Vitale <vi...@gmail.com> wrote:
> Yes I see your point and you are absolutely right but please consider
> that a lot of companies (included mine) have been using Spring MVC for
> a long time and there are a lot of projects already in production
> using that technology and working fine with the IT infrastructure now
> available.

The easiest 'sell' is to look at the problems you had with frameworks
like Spring MVC. Some of us (including me) have actually been involved
in such frameworks before, and decided to go the Wicket route as it
solved actual problems. For me, the initial reason was simply the fact
that model 2 (Spring MVC is a model 2 framework) doesn't scale for
complexity. I had seen too many projects being bogged down by stacking
hack up hack (often involving ad-hoc session usage) to get things done
like wizards, tabs and pageable list. I saw all the money lost on the
fact that we could not create reusable components (so when we had a
similar search function in an app four times, the closest thing to
reuse would always be copy n paste), and after a few months of
developing, these projects got very very brittle due to all these
hacks and code duplication and lack of abstraction. Wicket has been a
ten fold improvement for me when it comes to scaling for complexity.

A secondary reason back then was the fact that I saw many guys just
out of university struggling with model 2. They just learned all these
nice things about object oriented programming, and here they were
procedurally programming in Java (as that is I believe what you do
when you use model 2 frameworks). I believe Wicket helped out a lot
here too, as I saw new programmers picking up web app development more
easily, and as a bonus learning a thing or too about OO programming as
well. The other side to this of course is that if you have people
coming from a PHP background for instance, they actually might find it
harder.

/end rant :)

Eelco

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


Re: Wicket and Spring MVC compared.

Posted by Vincenzo Vitale <vi...@gmail.com>.
Yes I see your point and you are absolutely right but please consider
that a lot of companies (included mine) have been using Spring MVC for
a long time and there are a lot of projects already in production
using that technology and working fine with the IT infrastructure now
available.

Of course IT architects and managers want to know which impact a
change can cause also to be able to perform the correct actions during
the migration (more ram, improving the clusters, firing developers
because with Wicket things are simple... :-) ).


Ciao,
V.

On 8/24/07, Matej Knopp <ma...@gmail.com> wrote:
> There is not much point in comparing Wicket to Spring MVC. Spring MVC
> is a very simple action based framework with very little functionality
> (and probably minimal overhead). So what you would really be comparing
> is Wicket to JSP (assuming you use JSP as your view layer). Now again,
> Wicket is a full blown component based framework with advanced state
> management, while JSP is a simple templating engine. You're trying to
> compare apples with  cars :)
>
> -Matej
>
> On 8/24/07, Vincenzo Vitale <vi...@gmail.com> wrote:
> > Hi all,
> >
> > any performance comparison out there between Spring MVC and Wicket?
> >
> >
> > I do want to convince people I'm working with to use Wicket for the
> > next presentation projects but someone has concerns about the session
> > usage and performances with Ajax.
> >
> > There are a lot of post in which is explained this is not a problem
> > and for example I know using Detachable models is the first best
> > practice for the first problem but I want to show numbers to my
> > colleagues... :-)
> >
> > To compare the memory usage performance I wrote the same simple
> > application in Wicket (Detachable Models used) and Spring MVC. Both
> > are using the same service layer (Spring + Hibernate) to retrieve
> > objects from the db; in the applications there are two stateless
> > pages: the first one is just a list page without pagination and the
> > second one is a detail page.
> >
> > In the database there are 50 elements and I wrote a JMeter script in
> > which a request for each page is done (a CookieManager is used to
> > create always a new session) , 10 threads are used with 1 sec of ramp
> > up and 20 loops per threads. Each application is deployed "alone" in a
> > JBoss instance.
> > Then I launch the Jmeter script and use JConsole for the memory analysis.
> >
> > Something wrong with this? Any Suggestions (more elements in the db,
> > more threads, more something...)?
> >
> >
> >
> > Thanks a lot,
> > Vicio.
> >
> > ---------------------------------------------------------------------
> > 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
>
>

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


Re: Wicket and Spring MVC compared.

Posted by Matej Knopp <ma...@gmail.com>.
There is not much point in comparing Wicket to Spring MVC. Spring MVC
is a very simple action based framework with very little functionality
(and probably minimal overhead). So what you would really be comparing
is Wicket to JSP (assuming you use JSP as your view layer). Now again,
Wicket is a full blown component based framework with advanced state
management, while JSP is a simple templating engine. You're trying to
compare apples with  cars :)

-Matej

On 8/24/07, Vincenzo Vitale <vi...@gmail.com> wrote:
> Hi all,
>
> any performance comparison out there between Spring MVC and Wicket?
>
>
> I do want to convince people I'm working with to use Wicket for the
> next presentation projects but someone has concerns about the session
> usage and performances with Ajax.
>
> There are a lot of post in which is explained this is not a problem
> and for example I know using Detachable models is the first best
> practice for the first problem but I want to show numbers to my
> colleagues... :-)
>
> To compare the memory usage performance I wrote the same simple
> application in Wicket (Detachable Models used) and Spring MVC. Both
> are using the same service layer (Spring + Hibernate) to retrieve
> objects from the db; in the applications there are two stateless
> pages: the first one is just a list page without pagination and the
> second one is a detail page.
>
> In the database there are 50 elements and I wrote a JMeter script in
> which a request for each page is done (a CookieManager is used to
> create always a new session) , 10 threads are used with 1 sec of ramp
> up and 20 loops per threads. Each application is deployed "alone" in a
> JBoss instance.
> Then I launch the Jmeter script and use JConsole for the memory analysis.
>
> Something wrong with this? Any Suggestions (more elements in the db,
> more threads, more something...)?
>
>
>
> Thanks a lot,
> Vicio.
>
> ---------------------------------------------------------------------
> 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


Antwort: AjaxEditableLabel onEdit (solved)

Posted by fh...@s-und-n.de.
Hi, 

i solved it by myself. 
I took a look at the sources and so i got the hint, what to do.

I had to switch between the editor and label from the superclass.
I think, it will work now.


Freundliche Grüße / With kind regards
Fabian Hagen




fhagen@s-und-n.de 
24.08.2007 11:09
Bitte antworten an
users@wicket.apache.org


An
users@wicket.apache.org
Kopie

Thema
AjaxEditableLabel onEdit






Hi, 

in my testapp i'm trying to use an AjaxEditableLabel. When I put some data 

in, it works fine but now comes my Problem.

My label is as Subclass of AjaxEditableLabel and so I tried to implement 
the onEdit() function.
The thing is, that the displayed values might calculated by a formula in 
the back.
If the user clicks on an editable Label the formula should appear instead 
of the calculated value. How do i do this?

My first attemp looks like this:

protected void onEdit(AjaxRequestTarget target)
{
        Position2 position = (Position2)pm.getTarget();
 
        if(position.hasFormulas())
        {
                if(position.getFormula()[index] != null)
                {
                        String output[] = position.getOutput();
                        output[index] = position.getFormula()[index];
                }
        }
 
        target.addComponent(this);
}

The label is bound to an output property from the Position2 class.
This works fine so far. The deposited formula is displayed but not 
editable any more.

What do I have to do to display the formula (if there is one) and keep it 
editable?

Fabian

AjaxEditableLabel onEdit

Posted by fh...@s-und-n.de.
Hi, 

in my testapp i'm trying to use an AjaxEditableLabel. When I put some data 
in, it works fine but now comes my Problem.

My label is as Subclass of AjaxEditableLabel and so I tried to implement 
the onEdit() function.
The thing is, that the displayed values might calculated by a formula in 
the back.
If the user clicks on an editable Label the formula should appear instead 
of the calculated value. How do i do this?

My first attemp looks like this:

protected void onEdit(AjaxRequestTarget target)
{
        Position2 position = (Position2)pm.getTarget();
 
        if(position.hasFormulas())
        {
                if(position.getFormula()[index] != null)
                {
                        String output[] = position.getOutput();
                        output[index] = position.getFormula()[index];
                }
        }
 
        target.addComponent(this);
}

The label is bound to an output property from the Position2 class.
This works fine so far. The deposited formula is displayed but not 
editable any more.

What do I have to do to display the formula (if there is one) and keep it 
editable?

Fabian

Re: Wicket and Spring MVC compared.

Posted by Vincenzo Vitale <vi...@gmail.com>.
Hi Nino,

at the moment I don't want to compare Ajax so in the applications I
wrote for testing it's not used.

Sure, I will post the results here... probably the next week...

Attached the JMeter scripts I wrote (it would be better only one
script but at the moment the urls used are different). I will post
them also in the JMeter user list.


Thanks,
V.

On 8/24/07, Nino Saturnino Martinez Vazquez Wael
<ni...@jayway.dk> wrote:
> I think it's looking okay, did you pick up the thing mentioned on the wiki?
>
> You are not using ajax in Spring MVC? It would be wrong to just plain
> compare non ajax to ajax..
>
> Also you could write to the Jmeter list, to get a broader view of your
> test plan.
>
> Also you'll post results here ?
>
> regards Nino
>
> Vincenzo Vitale wrote:
> > Hi all,
> >
> > any performance comparison out there between Spring MVC and Wicket?
> >
> >
> > I do want to convince people I'm working with to use Wicket for the
> > next presentation projects but someone has concerns about the session
> > usage and performances with Ajax.
> >
> > There are a lot of post in which is explained this is not a problem
> > and for example I know using Detachable models is the first best
> > practice for the first problem but I want to show numbers to my
> > colleagues... :-)
> >
> > To compare the memory usage performance I wrote the same simple
> > application in Wicket (Detachable Models used) and Spring MVC. Both
> > are using the same service layer (Spring + Hibernate) to retrieve
> > objects from the db; in the applications there are two stateless
> > pages: the first one is just a list page without pagination and the
> > second one is a detail page.
> >
> > In the database there are 50 elements and I wrote a JMeter script in
> > which a request for each page is done (a CookieManager is used to
> > create always a new session) , 10 threads are used with 1 sec of ramp
> > up and 20 loops per threads. Each application is deployed "alone" in a
> > JBoss instance.
> > Then I launch the Jmeter script and use JConsole for the memory analysis.
> >
> > Something wrong with this? Any Suggestions (more elements in the db,
> > more threads, more something...)?
> >
> >
> >
> > Thanks a lot,
> > Vicio.
> >
> > ---------------------------------------------------------------------
> > 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: Wicket and Spring MVC compared.

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
I think it's looking okay, did you pick up the thing mentioned on the wiki?

You are not using ajax in Spring MVC? It would be wrong to just plain 
compare non ajax to ajax..

Also you could write to the Jmeter list, to get a broader view of your 
test plan.

Also you'll post results here ?

regards Nino

Vincenzo Vitale wrote:
> Hi all,
>
> any performance comparison out there between Spring MVC and Wicket?
>
>
> I do want to convince people I'm working with to use Wicket for the
> next presentation projects but someone has concerns about the session
> usage and performances with Ajax.
>
> There are a lot of post in which is explained this is not a problem
> and for example I know using Detachable models is the first best
> practice for the first problem but I want to show numbers to my
> colleagues... :-)
>
> To compare the memory usage performance I wrote the same simple
> application in Wicket (Detachable Models used) and Spring MVC. Both
> are using the same service layer (Spring + Hibernate) to retrieve
> objects from the db; in the applications there are two stateless
> pages: the first one is just a list page without pagination and the
> second one is a detail page.
>
> In the database there are 50 elements and I wrote a JMeter script in
> which a request for each page is done (a CookieManager is used to
> create always a new session) , 10 threads are used with 1 sec of ramp
> up and 20 loops per threads. Each application is deployed "alone" in a
> JBoss instance.
> Then I launch the Jmeter script and use JConsole for the memory analysis.
>
> Something wrong with this? Any Suggestions (more elements in the db,
> more threads, more something...)?
>
>
>
> Thanks a lot,
> Vicio.
>
> ---------------------------------------------------------------------
> 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