Having looked a the better petshop, I'm not sure it is
the best source of best practices information. 
Certainly you would just have your POJO be a property
of your page, this is incredibly easy with Tapestry. 
Tapestry does do type conversion very well, much
better than Struts for example which is of course
totally broken.

As far as security, I am using Acegi and will probably
be using URL based restrictions, this is not hard with
friendly URLs in Tap4.  You could also do something
much like your interceptor approach using Hivemind,
but that is beyond my HM knowledge I'm afraid.

--Chris

--- "Payne, Matthew" <[EMAIL PROTECTED]>
wrote:

> I recently started with a new company that appears
> to have chosen tapestry as their framework.
> I've previously been swimming webwork over the last
> couple of years.  I have to admit I have somewhat
> bias.
> 
> I am digging around for a few good sample apps that
> use reasonably decent practices with Tapestry 4. I
> took a look at "Better Petshop" (uses tapestry 3). 
> Is there anything "Better"?
> 
> At first glance I was a little concerned with how
> verbose things were.
> For instance, the "actions" duplicate all the
> getters/setters that were in the main pojo they are
> exposing.  
> 
> e.g. instead of exposing get/set Customer, it 
> had to copy all the properties to its action
> properties
> i.e.
> setGivenName(customer.getFirstname());
>         setFamilyName(customer.getLastname());
>         setAddress1(customer.getAddr1());
>         setAddress2(customer.getAddr2());
>         setCity(customer.getCity());
>         setStateOrProvince(customer.getState());
>         setCountry(customer.getCountry());
>         setPostalCode(customer.getZip());
>         setTelephoneNumber(customer.getPhone());
> 
> Is this typical with Tapestry apps?
> 
> Can't we just expose the main pojo without all this
> extra code?
> 
> The other thing I was concerned about is that much
> of the application's behavior is achieve via
> inheritance(e.g. the archaic struts way).
> OrderBillingPage-->ProtectedPage-->PetshopBasePage
> 
> In webwork, I'd probably achieve the same behavior
> by adding a some type of securityInterceptor to that
> actions config(the are ways to default this to whole
> packages of actions).
> 
> <action name="orderBilling"
> class="com.something.OrderBillingAction">
>             <interceptor-ref name="defaultStack"/>
>             <interceptor-ref name="security"/> <!---
> checks for user login and redirects to global result
> "LOGON" if needed -->
>             <result
> name="success">billing.jsp</result>
> </action>
> 
> Does tapestry have equivalent interceptors that can
> be defaulted for sections of the application without
> having to resort to inheritance?
> 
> Thanks,
> 
> Matt
> 
> This message, including any attachments, is intended
> only for the recipient(s) 
> named above. It may contain confidential and
> privileged information. If you have 
> received this communication in error, please notify
> the sender immediately and 
> destroy or delete the original message. Also, please
> be aware that if you are not 
> the intended recipient, any review, disclosure,
> copying, distribution or any 
> action or reliance based on this message is
> prohibited by law.  
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to