You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Mind Bridge <mi...@yahoo.com> on 2005/07/05 23:17:49 UTC

scope when persist="client"

Hi,

It seems to me that persist='client' may currently be quite problematic in a
real application, as the properties persisted in that way would be dragged
across the entire applciation. It is an excellent functionality, but it
seems to me it could be rather problematic in real situations in its current
state.

I would suggest to have a way to define the scope of the persistance, so
that when you leave the page, for example, the property would be forgotten.

Here is a possibility:

persist="client:page"

I see three scopes that would be easily at the moment: 'request', 'page',
and 'application'. The default could be 'page'.

This mechanism is very easy to implement with minor modifications of the
existing facilities.

I would also suggest us to have a specific deadline for beta-2. This would
guarantee that all such mods would get in by then and would know what to
expect.

Comments?

Best regards,
-mb


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: scope when persist="client"

Posted by Mind Bridge <mi...@yahoo.com>.
Hi,

I've been thinking about 'client:session', but while this is possible, it
seems to me that the two are like water and oil -- persisting in the client
is "forever", while the session lasts for 30 minutes or so. I may add this
just for completeness, but I am wondering: is there a use case where
'client:session' would be helpful?

I have been thinking about 'session:page' as well. Again it could be
implemented relatively easily, but the Back button, multiple browsers, and
random client requests can confuse things mightlily here -- a propery may be
discarded when you go somewhere else in the app, but the client may then go
back to a page that expects it.

There is a good use case for that, however: caching. A session property with
that scope could be used to cache some data and its presence would not be
obligatory.

----- Original Message ----- 
From: "Jamie Orchard-Hays" <ja...@dang.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Thursday, July 07, 2005 4:46 AM
Subject: Re: scope when persist="client"


> no. MB was talking about client persistence. The only one that seemed
> to be left out was session scope.
>
> Jamie
>
>
> On Jul 6, 2005, at 7:48 PM, Howard Lewis Ship wrote:
>
> > Did you mean, perhaps, persist="session:page"?
> >
> > On 7/5/05, Jamie Orchard-Hays <ja...@dang.com> wrote:
> >
> >> It's a good idea and I would add persist="client:session".
> >>
> >> Jamie
> >>
> >> Mind Bridge wrote:
> >>
> >>> Hi,
> >>>
> >>> It seems to me that persist='client' may currently be quite
> >>> problematic in a
> >>> real application, as the properties persisted in that way would
> >>> be dragged
> >>> across the entire applciation. It is an excellent functionality,
> >>> but it
> >>> seems to me it could be rather problematic in real situations in
> >>> its current
> >>> state.
> >>>
> >>> I would suggest to have a way to define the scope of the
> >>> persistance, so
> >>> that when you leave the page, for example, the property would be
> >>> forgotten.
> >>>
> >>> Here is a possibility:
> >>>
> >>> persist="client:page"
> >>>
> >>> I see three scopes that would be easily at the moment: 'request',
> >>> 'page',
> >>> and 'application'. The default could be 'page'.
> >>>
> >>> This mechanism is very easy to implement with minor modifications
> >>> of the
> >>> existing facilities.
> >>>
> >>> I would also suggest us to have a specific deadline for beta-2.
> >>> This would
> >>> guarantee that all such mods would get in by then and would know
> >>> what to
> >>> expect.
> >>>
> >>> Comments?
> >>>
> >>> Best regards,
> >>> -mb
> >>>
> >>>
> >>> -------------------------------------------------------------------- 
> >>> -
> >>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> >>> For additional commands, e-mail: tapestry-dev-
> >>> help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >>
> >>
> >>
> >
> >
> > -- 
> > Howard M. Lewis Ship
> > Independent J2EE / Open-Source Java Consultant
> > Creator, Jakarta Tapestry
> > Creator, Jakarta HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: scope when persist="client"

Posted by Jamie Orchard-Hays <ja...@dang.com>.
no. MB was talking about client persistence. The only one that seemed  
to be left out was session scope.

Jamie


On Jul 6, 2005, at 7:48 PM, Howard Lewis Ship wrote:

