Re: Components vs Pages?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Components vs Pages?

Kunal Ashar
There still seems to be a fine line between pages and components.

For example, problems started with when I began developing components which needed to take some data from a page/parent component and update some data into page/parent component. Intercomponent communication turned out to be quite messy, as were components that participated in navigation. Apparently pages win where inter communication is needed and where navigation is required.

For example, a Login page can be a component if it just indicates that user is authenticated but should not be a component if it says, "user is authenticated so go to home page". Overall, it seems like components can not be used when they will be involved in navigation based on the user clicks.

Seems like with Tapestry 3.0, components should be self sustainable. I feel component bindings are not matured and may be the reason for some of the issues.

Any thoughts?

--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Components vs Pages?

Patrick Casey

        What problems are you having with components doing navigation? I've
got plenty of component code that navigates e.g.

        private void doSort(IRequestCycle cycle) {
                Object[] args = cycle.getServiceParameters();
                args = Misc.ArraySub(args, 1);
                setArgs(args);
                String pageName = Gallileo.getListForm(getRealClass());
                GenericList l = (GenericList) cycle.getPage(pageName);
                l.setArgs(args);
                cycle.activate(l);
        }

        Are you having a different problem and/or is there something
particular about your components that means you can't call cycle.activate()
from within them?

        --- Pat

> -----Original Message-----
> From: Kunal Ashar [mailto:[hidden email]]
> Sent: Monday, May 16, 2005 11:01 AM
> To: Tapestry Users
> Subject: Re: Components vs Pages?
>
> There still seems to be a fine line between pages and components.
>
> For example, problems started with when I began developing components
> which needed to take some data from a page/parent component and update
> some data into page/parent component. Intercomponent communication turned
> out to be quite messy, as were components that participated in navigation.
> Apparently pages win where inter communication is needed and where
> navigation is required.
>
> For example, a Login page can be a component if it just indicates that
> user is authenticated but should not be a component if it says, "user is
> authenticated so go to home page". Overall, it seems like components can
> not be used when they will be involved in navigation based on the user
> clicks.
>
> Seems like with Tapestry 3.0, components should be self sustainable. I
> feel component bindings are not matured and may be the reason for some of
> the issues.
>
> Any thoughts?
>
> --
> ___________________________________________________________
> Sign-up for Ads Free at Mail.com
> http://promo.mail.com/adsfreejump.htm
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Components vs Pages?

Andreas Andreou-4
In reply to this post by Kunal Ashar
Kunal Ashar wrote:

>There still seems to be a fine line between pages and components.
>
>For example, problems started with when I began developing components which needed to take some data from a page/parent component and update some data into page/parent component. Intercomponent communication turned out to be quite messy, as were components that participated in navigation. Apparently pages win where inter communication is needed and where navigation is required.
>
>For example, a Login page can be a component if it just indicates that user is authenticated but should not be a component if it says, "user is authenticated so go to home page". Overall, it seems like components can not be used when they will be involved in navigation based on the user clicks.
>  
>
I cannot understand this! I've used components for navigation with no
problems. For instance,
I always use/create a menu component and it's quite handy. I mainly have
PageLinks and
DirectLinks inside these components to change the current page or
perform custom actions...
I don't usually need these component to update any parent page
properties, so I don't know
if there are any issues there, but I generally allow them to interact
with the visit object.
Regarding restricting page access to authenticated users, I agree that
this is a job of a
"base" Page (i.e. extend pageValidate(PageEvent event) )
On re-reading your mail, perhaps you're talking about having components
auto-forward to
other pages? Again, I haven't yet had any need to perform that and I
don't know if there are
any issues there...
Perhaps you could give some more exaples of your problems :)

>Seems like with Tapestry 3.0, components should be self sustainable. I feel component bindings are not matured and may be the reason for some of the issues.
>
>Any thoughts?
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Components vs Pages?

Jamie Orchard-Hays
In reply to this post by Kunal Ashar
Perhaps you're missing some of the hooks. Communication is easy between
pages and components using getPage() in a component and getComponents()
in a page.

If you are trying to use a Component as a Page, then you're in for
trouble. A component must be used in a page.

Jamie

Kunal Ashar wrote:

> There still seems to be a fine line between pages and components.
>
> For example, problems started with when I began developing components which needed to take some data from a page/parent component and update some data into page/parent component. Intercomponent communication turned out to be quite messy, as were components that participated in navigation. Apparently pages win where inter communication is needed and where navigation is required.
>
> For example, a Login page can be a component if it just indicates that user is authenticated but should not be a component if it says, "user is authenticated so go to home page". Overall, it seems like components can not be used when they will be involved in navigation based on the user clicks.
>
> Seems like with Tapestry 3.0, components should be self sustainable. I feel component bindings are not matured and may be the reason for some of the issues.
>
> Any thoughts?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]