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?