- Refactored View Package - 2 Updates
Michael Babker <michael...@gmail.com>: Mar 09 11:28AM -0400
At https://github.com/joomla-framework/view/pull/6 I'm proposing an
essentially fully restructured view package for 2.0.
The design here is that the base view class essentially is only able to
render the data it receives, it tries to decouple the logic of the view
directly fetching data from a model in favor of the data being injected via
a controller. Note that at this point, the model isn't decoupled from the
base implementation (though in practice the apps I've been using this with
aren't reliant on the models, it's basically an unnecessary dependency).
There are two base implementations included in the package, one for each
HTML and JSON. The JSON base simply json_encodes the data that has been
injected into the class. The HTML base class is restructured to receive a
RendererInterface implementation (https://github.com/babdev/renderer) which
is in essence a compatibility layer between the framework and various
rendering engines, to include Twig, Mustache, and Plates. Other
implementations are possible, including the CMS potentially consuming this
and refactoring JDocument to implement the interface.
Thoughts?
Dmitry Rekun aka b2z <bzz...@gmail.com>: Mar 09 08:49AM -0700
I like it. Simple and clean.
Dmitry
On Monday, March 9, 2015 at 5:28:35 PM UTC+2, Michael Babker wrote:
You have received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to joomla-dev-frame...@googlegroups.com.
--
Framework source code: https://github.com/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
---
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-frame...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-framework.