On 6/20/06, Geoff Callender <[EMAIL PROTECTED]> wrote:

Regarding the coding practices in Tapestry JumpStart, I have 2
particular concerns:

1. I avoid using pageBeginRender(PageEvent).

Instead, each page has an "activate" method. Its signature specifies
the parameters that are relevant to the page ie. its contract.
        eg. UserEditPage.activate(Long userId, IRequestCycle cycle)
The "activate" method assembles the data, sets the setters, and
throws an exception if there's any problem.

Is there a downside to not using pageBeginRender?



I don't think this is an either/or.  I tend to store object ids as
persistent properties, and use hooks like PageBeginRenderListener to restore
the full object when needed.


2. When leaving a page, is it best practise to clear persistent
properties as suggested in http://wiki.apache.org/tapestry/
ClearingPersistentProperties ?

Thanks,

Geoff Callender

On 6/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> To Howard and the Team,
>
> I have created an educational aid called Tapestry JumpStart that I
> hope
> will help Tapestry to spread.
>
> Would you guys please check it for flawed coding practices before I
> link
> it in to the Wiki?  I'd hate to be teaching bad habits
>
> http://files.doublenegative.com.au/jumpstart/
>
> Regards,
>
> Geoff Callender
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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

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

Reply via email to