> Did you mean, perhaps, persist="session:page"?
>
> On 7/5/05, Jamie Orchard-Hays <ja...@dang.com> wrote:
>
>> It's a good idea and I would add persist="client:session".
>>
>> Jamie
>>
>> Mind Bridge wrote:
>>
>>> Hi,
>>>
>>> It seems to me that persist='client' may currently be quite  
>>> problematic in a
>>> real application, as the properties persisted in that way would  
>>> be dragged
>>> across the entire applciation. It is an excellent functionality,  
>>> but it
>>> seems to me it could be rather problematic in real situations in  
>>> its current
>>> state.
>>>
>>> I would suggest to have a way to define the scope of the  
>>> persistance, so
>>> that when you leave the page, for example, the property would be  
>>> forgotten.
>>>
>>> Here is a possibility:
>>>
>>> persist="client:page"
>>>
>>> I see three scopes that would be easily at the moment: 'request',  
>>> 'page',
>>> and 'application'. The default could be 'page'.
>>>
>>> This mechanism is very easy to implement with minor modifications  
>>> of the
>>> existing facilities.
>>>
>>> I would also suggest us to have a specific deadline for beta-2.  
>>> This would
>>> guarantee that all such mods would get in by then and would know  
>>> what to
>>> expect.
>>>
>>> Comments?
>>>
>>> Best regards,
>>> -mb
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-dev- 
>>> help@jakarta.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>>
>>
>
>
> -- 
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: scope when persist="client"

Posted by Howard Lewis Ship <hl...@gmail.com>.
Did you mean, perhaps, persist="session:page"?

On 7/5/05, Jamie Orchard-Hays <ja...@dang.com> wrote:
> It's a good idea and I would add persist="client:session".
> 
> Jamie
> 
> Mind Bridge wrote:
> > Hi,
> >
> > It seems to me that persist='client' may currently be quite problematic in a
> > real application, as the properties persisted in that way would be dragged
> > across the entire applciation. It is an excellent functionality, but it
> > seems to me it could be rather problematic in real situations in its current
> > state.
> >
> > I would suggest to have a way to define the scope of the persistance, so
> > that when you leave the page, for example, the property would be forgotten.
> >
> > Here is a possibility:
> >
> > persist="client:page"
> >
> > I see three scopes that would be easily at the moment: 'request', 'page',
> > and 'application'. The default could be 'page'.
> >
> > This mechanism is very easy to implement with minor modifications of the
> > existing facilities.
> >
> > I would also suggest us to have a specific deadline for beta-2. This would
> > guarantee that all such mods would get in by then and would know what to
> > expect.
> >
> > Comments?
> >
> > Best regards,
> > -mb
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: scope when persist="client"

Posted by Jamie Orchard-Hays <ja...@dang.com>.
It's a good idea and I would add persist="client:session".

Jamie

Mind Bridge wrote:
> Hi,
> 
> It seems to me that persist='client' may currently be quite problematic in a
> real application, as the properties persisted in that way would be dragged
> across the entire applciation. It is an excellent functionality, but it
> seems to me it could be rather problematic in real situations in its current
> state.
> 
> I would suggest to have a way to define the scope of the persistance, so
> that when you leave the page, for example, the property would be forgotten.
> 
> Here is a possibility:
> 
> persist="client:page"
> 
> I see three scopes that would be easily at the moment: 'request', 'page',
> and 'application'. The default could be 'page'.
> 
> This mechanism is very easy to implement with minor modifications of the
> existing facilities.
> 
> I would also suggest us to have a specific deadline for beta-2. This would
> guarantee that all such mods would get in by then and would know what to
> expect.
> 
> Comments?
> 
> Best regards,
> -mb
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: scope when persist="client"

Posted by Phil Zoio <ph...@realsolve.co.uk>.
I'm not sure if this is what you had in mind, but I think a variation of 
this could be particularly useful in avoiding the stale links rewind 
problem:

