You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2005/12/20 23:17:24 UTC

[DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

I hope to abolish the rewind cycle in Tapestry 4.1.

Part of this was to deprecate the ActionLink component and action
service in 4.0 so that they could be removed in 4.1.

The outline of my approach is that there will be a single hidden form
field into which a series of objects will be serialized during the
render. These objects will control the form submission processing and
will incrementally restore server-side state during the processing.
Thus the order of operations during the render will DIRECTLY control
the order of operations during the form submission.  Today, we rely on
the awkward rewind cycle, which is based on re-rendering the form and
its contents, validating against a list of form element ids.

Rather than many small hidden fields (for each For, If and Hidden,
component, as well as others) all such data will be accumulated in a
single bytestream.  There is an economy of scale here ... a single
long serialized bytestream (gzipped and perhaps encrypted, then MIME
encoded) will be smaller than the sum of many individual hidden fields
(squeezed with the DataSqueezer, which often uses
serialization/gzip/MIME anyway).

I'm still struggling, however, with how to properly deal with more
dynamic ("Ajax") forms. Possibly, we'll support multiple bytestreams
handled sequentially, to cover dynamically appended forms.

On 12/20/05, Edward Scanzano <es...@yahoo.com> wrote:
> While we are the subject, will Tapestry's reliance on rewinding be revisited. Is there not alternative to this process. Also, we could also use more formal support for dynamic forms. Is this possible?
>
>  Thanks
>  E
>
> ----- Original Message ----
> From: Sergei Dubov <sd...@gmail.com>
> To: Tapestry users <ta...@jakarta.apache.org>
> Sent: Tuesday, December 20, 2005 13:11:11
> Subject: Re: [DISCUSS] JDK 1.5 for Tapestry 4.1?
>
> Every client I've talked is ready to adopt 1.5. The only reservation is
> formal support for some app servers. But I all the major vendors will
> have their products certified on 1.5 by the end of '05.
>
> In other words, I strongly support the idea. I really enjoy working on 1.5.
>
> Serge
>
>
>
> Howard Lewis Ship wrote:
> > With Tapestry 4.0 winding down, some of us are already looking forward
> > to Tapestry 4.1.
> >
> > Now, we would hope that 4.1 will not have as long a life cycle as 4.0,
> > which was 50% too long.  I would hope for a final 4.1 by Q3 2006.
> >
> > One thing that I, personally, would like would be to start re-working
> > the APIs to make use of JDK 1.5 annotations and generics.  Unlike the
> > add-one annotation support in Tapestry 4.0, this would MANDATE JDK 1.5
> > for development and production.
> >
> > This is obviously a contentious issue, so I'm asking people to look
> > into their personal crystal ball and see what they and they're
> > organization will look like by next summer, in terms of JDK adoption.
> >
> > --
> > 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-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-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: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Thomas Christensen <tc...@nordija.com>.
I would suggest that the rewind cycle was kept on as optional. It  
will make it easier to port older applications without changing all  
forms. Could be made deprecated but should just go away in 4.1.

Could the client side state just be primary keys instead of complete  
serialised objects? A bit like the For component does today?

Cheers

Thomas

On 21/12/2005, at 0.01, Leonardo Quijano Vincenzi wrote:

> Howard, can't these major changes be wrapped up in single point  
> releases?
>
> 4.1: Delete the rewind cycle
> 4.2: Rework component interfaces..
>
> and such??
>
> Q3 2006 seems like a lot! Almost a year..
>
> -- 
> Ing. Leonardo Quijano Vincenzi
> DTQ Software
>
>
> Howard Lewis Ship wrote:
>> I hope to abolish the rewind cycle in Tapestry 4.1.
>>
>> Part of this was to deprecate the ActionLink component and action
>> service in 4.0 so that they could be removed in 4.1.
>>
>> The outline of my approach is that there will be a single hidden form
>> field into which a series of objects will be serialized during the
>> render. These objects will control the form submission processing and
>> will incrementally restore server-side state during the processing.
>> Thus the order of operations during the render will DIRECTLY control
>> the order of operations during the form submission.  Today, we  
>> rely on
>> the awkward rewind cycle, which is based on re-rendering the form and
>> its contents, validating against a list of form element ids.
>>
>> Rather than many small hidden fields (for each For, If and Hidden,
>> component, as well as others) all such data will be accumulated in a
>> single bytestream.  There is an economy of scale here ... a single
>> long serialized bytestream (gzipped and perhaps encrypted, then MIME
>> encoded) will be smaller than the sum of many individual hidden  
>> fields
>> (squeezed with the DataSqueezer, which often uses
>> serialization/gzip/MIME anyway).
>>
>> I'm still struggling, however, with how to properly deal with more
>> dynamic ("Ajax") forms. Possibly, we'll support multiple bytestreams
>> handled sequentially, to cover dynamically appended forms.
>>
>>
>
>
> ---------------------------------------------------------------------
> 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-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Howard Lewis Ship <hl...@gmail.com>.
The structural changes starting in 4.0 and continuing in 4.1 and
beyond are to make it easier to add features without breaking
backwards compatibility.  Less API == less to maintain compatibility
with.

I've also been thinking about adding some annotations to mark
interfaces and classes as internal.  Referencing internal types from
non-internal types should be marked as a warning.  This will allow us
a fine grained approach to marking types as internal, not to be used
and abused, short of a non-backwards compatible package restructuring.

Maven 2 seems to be coming together; I suspect that early on, HiveMind
and Tapestry will build under Maven 2. This will make frequent
releases  much less critical, since building latest and greatest from
SVN will simply require a single command.

I'm also finally swayed on a more Apache style of release numbering
and releasing, where the "quality" of a release (beta, final, etc.) is
voted on AFTER the release has been out and about.  So, say, Tapestry
4.1.6 may be the first beta, and Tapestry 4.1.10 may be the final
release.  4.1.11 would be alpha or beta, and eventually there would be
a, say, 4.1.20 that would be the new stable 4.1 branch release.  This
is how most Apache projects, including Struts and the web server
operate.


On 12/20/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> I'm thinking more of a 4-6 month release cycle, like other OS software
> projects do. It's a good balance between the two.
>
> As for me, I'd prefer a more continuous release cycle, specially because
> of the regressions. I prefer a gradual breaking change that I can absorb
> in several release cycles, than justifying a large migration - which is
> of course, full of dangerous pitfalls. The other problem is that a
> 1-year / 3 quarters release schedule easily goes into a full 2 year
> schedule or more. How long did you guys thought "Tapestry 3.1" was going
> to take when you started it? And now we're looking forward to even more
> breaking changes. So... strap yourselves for a 3 year release cycle!
> Certainly not a good way to go with full competition from JSF and
> related frameworks!
>
> Now, what limits you from just grabbing 4.2 and ignoring the 4.1 release?
>
> "release early, release often" doesn't mean "upgrade early, upgrade
> often" ;).
>
> --
> Ing. Leonardo Quijano Vincenzi
> DTQ Software
>
>
> Patrick Casey wrote:
> >       Eeek! Maybe I'm weird on this one, but I'd much rather have a small
> > number of big releases than a continuous upgrade cycle.
> >
> >       Every time I change a core library, it's a regression testing
> > nightmare. Even if nothing at all breaks, I still have to go back and ensure
> > that fact. I can deal with changing tapestry jars every year or so and not
> > feel bad about it, but anything significantly faster than than (like monthly
> > or quarterly releases) would make my life much harder, not easier.
> >
> >       The only way I could see that sort of release cycle working is if
> > Howard could *guarantee* that the monthly releases never, ever, broke
> > backward compatibility. That way I could skip the regression tests, but
> > frankly that's a huge pile of turd for Howard to have to shovel as it's not
> > really practical. I can't think of a single OS project that can make such a
> > guarantee (even hibernate breaks something of mine virtually every time they
> > release).
> >
> >       --- Pat
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-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: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Howard Lewis Ship <hl...@gmail.com>.
The structural changes starting in 4.0 and continuing in 4.1 and
beyond are to make it easier to add features without breaking
backwards compatibility.  Less API == less to maintain compatibility
with.

I've also been thinking about adding some annotations to mark
interfaces and classes as internal.  Referencing internal types from
non-internal types should be marked as a warning.  This will allow us
a fine grained approach to marking types as internal, not to be used
and abused, short of a non-backwards compatible package restructuring.

Maven 2 seems to be coming together; I suspect that early on, HiveMind
and Tapestry will build under Maven 2. This will make frequent
releases  much less critical, since building latest and greatest from
SVN will simply require a single command.

I'm also finally swayed on a more Apache style of release numbering
and releasing, where the "quality" of a release (beta, final, etc.) is
voted on AFTER the release has been out and about.  So, say, Tapestry
4.1.6 may be the first beta, and Tapestry 4.1.10 may be the final
release.  4.1.11 would be alpha or beta, and eventually there would be
a, say, 4.1.20 that would be the new stable 4.1 branch release.  This
is how most Apache projects, including Struts and the web server
operate.


On 12/20/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> I'm thinking more of a 4-6 month release cycle, like other OS software
> projects do. It's a good balance between the two.
>
> As for me, I'd prefer a more continuous release cycle, specially because
> of the regressions. I prefer a gradual breaking change that I can absorb
> in several release cycles, than justifying a large migration - which is
> of course, full of dangerous pitfalls. The other problem is that a
> 1-year / 3 quarters release schedule easily goes into a full 2 year
> schedule or more. How long did you guys thought "Tapestry 3.1" was going
> to take when you started it? And now we're looking forward to even more
> breaking changes. So... strap yourselves for a 3 year release cycle!
> Certainly not a good way to go with full competition from JSF and
> related frameworks!
>
> Now, what limits you from just grabbing 4.2 and ignoring the 4.1 release?
>
> "release early, release often" doesn't mean "upgrade early, upgrade
> often" ;).
>
> --
> Ing. Leonardo Quijano Vincenzi
> DTQ Software
>
>
> Patrick Casey wrote:
> >       Eeek! Maybe I'm weird on this one, but I'd much rather have a small
> > number of big releases than a continuous upgrade cycle.
> >
> >       Every time I change a core library, it's a regression testing
> > nightmare. Even if nothing at all breaks, I still have to go back and ensure
> > that fact. I can deal with changing tapestry jars every year or so and not
> > feel bad about it, but anything significantly faster than than (like monthly
> > or quarterly releases) would make my life much harder, not easier.
> >
> >       The only way I could see that sort of release cycle working is if
> > Howard could *guarantee* that the monthly releases never, ever, broke
> > backward compatibility. That way I could skip the regression tests, but
> > frankly that's a huge pile of turd for Howard to have to shovel as it's not
> > really practical. I can't think of a single OS project that can make such a
> > guarantee (even hibernate breaks something of mine virtually every time they
> > release).
> >
> >       --- Pat
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-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-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Leonardo Quijano Vincenzi <le...@dtqsoftware.com>.
I'm thinking more of a 4-6 month release cycle, like other OS software 
projects do. It's a good balance between the two.

As for me, I'd prefer a more continuous release cycle, specially because 
of the regressions. I prefer a gradual breaking change that I can absorb 
in several release cycles, than justifying a large migration - which is 
of course, full of dangerous pitfalls. The other problem is that a 
1-year / 3 quarters release schedule easily goes into a full 2 year 
schedule or more. How long did you guys thought "Tapestry 3.1" was going 
to take when you started it? And now we're looking forward to even more 
breaking changes. So... strap yourselves for a 3 year release cycle! 
Certainly not a good way to go with full competition from JSF and 
related frameworks!

Now, what limits you from just grabbing 4.2 and ignoring the 4.1 release?

"release early, release often" doesn't mean "upgrade early, upgrade 
often" ;).

-- 
Ing. Leonardo Quijano Vincenzi
DTQ Software


Patrick Casey wrote:
> 	Eeek! Maybe I'm weird on this one, but I'd much rather have a small
> number of big releases than a continuous upgrade cycle.
>
> 	Every time I change a core library, it's a regression testing
> nightmare. Even if nothing at all breaks, I still have to go back and ensure
> that fact. I can deal with changing tapestry jars every year or so and not
> feel bad about it, but anything significantly faster than than (like monthly
> or quarterly releases) would make my life much harder, not easier.
>
> 	The only way I could see that sort of release cycle working is if
> Howard could *guarantee* that the monthly releases never, ever, broke
> backward compatibility. That way I could skip the regression tests, but
> frankly that's a huge pile of turd for Howard to have to shovel as it's not
> really practical. I can't think of a single OS project that can make such a
> guarantee (even hibernate breaks something of mine virtually every time they
> release).
>
> 	--- Pat
>   



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


RE: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Patrick Casey <pa...@adelphia.net>.
	Eeek! Maybe I'm weird on this one, but I'd much rather have a small
number of big releases than a continuous upgrade cycle.

	Every time I change a core library, it's a regression testing
nightmare. Even if nothing at all breaks, I still have to go back and ensure
that fact. I can deal with changing tapestry jars every year or so and not
feel bad about it, but anything significantly faster than than (like monthly
or quarterly releases) would make my life much harder, not easier.

	The only way I could see that sort of release cycle working is if
Howard could *guarantee* that the monthly releases never, ever, broke
backward compatibility. That way I could skip the regression tests, but
frankly that's a huge pile of turd for Howard to have to shovel as it's not
really practical. I can't think of a single OS project that can make such a
guarantee (even hibernate breaks something of mine virtually every time they
release).

	--- Pat

> -----Original Message-----
> From: Stephane Decleire [mailto:sdecleire@cariboo-networks.com]
> Sent: Tuesday, December 20, 2005 4:07 PM
> To: Tapestry users
> Subject: Re: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1
> 
> That's a great idea !
> We could have a continuous upgrade process instead of a huge amount of
> modifications on Q3 2006.
> 
> Stephane
> 
> Leonardo Quijano Vincenzi wrote:
> 
> > Howard, can't these major changes be wrapped up in single point
> releases?
> >
> > 4.1: Delete the rewind cycle
> > 4.2: Rework component interfaces..
> >
> > and such??
> >
> > Q3 2006 seems like a lot! Almost a year..
> >
> 
> --
> Stéphane Decleire
> 
> 05 56 57 99 20
> 06 63 78 69 06




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


Re: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Stephane Decleire <sd...@cariboo-networks.com>.
That's a great idea !
We could have a continuous upgrade process instead of a huge amount of 
modifications on Q3 2006.

Stephane

Leonardo Quijano Vincenzi wrote:

> Howard, can't these major changes be wrapped up in single point releases?
>
> 4.1: Delete the rewind cycle
> 4.2: Rework component interfaces..
>
> and such??
>
> Q3 2006 seems like a lot! Almost a year..
>

-- 
Stéphane Decleire

05 56 57 99 20
06 63 78 69 06


Re: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Thomas Christensen <tc...@nordija.com>.
I would suggest that the rewind cycle was kept on as optional. It  
will make it easier to port older applications without changing all  
forms. Could be made deprecated but should just go away in 4.1.

Could the client side state just be primary keys instead of complete  
serialised objects? A bit like the For component does today?

Cheers

Thomas

On 21/12/2005, at 0.01, Leonardo Quijano Vincenzi wrote:

> Howard, can't these major changes be wrapped up in single point  
> releases?
>
> 4.1: Delete the rewind cycle
> 4.2: Rework component interfaces..
>
> and such??
>
> Q3 2006 seems like a lot! Almost a year..
>
> -- 
> Ing. Leonardo Quijano Vincenzi
> DTQ Software
>
>
> Howard Lewis Ship wrote:
>> I hope to abolish the rewind cycle in Tapestry 4.1.
>>
>> Part of this was to deprecate the ActionLink component and action
>> service in 4.0 so that they could be removed in 4.1.
>>
>> The outline of my approach is that there will be a single hidden form
>> field into which a series of objects will be serialized during the
>> render. These objects will control the form submission processing and
>> will incrementally restore server-side state during the processing.
>> Thus the order of operations during the render will DIRECTLY control
>> the order of operations during the form submission.  Today, we  
>> rely on
>> the awkward rewind cycle, which is based on re-rendering the form and
>> its contents, validating against a list of form element ids.
>>
>> Rather than many small hidden fields (for each For, If and Hidden,
>> component, as well as others) all such data will be accumulated in a
>> single bytestream.  There is an economy of scale here ... a single
>> long serialized bytestream (gzipped and perhaps encrypted, then MIME
>> encoded) will be smaller than the sum of many individual hidden  
>> fields
>> (squeezed with the DataSqueezer, which often uses
>> serialization/gzip/MIME anyway).
>>
>> I'm still struggling, however, with how to properly deal with more
>> dynamic ("Ajax") forms. Possibly, we'll support multiple bytestreams
>> handled sequentially, to cover dynamically appended forms.
>>
>>
>
>
> ---------------------------------------------------------------------
> 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: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Leonardo Quijano Vincenzi <le...@dtqsoftware.com>.
Howard, can't these major changes be wrapped up in single point releases?

4.1: Delete the rewind cycle
4.2: Rework component interfaces..

and such??

Q3 2006 seems like a lot! Almost a year..

-- 
Ing. Leonardo Quijano Vincenzi
DTQ Software


Howard Lewis Ship wrote:
> I hope to abolish the rewind cycle in Tapestry 4.1.
>
> Part of this was to deprecate the ActionLink component and action
> service in 4.0 so that they could be removed in 4.1.
>
> The outline of my approach is that there will be a single hidden form
> field into which a series of objects will be serialized during the
> render. These objects will control the form submission processing and
> will incrementally restore server-side state during the processing.
> Thus the order of operations during the render will DIRECTLY control
> the order of operations during the form submission.  Today, we rely on
> the awkward rewind cycle, which is based on re-rendering the form and
> its contents, validating against a list of form element ids.
>
> Rather than many small hidden fields (for each For, If and Hidden,
> component, as well as others) all such data will be accumulated in a
> single bytestream.  There is an economy of scale here ... a single
> long serialized bytestream (gzipped and perhaps encrypted, then MIME
> encoded) will be smaller than the sum of many individual hidden fields
> (squeezed with the DataSqueezer, which often uses
> serialization/gzip/MIME anyway).
>
> I'm still struggling, however, with how to properly deal with more
> dynamic ("Ajax") forms. Possibly, we'll support multiple bytestreams
> handled sequentially, to cover dynamically appended forms.
>
>   


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


Re: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Leonardo Quijano Vincenzi <le...@dtqsoftware.com>.
Howard, can't these major changes be wrapped up in single point releases?

4.1: Delete the rewind cycle
4.2: Rework component interfaces..

and such??

Q3 2006 seems like a lot! Almost a year..

-- 
Ing. Leonardo Quijano Vincenzi
DTQ Software


Howard Lewis Ship wrote:
> I hope to abolish the rewind cycle in Tapestry 4.1.
>
> Part of this was to deprecate the ActionLink component and action
> service in 4.0 so that they could be removed in 4.1.
>
> The outline of my approach is that there will be a single hidden form
> field into which a series of objects will be serialized during the
> render. These objects will control the form submission processing and
> will incrementally restore server-side state during the processing.
> Thus the order of operations during the render will DIRECTLY control
> the order of operations during the form submission.  Today, we rely on
> the awkward rewind cycle, which is based on re-rendering the form and
> its contents, validating against a list of form element ids.
>
> Rather than many small hidden fields (for each For, If and Hidden,
> component, as well as others) all such data will be accumulated in a
> single bytestream.  There is an economy of scale here ... a single
> long serialized bytestream (gzipped and perhaps encrypted, then MIME
> encoded) will be smaller than the sum of many individual hidden fields
> (squeezed with the DataSqueezer, which often uses
> serialization/gzip/MIME anyway).
>
> I'm still struggling, however, with how to properly deal with more
> dynamic ("Ajax") forms. Possibly, we'll support multiple bytestreams
> handled sequentially, to cover dynamically appended forms.
>   



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


Re: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Pedro Abelleira Seco <pe...@usc.es>.
> I hope to abolish the rewind cycle in Tapestry 4.1.
> 

Yes, please!




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


Polymorphism, Action service, rewind (was [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1)

Posted by Mind Bridge <mi...@yahoo.com>.
One very typical use of OOP with user interfaces is to ask the object 
itself to provide its user interface. This approach has a number of 
advantages, but most prominently it provides proper UI support via 
polymorphism, as the UI can be specific to the object.

Here is a simple example:
Suppose you have a base Setting type that is inherited by the classes 
StringSetting, IntegerSetting, DateSetting, etc.
There is a service that returns a List of Setting objects in the 
database. The objects are of one of the types listed above. You have to 
create a UI that allows you to edit the objects in the list.

Ideally you would have separate domain and view objects, but to keep the 
example simple, let assume that the objects perform both roles

If the OOP approach is followed, the Setting object would have an 
abstract function like this:
    IRender getEditView(IRequestCycle, IEditSettingListener)
That function will be implemented in the specific subclass (e.g. 
StringSetting) to return a UI that allows editing of the object. The UIs 
will normally contain a form that will eventually invoke method(s) in 
IEditSettingListener when submitted.

The Tapestry template for the page then becomes something like this:

<span jwcid="@For" source="ognl:settings" value="ognl:setting" ...>
  <span jwcid="@Delegator" 
delegate="ognl:setting.getEditView(requestCycle, #root)"/>
</span>

Note that this solution will support other types of Setting objects (not 
currently known ones too) without modifications and this is a natural 
consequence of using the OOP approach.

Consider the following points:
1) IEditSettingListener usually points to an object that is not 
serializable. Some kind of a rewind is needed in order to obtain its value.

There is a solution in a limited number of cases where the 
implementation of IEditSettingListener is a service accessible via 
HiveMind (for example) and a serializable proxy is passed to 
getEditView(). Unfortunately that would work only in some cases.

The issue of objects that are not serializable or services that have 
non-serializable contexts occurs in many other situations as well. Is 
there a proper solution that does not involve rewind?

2) Depending on where the form is, the Action service may be necessary 
for the component returned by getEditView() to have access to the page 
in which it was included. Without it, the page would not even be loaded 
(because of the dynamic, rather than the static coupling between the 
two). This applies to both form submission and to links that the dynamic 
component may contain.

