<div dir="ltr">I've been sprinting today on the middleware rendering subject and this are my points to be discussed :<div><br></div><div>* Without direct access (with diazo) to Plone we will not be able to access @@manage-viewlets so we will need some control panel that decides which viewlet should be rendered on the middleware for diazo ?</div>
<div><br></div><div>* The main goal I'm looking for is reducing the amount of things that are beeing rendered on plone before diazo. So my idea is to implement a IMainTemplate view that renders the main template depending on the viewlet managers that are active. Also in case it's a browser request from toolbar ( we can mark with some interface ) render only the content part with some possible viewlets managers before or after. Toolbar is only rendering the content of the edit page and doesn't make any sense to render all the page for this requests.</div>
<div><br></div><div>* So we render the viewlets that have been said to be rendered, the view of the content and the portlets ( we could integrate plone_layout and plone view on this main_template view ). The question is how we show it:</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>* We need to find a a way that it's easy for themeeditor to map the content to the diazo theme. Maybe a list of elements (viewlets/portels/contents) instead of seeing the actual sunburst view.</div>
</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>* We need to discard XML for the user content as they can write non valid XML and we need to render the view of the content with the custom browser view. </div>
</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>* We need to use the same id's we have now on the main_template to provide BBB on diazo themes ?</div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>* What about js registry and css registry ? we need to render the bunch of js/css that are needed on addons and the one's that are conditionals (logged in and aren't not on toolbar)</div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><br></div></blockquote><div>I'm thinking on small steps that are affortable to provide a better "diazo only" concept on Plone 5.</div><div><br></div><div>We did some tests, creating a main_template-remove on Products.CMFPlone and did some performance tests having a bit better performance.</div>
<div><br></div><div>If somebody knows some work done on the same direction, or have some time, I'll try to sprint on it tomorrow also so I can write a PLIP.</div><div><br></div><div>Ramon</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/10/2 Johannes Raggam <span dir="ltr"><<a href="mailto:dev@programmatic.pro" target="_blank">dev@programmatic.pro</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Die, 2013-10-01 at 15:58 +0100, Martin Aspeli wrote:<br>
> On 1 October 2013 14:03, Ramon Navarro Bosch <<a href="mailto:ramon.nb@gmail.com">ramon.nb@gmail.com</a>><br>
wrote:<br>
>> Since we are moving to Diazo I have the bad feeling that rendering<br>
twice the page is a waste of energy and a possible missunderstanding for<br>
integrators / developers ( we will have the frontend, the backend of<br>
widgets, the native rendering ... )<br>
>> During these days in Brazil, we've been discussing if it's possible<br>
to change the main_template to export the structure of plone instead of<br>
a rendered page, different sections with the viewlets, with the<br>
portlets, the content, .... and on diazo rules it would be much easier<br>
to define the rules. As right now is the moment to discuss about this<br>
subject(diazo theme is really in early step and plone5 is a possible<br>
target to change this), my idea is to talk about it today at FWT meeting<br>
if it's ok with you.<br>
> So to check my understanding: you are saying main_template exposes<br>
something very simple, e.g. a pile of divs with sensible ids, and then<br>
Diazo makes it visually appealing?<br>
> If so, that makes sense to me, at least once we have good "out of the<br>
box" Diazo themes.<br>
<br>
</div></div>What if we expose each of these building blocks via HTTP and let diazo<br>
fetch them via the href attribute?<br>
<br>
This way we can also provide alternative dynamic user interfaces, where<br>
we fetch the contents for a page via Javascript AJAX calls.<br>
<span class="HOEnZb"><font color="#888888"><br>
Johannes<br>
<br>
<br>
--<br>
programmatic  web development<br>
di(fh) johannes raggam / thet<br>
python plone zope development<br>
mail: <a href="mailto:office@programmatic.pro">office@programmatic.pro</a><br>
web:  <a href="http://programmatic.pro" target="_blank">http://programmatic.pro</a><br>
      <a href="http://bluedynamics.com" target="_blank">http://bluedynamics.com</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Ramon a.k.a bloodbare
</div>