Data which is bound to forms could be encoded into page scoped client 
properties and transparently added (as hidden fields) into any form 
present on the page.
Whenever a page is submitted, data bound controls could be reconstructed 
during rewind using the values obtained from these page-scoped client 
persistent properties.

The components such as base:If and base:For work at the component level, 
but it would be nice to have a more general solution which worked at the 
page level. At the moment I am also using hidden fields to achieve the 
same effect, which is a bit unwieldy.

The idea would be to avoid the rewind problem completely by using the 
following idiom:

- hold any form bound data as page-scoped client persistent properties
- populate these properties during render (but not rewind)
- no hidden fields, no extra calls to the service methods during rewind, 
and no stale links exceptions

Is this doable?




Mind Bridge wrote:

>Hi,
>
>It seems to me that persist='client' may currently be quite problematic in a
>real application, as the properties persisted in that way would be dragged
>across the entire applciation. It is an excellent functionality, but it
>seems to me it could be rather problematic in real situations in its current
>state.
>
>I would suggest to have a way to define the scope of the persistance, so
>that when you leave the page, for example, the property would be forgotten.
>
>Here is a possibility:
>
>persist="client:page"
>
>I see three scopes that would be easily at the moment: 'request', 'page',
>and 'application'. The default could be 'page'.
>
>This mechanism is very easy to implement with minor modifications of the
>existing facilities.
>
>I would also suggest us to have a specific deadline for beta-2. This would
>guarantee that all such mods would get in by then and would know what to
>expect.
>
>Comments?
>
>Best regards,
>-mb
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: scope when persist="client"

Posted by Mind Bridge <mi...@yahoo.com>.
In order to achieve that, you need to be able to define groups of pages
('units'). This could be an extensive undertaking.

While I think it is necessary, that would require quite a few changes. I
would suggest to leave that for 4.1 and concentrate on the easy stuff
first...

----- Original Message ----- 
From: "Karthik Abram" <ka...@neovera.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Wednesday, July 06, 2005 12:57 AM
Subject: RE: scope when persist="client"


>
> But what if I need a property in a flow of 3 pages, but not in the
> application itself?
>
> -----Original Message-----
> From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
> Sent: Tuesday, July 05, 2005 5:18 PM
> To: Tapestry development
> Subject: scope when persist="client"
>
>
> Hi,
>
> It seems to me that persist='client' may currently be quite problematic in
a
> real application, as the properties persisted in that way would be dragged
> across the entire applciation. It is an excellent functionality, but it
> seems to me it could be rather problematic in real situations in its
current
> state.
>
> I would suggest to have a way to define the scope of the persistance, so
> that when you leave the page, for example, the property would be
forgotten.
>
> Here is a possibility:
>
> persist="client:page"
>
> I see three scopes that would be easily at the moment: 'request', 'page',
> and 'application'. The default could be 'page'.
>
> This mechanism is very easy to implement with minor modifications of the
> existing facilities.
>
> I would also suggest us to have a specific deadline for beta-2. This would
> guarantee that all such mods would get in by then and would know what to
> expect.
>
> Comments?
>
> Best regards,
> -mb
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


RE: scope when persist="client"

Posted by Karthik Abram <ka...@neovera.com>.
But what if I need a property in a flow of 3 pages, but not in the
application itself?

-----Original Message-----
From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
Sent: Tuesday, July 05, 2005 5:18 PM
To: Tapestry development
Subject: scope when persist="client"


Hi,

It seems to me that persist='client' may currently be quite problematic in a
real application, as the properties persisted in that way would be dragged
across the entire applciation. It is an excellent functionality, but it
seems to me it could be rather problematic in real situations in its current
state.

I would suggest to have a way to define the scope of the persistance, so
that when you leave the page, for example, the property would be forgotten.

Here is a possibility:

persist="client:page"

I see three scopes that would be easily at the moment: 'request', 'page',
and 'application'. The default could be 'page'.

This mechanism is very easy to implement with minor modifications of the
existing facilities.

I would also suggest us to have a specific deadline for beta-2. This would
guarantee that all such mods would get in by then and would know what to
expect.

Comments?

Best regards,
-mb


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org