>
> The hardcoded feeling you get with other options is somewhat artificial.
> You write about using the database and/or XML to derive a pattern for a
> page's configuration - largely driving (I assume) the placement and
> construction of page elements. You can use the exact same system in the
> other direction though - configuring for View Helpers, their construction
> and placement. A View Helper can interact with the Model (in read only
> mode), accept parameters, perform presentational logic, etc. Any actual
> business logic would be encapsulated in the Model that View Helper is
> using as the basis of its presentation.
>
> I agree that it's a mental shift ;). The main point is that folk are using
> Actions based on historical and past experiences and missing the gist that
> most of what makes their interpretation of actions useful is already the
> core purpose of the View Helper. The trick is noting that a View Helper's
> complexity is never defined - the framework may offer some subset of
> relatively simple View Helpers for mundane formatting tasks but this not
> preclude them being vastly more purposeful and useful. View Helpers can
> interact with Models, combine work from entire libraries, etc. The only
> block to such behaviour is the developer's preconceptions ;).
>
> I'd suggest giving it a trial in some simple use case, see how they
> contrast to your current practice.
>
> Paddy
>
> Pádraic Brady
>
Yes, I guess it's a mental shift but I'm still not into it :)
I understand that view helpers are not limited in complexity but "something"
needs to configure those helpers for a specific page which leads to a single
"pageAction" or to an action for each concrete page. The latter is in no way
extendable - if you like to add a new custom page, you need so setup another
action. The former (single pageAction) reduces the whole system to a single
action - you could skip writing any other actions as this action would be
responsible for anything (configuring any view helper, the layout, the
templates). Maybe I have sth like a twist in my brain right now :) sorry for
that...
--
View this message in context: http://n4.nabble.com/PageController-ActionStack-vs-Simple-MVC-tp948403p948522.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论