I'm looking for a framework that allows more than one controller to handle a
single request and transparently manages the variable namespaces for each of
them. Here is an example of what I mean,

An "index" type of page, such as this forum's index, (er or mailing list as
the case may be for some here), has pagination at the bottom. What if you
wanted one page to list two forum's indexes in two separate lists with
separate pagination, side by side on the page?

The page hyperlinks "page 1", "page 2", etc, would need their own
namespaces, so that you could be on page 3 of list A and page 8 of list B at
the same time, on the same page.

So you would need namespaces for your pagination variables. You couldn't
just use "?page=1" for both lists. You would need something like:


<a href="?lista-page=1">List A page 1
</a>  
<a href="?lista-page=2">List A page 2
</a> 
<a href="?lista-page=3">List A page 3
</a>
 
and:
 

<a href="?listb-page=1">List B page 1
</a>  
<a href="?listb-page=2">List B page 2
</a> 
<a href="?listb-page=3">List B page 3
</a>


notice the namespaces on the variables.

The above is actually not enough, even. You would need to encapsulate the
state of each list in the GET variables. For example, if you're currently
viewing page 3 of list B, then the variables for list A's pagination links
would be:

<a href="?lista-page=1&listb-page=3">List A page 1
</a>  
<a href="?lista-page=2&listb-page=3">List A page 2
</a> 
<a href="?lista-page=3&listb-page=3">List A page 3
</a>

Pagination is only one example of course- this applies to any GET variables
that change state.  

Doing this on the session is no good- for the same old reasons- 1) because
the users can't send the page URL to each other (the reason you shouldn't
use session for query urls in general), and 2) The user could have multiple
windows open...

I've written a framework that does this- handles most of the work. The
multiple controllers are in a hierarchy and their namespace is a reflection
of their position in the tree. But I was hoping this already exists in some
other php framework.

Does the Zend Framework do this?

-- 
View this message in context: 
http://www.nabble.com/Can-the-Zend-Framework-wrangle-multiple-controllers-on-one-page--tf4052584s16154.html#a11511043
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to