Hey,

Although we aren't using the ZF at work yet, we have similar needs with our "home made" framework. Our framework is based on Smarty, so we have developed a custom plugin, which allows us to dispatch a controller/action from within a template.

Eg in the foo/bar.phtml template we could have something like:

{dispatch controller=customers action=lookup username=andries template=customer/lookup.phtml}

this would dispatch the Customers controller with the lookup action, and pass a parameter "username" to it. After the controller action has been dispatched the output will be fetched into the template customer/lookup.phtml.

This works pretty nice, at least for our needs :). I'm not a big fan of using _forward too much, as I have experienced that this approach makes it very hard to track what's actually happening in the code (this is certainly the case when you haven't written the code yourself).

Best,

Andries Seutens
http://andries.systray.be


Matthew Weier O'Phinney schreef:
-- Cristian Bichis <[EMAIL PROTECTED]> wrote
(on Monday, 30 April 2007, 08:24 PM +0200):
The big question is this:  how many OTHER people need what you say you
need or is what you are trying to do a big edge case?  I'm a firm
believer that in 99.999% of all cases a problem fitting an application
to a framework is due to the architecture of the application, not the
framework.  This is the point where egos get bruised because people
want to blame tools, not themselves.
I am not complaining, but after rewriting lot of stuffs i feel ZF is very usefull on some sides and not very usefull on other sides :)

I mean if for some standard cases (as you saw Padraic Brady posts on http://blog.astrumfutura.com/archives/281-Complex-Web-Pages-with-the-Zend-Framework.html), nothing fancy, are needed lot workarounds...

I've been following Padraic's blog (heck, I've been commenting and
pointing out functionality of ZF to him), and what I see him doing is
something that only a fraction of sites are going to need to do. Not
every site needs to have composite views; his does, and he's trying to
figure out how to do so with ZF. If there's enough demand for the
functionality he describes and the solution he creates, we'll evealuate
if it's something ZF should support natively.

I completely agree with Chris H.: most of the "issues" about supposed
bad architecture I've seen debated, both on the ZF lists as well as
those of other projects, are due to users trying to do something for
which the framework was not designed, or being unwilling to change their
application to work within the bounds of the framework. It very well may
be the case that Christian's approach does not fit with ZF; if so, that
doesn't necessarily mean ZF isn't useful for "complex" projects -- just
not for his project.

I'm doing plenty of complex stuff with ZF lately; any time I get stuck
and think I need to turn to other tools or code something myself, I stop
and think if there might be another approach I can take that would let
me use existing components. Usually the answer is yes.

Reply via email to