[Seaside] Help understanding WATableReport

Avi Bryant avi at beta4.com
Thu Aug 26 17:44:05 CEST 2004

On Aug 26, 2004, at 2:44 PM, C. David Shaffer wrote:

> I have started to write up the tutorial presented by Dan and Rado 
> which includes some improvements to this class.  You can find the 
> incomplete version at 
> http://www.cdshaffer.com/david/Seaside/WATableReport/

Great.  Let me know when it's complete so I can add it to the docs page.

> The two things which are missing which I just added to my version are 
> a CSS and optional visual indicator of which column is the active sort 
> column and support for rendering images (or arbitrary html) in cells.  
> These are not in the form of patches but as new subclasses.

Just one note - you say "In the current design it seems  that too much 
of the rendering responsibility falls on WATableReport rather than on  
WAReportColumn".  This is because the original intent was for that to 
be a model/view separation: WAReportColumn is purely a model of a 
report, whereas WATableReport decides how to display it.  In theory, 
the idea went, you could have a WAGraphReport that used the same set of 
columns, or a WAFancyJavascriptTableReport, and so on.  So I 
intentionally left rendering out of the column classes.

Now, this may be YAGNI at play - nobody has yet bothered to write any 
view class other than WATableReport, so maybe we should assume that 
likely nobody ever will, and make the code the best it can be given 
that assumption.  But I wanted you to know what the original design 
intent was.


More information about the Seaside mailing list