<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><div>Hi Roger, </div><div><br></div><div>1) Done</div><div><br></div><div>2) Well, by adding megrok.resource to the setup.py, everytime a Request object is created, it is of a class from hurry.zoperesource. The exact inner workings, I don't know either... a specific factory or adapter most likely.</div><div><br></div><div>3) Done.</div><div><br></div><div>Cheers</div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><br><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Roger Erens <roger.erens@e-s-c.biz><br><b><span style="font-weight: bold;">To:</span></b> Jeroen Michiel <jmichiel@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> Sebastian
Ware <sebastian@urbantalk.se>; grok-doc@zope.org<br><b><span style="font-weight: bold;">Sent:</span></b> Tue, 13 April, 2010 11:26:08<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Grok-doc] Volunteering for a YUI tutorial<br></font><br>Hi Jeroen,<br><br>On Tue, Apr 13, 2010 at 09:31, Jeroen Michiel <<a ymailto="mailto:jmichiel@yahoo.com" href="mailto:jmichiel@yahoo.com">jmichiel@yahoo.com</a>> wrote:<br>> Roger,<br>> Sorry for the immensely late reply!<br><br>No problem at all.<br><br>> 1) the yui-t7 class of the main div does this. it just is a header,<br>> content-area and footer, which is a very basic Grid, if it can be called a<br>> grid at all, indeed.<br><br>Ok, than it would be clearer to change this sentence<br>We created a basic layout with a link to a stylesheet, and a basic Grid.<br><br>to something a la:<br>We created a basic layout with a link to a stylesheet, and a basic<br>Grid by defining the
main div-element to be of class :func:`yui-t7`<br><br>(I can incorporate the change if you want, but I noticed that you are<br>locking (thus editing?) the page)<br><br>> 2) megrok.resource is used implicitly in part 1. I explain this in the<br>> paragraph<br>> "Enter megrok.resource. This package uses hurry.zoperesource, which will<br>> override the default Request object with a special one that will add the<br>> needed resources to the <head> tag of your HTML just before rendering. Kind<br>> of magic..."<br><br>True, but can you say which module is using megrok.resource<br>implicitly? It's not clear from the code in layout.py nor app.py,<br>which are the only code files in part 1.<br><br>> 3) You may have a point there, but my reasoning was this: since we are using<br>> YUI grids for layouting, we might as well 'do it right' by using<br>> megrok.layout as well, as I figured this to be the most used use-case. The<br>>
biggest problem I have with tutorials (in general) is that most only focus<br>> on the task at hand, and leave you clueless if the off-topic parts of the<br>> tutorial are quick-and-dirty implementations, or still best-practises. If<br>> you cut corners in a tutorial, you should state that, and point readers<br>> where to find info on doing it right. I decided to try and not cut any<br>> corners. There was no megrok.layout tutorial, so I decided to incorporate<br>> it, otherwise I would have referred to it.<br>> Maybe it makes this tutorial a bit 'heavy', indeed.<br>> The big picture of the tutorial was (more or less): explain how to do some<br>> typical YUI use-cases the Grok way: Reset/Grid, a menu, getting data<br>> asynchronously, sending data async, using JSON.<br>> Thanks for the remarks!<br><br>Maybe in the summary it could be mentioned that in this tutorial one<br>gets 4 for the price of 1:<br>it treats the usage
of YUI, layout, navigation, and JSON in Grok.<br><br><br>Cheers,<br>Roger<br>> ----- Original Message ----<br>> From: Roger Erens <<a ymailto="mailto:roger.erens@e-s-c.biz" href="mailto:roger.erens@e-s-c.biz">roger.erens@e-s-c.biz</a>><br>> To: Jeroen Michiel <<a ymailto="mailto:jmichiel@yahoo.com" href="mailto:jmichiel@yahoo.com">jmichiel@yahoo.com</a>><br>> Cc: Sebastian Ware <<a ymailto="mailto:sebastian@urbantalk.se" href="mailto:sebastian@urbantalk.se">sebastian@urbantalk.se</a>>; <a ymailto="mailto:grok-doc@zope.org" href="mailto:grok-doc@zope.org">grok-doc@zope.org</a><br>> Sent: Tue, 30 March, 2010 19:21:14<br>> Subject: Re: [Grok-doc] Volunteering for a YUI tutorial<br>><br>> Hi Jeroen,<br>><br>> Thanks for having solved the buidout issues. I've been busy editing<br>> (mainly formatting) your tutorial. I'm still not yet clear about a<br>> few things in part 1; can you enlighten
me?<br>><br>> 1)<br>> Below the code for 'style.css' you mention that a basic Grid has been<br>> created. Is it? Only the class-value "yui-g" hints to that, but I<br>> wouldn't call that 'creating a basic grid'.<br>><br>> 2)<br>> Then you mention megrok.resource, but this module is not used at all<br>> in part 1. Or is it? Maybe mentioning and explaining (which happens<br>> just above the 'app.py' code further down the page) it could be moved<br>> to part 3 where I see megrok.resource being used in code the first<br>> time.<br>><br>> 3)<br>> Although I'm still missing the big picture of the tutorial, I'd like<br>> you to think about this:<br>> is the (megrok.)layout stuff not too distracting for this tutorial?<br>> Maybe it's worth a tutorial of its own; also simplifying the<br>> YUI-tutorial?<br>><br>> Cheers,<br>><br>> Roger<br>><br>> On Mon, Mar 8, 2010 at 11:45, Jeroen
Michiel <<a ymailto="mailto:jmichiel@yahoo.com" href="mailto:jmichiel@yahoo.com">jmichiel@yahoo.com</a>> wrote:<br>>> All typos are solved, and I'm looking into the buildout issues.<br>>><br>><br>><br></div></div><div style="position:fixed"></div>
</div><br>
</body></html>