#287: Get rid of decorators and slots and invent something biblically good to
replace them
---------------------+------------------------------------------------------
Reporter: david | Owner: david
Type: task | Status: assigned
Priority: normal | Milestone: 0.11
Component: _OTHER_ | Version:
Severity: normal | Resolution:
Keywords: |
---------------------+------------------------------------------------------
Changes (by david):
* milestone: 2.0 => 0.11
Comment:
Here's ze plan:
* Decorators get thrown out
* In a view, people can now set any number of templates which are
rendered after another, similar to an onion or russian doll
* Each of these individual templates can have slots
* Which means people can use one template, without an outer "decorator",
but still use "slots"
* The individual templates may use different renderer implementations,
examples:
* The outermost template is smarty, while inner stuff is done in PHP for
prototyping, and ported to smarty later by a designer.
* The content is SVG, which is rendered via XSL, then embedded with
XHTML using PHP, and decorated normally with Smarty
* The slots can use different content types, too, examples:
* One of the "slots" run produces JSON which is used in a {{{<script
type="text/javascript">}}} block in the {{{<head>}}} of the page
* Each template "layer" can have an identifier, which may be used to
cache fragments of the page (only the inner template, not the outer
"decorator" with the slots)
* Maybe even some more control over how responses of slots are merged
together etc?
This should be just as powerful as action chains, but with the
cacheability and convenience of the old decorator implementation.
To have the same behavior as before, with decorators, one would do (pseudo
code, not yet sure about the implementation):
{{{
$this->addTemplate('IndexSuccess');
$decorator = $this->addTemplate('Master');
$decorator->setSlot('navigation', 'Default', 'NavigationWidget');
}}}
--
Ticket URL: <http://trac.agavi.org/ticket/287#comment:3>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5
_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets