Matt,
Are you guys stuck with Tap3?  If you're using Tap4, then you can use
HiveMind services as the "guts" of your pages/components.  Then, you can
apply interceptors to those services much like you're describing.
James

-----Original Message-----
From: Payne, Matthew [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 14, 2006 3:11 PM
To: tapestry-user@jakarta.apache.org
Subject: tapestry for a webwork developer

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.  





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

Reply via email to