In other words, the price for the static approach that Tapestry takes is 
that it must have Action to support the dynamic elements as well.


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


Re: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Ron Piterman <rp...@gmx.net>.
I would suggest another approach to that one:
since multiple html fields with same name attribute come up as an java 
array, I would suggest adding a new form-fields grouping component which 
will be responsible for generating the callback-hidden, so not one but 
multiple hidden, all with the same name, will contain the call back info.

the group component may then be updated as a whole...

You have  problem only when adding a new group (ie when grouping fields 
inside a For iteration, which changes on an AJAX request), on which case 
you have to refresh the whole hidden-div.

Cheers,

Ron


Jesse Kuhnert wrote:
> I'm all for the single serialized client state concept.
> 
> For ajax forms, it does seem problematic, but currently even the addition of
> form components has finally been cleared up thanks to your <div> wrapper
> around the hidden form input fields.  ie :
> 
> <form>
> <div id="formNameHidden" >
> <input type="hidden" name="hidden1" value="foo" />
> </div>
> 
> I just use my custom AjaxFormSupportImpl to always re-render the targeted
> hidden form fields, even if it doesn't necessarily know if the form or every
> component is involved in the response. I also added a unique id to the div
> so that this is easier(possible) on the client.
> 
> I do worry about the size of the client object.
> 
> Warning: Getting into the not ~completely~ knowing what I'm talking about
> realm, aka talking out of my arse..
> 
> Specifically, it's the targeted render "areas" that are a huge impediment
> right now, and it doesn't seem likely that you can easily provide a clearer
> container/child type of approach without rendering ALL of the unique
> component id's involved in the render into the client state. (so that you
> really can say ok render at this point, which requires you to step over
> components A/B/C, not to render, but just to give them a chance to ensure
> the flow isn't broken by skipping things)
> 
> Another approach would be to somehow be able to figure this out at render
> time in an as yet to be defined efficient manner?
> 
> Maybe it is a combination of both. A couple interfaces/tightening of the
> For/looping(any container) components and lots of form logic may be enough
> to do all of this without having to write all of the id's out to the client.
> (Not talking about form id's necessarily.)
> 
> Is it bad to write unit tests just to play with a concept? I see id's in
> general as being something that would be very nice to have unified, at least
> from the outward facing interfaces perspective.
> 
> ppftttt...Writing client gui code with a web client sure as sh$% isn't as
> easy as doing it natively, but there are a ton of concepts in the render
> model that seem to apply. Like containers...I'm sure I could ramble on for
> pages and pages.
> 
> jesse
> On 12/20/05, Howard Lewis Ship <hl...@gmail.com> wrote:
> 
>>I hope to abolish the rewind cycle in Tapestry 4.1.
>>
>>Part of this was to deprecate the ActionLink component and action
>>service in 4.0 so that they could be removed in 4.1.
>>
>>The outline of my approach is that there will be a single hidden form
>>field into which a series of objects will be serialized during the
>>render. These objects will control the form submission processing and
>>will incrementally restore server-side state during the processing.
>>Thus the order of operations during the render will DIRECTLY control
>>the order of operations during the form submission.  Today, we rely on
>>the awkward rewind cycle, which is based on re-rendering the form and
>>its contents, validating against a list of form element ids.
>>
>>Rather than many small hidden fields (for each For, If and Hidden,
>>component, as well as others) all such data will be accumulated in a
>>single bytestream.  There is an economy of scale here ... a single
>>long serialized bytestream (gzipped and perhaps encrypted, then MIME
>>encoded) will be smaller than the sum of many individual hidden fields
>>(squeezed with the DataSqueezer, which often uses
>>serialization/gzip/MIME anyway).
>>
>>I'm still struggling, however, with how to properly deal with more
>>dynamic ("Ajax") forms. Possibly, we'll support multiple bytestreams
>>handled sequentially, to cover dynamically appended forms.
>>
>>
> 
> 


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


Re: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Jesse Kuhnert <jk...@gmail.com>.
I'm all for the single serialized client state concept.

For ajax forms, it does seem problematic, but currently even the addition of
form components has finally been cleared up thanks to your <div> wrapper
around the hidden form input fields.  ie :

<form>
<div id="formNameHidden" >
<input type="hidden" name="hidden1" value="foo" />
</div>

I just use my custom AjaxFormSupportImpl to always re-render the targeted
hidden form fields, even if it doesn't necessarily know if the form or every
component is involved in the response. I also added a unique id to the div
so that this is easier(possible) on the client.

I do worry about the size of the client object.

Warning: Getting into the not ~completely~ knowing what I'm talking about
realm, aka talking out of my arse..

Specifically, it's the targeted render "areas" that are a huge impediment
right now, and it doesn't seem likely that you can easily provide a clearer
container/child type of approach without rendering ALL of the unique
component id's involved in the render into the client state. (so that you
really can say ok render at this point, which requires you to step over
components A/B/C, not to render, but just to give them a chance to ensure
the flow isn't broken by skipping things)

Another approach would be to somehow be able to figure this out at render
time in an as yet to be defined efficient manner?

Maybe it is a combination of both. A couple interfaces/tightening of the
For/looping(any container) components and lots of form logic may be enough
to do all of this without having to write all of the id's out to the client.
(Not talking about form id's necessarily.)

Is it bad to write unit tests just to play with a concept? I see id's in
general as being something that would be very nice to have unified, at least
from the outward facing interfaces perspective.

ppftttt...Writing client gui code with a web client sure as sh$% isn't as
easy as doing it natively, but there are a ton of concepts in the render
model that seem to apply. Like containers...I'm sure I could ramble on for
pages and pages.

jesse
On 12/20/05, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> I hope to abolish the rewind cycle in Tapestry 4.1.
>
> Part of this was to deprecate the ActionLink component and action
> service in 4.0 so that they could be removed in 4.1.
>
> The outline of my approach is that there will be a single hidden form
> field into which a series of objects will be serialized during the
> render. These objects will control the form submission processing and
> will incrementally restore server-side state during the processing.
> Thus the order of operations during the render will DIRECTLY control
> the order of operations during the form submission.  Today, we rely on
> the awkward rewind cycle, which is based on re-rendering the form and
> its contents, validating against a list of form element ids.
>
> Rather than many small hidden fields (for each For, If and Hidden,
> component, as well as others) all such data will be accumulated in a
> single bytestream.  There is an economy of scale here ... a single
> long serialized bytestream (gzipped and perhaps encrypted, then MIME
> encoded) will be smaller than the sum of many individual hidden fields
> (squeezed with the DataSqueezer, which often uses
> serialization/gzip/MIME anyway).
>
> I'm still struggling, however, with how to properly deal with more
> dynamic ("Ajax") forms. Possibly, we'll support multiple bytestreams
> handled sequentially, to cover dynamically appended forms.
>
>

Re: [DISCUSS] Moving beyond the "rewind cycle" in Tapestry 4.1

Posted by Leonardo Quijano Vincenzi <le...@dtqsoftware.com>.
Howard, can't these major changes be wrapped up in single point releases?

4.1: Delete the rewind cycle
4.2: Rework component interfaces..

and such??

Q3 2006 seems like a lot! Almost a year..

-- 
Ing. Leonardo Quijano Vincenzi
DTQ Software


Howard Lewis Ship wrote:
> I hope to abolish the rewind cycle in Tapestry 4.1.
>
> Part of this was to deprecate the ActionLink component and action
> service in 4.0 so that they could be removed in 4.1.
>
> The outline of my approach is that there will be a single hidden form
> field into which a series of objects will be serialized during the
> render. These objects will control the form submission processing and
> will incrementally restore server-side state during the processing.
> Thus the order of operations during the render will DIRECTLY control
> the order of operations during the form submission.  Today, we rely on
> the awkward rewind cycle, which is based on re-rendering the form and
> its contents, validating against a list of form element ids.
>
> Rather than many small hidden fields (for each For, If and Hidden,
> component, as well as others) all such data will be accumulated in a
> single bytestream.  There is an economy of scale here ... a single
> long serialized bytestream (gzipped and perhaps encrypted, then MIME
> encoded) will be smaller than the sum of many individual hidden fields
> (squeezed with the DataSqueezer, which often uses
> serialization/gzip/MIME anyway).
>
> I'm still struggling, however, with how to properly deal with more
> dynamic ("Ajax") forms. Possibly, we'll support multiple bytestreams
> handled sequentially, to cover dynamically appended forms.
>
>   


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