You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Philipp Oppermann <p....@googlemail.com> on 2012/04/24 14:34:57 UTC

Why everything is stored in Session?

Hi, I'm PHP-Programmer and now switching to java (and wicket ;) ). But
one thing confuses me:

Why everything is stored in Session?

In PHP the session is empty except you put something in. And there's
no "Back-button-problem" in PHP, when you go back then the site with
the previous URL will be loaded.

So why you need to store so much in the session?

Philipp Oppermann

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


Re: RadioChoice vs. RadioGroup

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

The difference is like DropDownChoice vs. Select components.

The *Choice components generate their body by concatenating strings.
Pros: lighter component
Cons: not much control over the generated markup

Select/RadioGroup need children components like SelectOption/Radio
which themselves generate their markup.
Pros: better control over the generated markup per child
Cons: bigger component tree (more memory footprint). Imagine a page
with 200+ options.

On Tue, Apr 24, 2012 at 3:45 PM, Richard W. Adams <RW...@up.com> wrote:
> Can someone explain the important differences (besides the API) between
> RadioChoice & RadioGroup? What scenarios/factors would make one use one
> instead of the other? What are the tradeoffs? Etc. From my quick (perhaps
> naive) reading, they seem like equally plausible ways of doing the same
> thing.
>
> I looked at the javadocs, but they didn't give any useful information to
> help me choose between the two classes.
>
> **
>
> This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient.  Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law.  If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
> **



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


RadioChoice vs. RadioGroup

Posted by "Richard W. Adams" <RW...@UP.COM>.
Can someone explain the important differences (besides the API) between 
RadioChoice & RadioGroup? What scenarios/factors would make one use one 
instead of the other? What are the tradeoffs? Etc. From my quick (perhaps 
naive) reading, they seem like equally plausible ways of doing the same 
thing.

I looked at the javadocs, but they didn't give any useful information to 
help me choose between the two classes.

**

This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient.  Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law.  If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**

Re: Why everything is stored in Session?

Posted by Josh Kamau <jo...@gmail.com>.
Because Wicket is a Stateful java web framework. Not all java web framework
are stateful. Some are stateless e.g playframework.org.

However, some of us prefer a stateful framework. It makes work easy for the
developer.

Welcome to java... A world of options .

Josh.

On Tue, Apr 24, 2012 at 3:34 PM, Philipp Oppermann <
p.oppermann@googlemail.com> wrote:

> Hi, I'm PHP-Programmer and now switching to java (and wicket ;) ). But
> one thing confuses me:
>
> Why everything is stored in Session?
>
> In PHP the session is empty except you put something in. And there's
> no "Back-button-problem" in PHP, when you go back then the site with
> the previous URL will be loaded.
>
> So why you need to store so much in the session?
>
> Philipp Oppermann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Why everything is stored in Session?

Posted by Martin Grigorov <mg...@apache.org>.
On Tue, Apr 24, 2012 at 11:49 PM, Philipp Oppermann
<p....@googlemail.com> wrote:
> Thank you for your fast answer! I think I understood it ;) But reading from
> disk store decreases the performance?! Is wicket scalable anyway?

It scales well for our application. And we run few hundred thousand
concurrent users.
The disk store is hit only if you go several pages back. How often do
you do that anyway ?

>
>
> On 24.04.2012 14:44, Martin Grigorov wrote:
>>
>> Hi,
>>
>> Only the last used instance of the page is stored in the session. And
>> only if this page is stateful.
>> Wicket does this because if the page is stateful and you have a Link
>> in that page for example then clicking on this Link will execute its
>> #onClick() method. To be able to execute it Wicket finds the stored
>> page instance, finds the Link in the page's component tree and
>> executes the method.
>> Without this, Wicket will create a new instance of the page, find the
>> Link and execute its method - this is how stateless page work.
>> Pages are stateless by default until you add the first stateful
>> component or behavior to it.
>>
>> If you go several pages back (you press several times the back button)
>> then Wicket will read the page from the disk store.
>> Read https://cwiki.apache.org/confluence/x/qIaoAQ for more details.
>>
>> On Tue, Apr 24, 2012 at 3:34 PM, Philipp Oppermann
>> <p....@googlemail.com>  wrote:
>>>
>>> Hi, I'm PHP-Programmer and now switching to java (and wicket ;) ). But
>>> one thing confuses me:
>>>
>>> Why everything is stored in Session?
>>>
>>> In PHP the session is empty except you put something in. And there's
>>> no "Back-button-problem" in PHP, when you go back then the site with
>>> the previous URL will be loaded.
>>>
>>> So why you need to store so much in the session?
>>>
>>> Philipp Oppermann
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Why everything is stored in Session?

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Only the last used instance of the page is stored in the session. And
only if this page is stateful.
Wicket does this because if the page is stateful and you have a Link
in that page for example then clicking on this Link will execute its
#onClick() method. To be able to execute it Wicket finds the stored
page instance, finds the Link in the page's component tree and
executes the method.
Without this, Wicket will create a new instance of the page, find the
Link and execute its method - this is how stateless page work.
Pages are stateless by default until you add the first stateful
component or behavior to it.

If you go several pages back (you press several times the back button)
then Wicket will read the page from the disk store.
Read https://cwiki.apache.org/confluence/x/qIaoAQ for more details.

On Tue, Apr 24, 2012 at 3:34 PM, Philipp Oppermann
<p....@googlemail.com> wrote:
> Hi, I'm PHP-Programmer and now switching to java (and wicket ;) ). But
> one thing confuses me:
>
> Why everything is stored in Session?
>
> In PHP the session is empty except you put something in. And there's
> no "Back-button-problem" in PHP, when you go back then the site with
> the previous URL will be loaded.
>
> So why you need to store so much in the session?
>
> Philipp Oppermann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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