cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yves Vindevogel <yves.vindevo...@implements.be>
Subject Re: Graphs in Cocoon based upon database
Date Mon, 27 Jun 2005 14:53:19 GMT

On 27 Jun 2005, at 14:04, Ross Gardler wrote:

> Yves Vindevogel wrote:
>> Hi Ross,
>> I'm certainly willing to take a look at it. I will eventually chose  
>> one (forrest, fins, ....)
>> I have another possibility outside cocoon, and that is using the R  
>> language on my postgres database.
>> For now, I would like to go with Cocoon, if it is fast enough,  
>> because I can re-use my existing xml descriptions of the pages (the  
>> graphs are the same as the pages, but graphical)
>
> Forrest may help here too since it is a Cocoon based application (see  
> below).
>
Hmm, I'm not so sure that Forrest will help me much.  Forrest seems  
like a way to render content (xml, ...) into webpages.
I agree that it seperates content from presentation, and that is what I  
do too.
Below is a description of a report I'm making

<report>
	<title>Jobs per Day</title>

	<query>
		select eventdate, firstjob, lastjob,
			fnformatint(jobs) as jobs,
			fnformatint(pages) as pages
		from tblDNJobs
		order by eventdate desc;
	</query>
	
	<filter>
		<select>
			select eventdate, min(eventtime) as firstjob, max(eventtime) as  
lastjob,
				fnFormatInt(count(oid)) as jobs,
				fnFormatInt(sum(pages)) as pages
			from tblPrintjobs
		</select>
		<order>
			order by eventdate desc ;
		</order>
	</filter>
	
	<footer>
		<field name="totalpages" caption="Total Pages"/>
		<field name="avgpages" caption="Average Pages"/>
		<field name="eventdatecount" caption="Number of Days"/>
	</footer>
	
	<columns>
		<column name="eventdate" caption="Date" width="15%"/>
		<column name="firstjob" caption="First Job" width="10%"/>
		<column name="lastjob" caption="Last Job" width="10%"/>
		<column name="jobs" caption="Jobs" align="right" width="20%"/>
		<column name="pages" caption="Pages" align="right" width="20%"/>
		<column name="devpages" caption="Diff vs. avg pages" align="right"  
width="20%"/>
	</columns>
	
	<recordcount>eventdatecount</recordcount>
</report>

I'll explain each section:
title: report title
query: the query that runs on the de-normalized tables and returns all  
records
filter: the base of the query that will be executed to find specific  
records (note: query above is results of this over the complete table,  
but we have 600.000 records, so we split them into smaller tables)
footer: fields that are below my report (summary)
columns: extra information about each column, like the caption,  
alignment, width, ...
recordcount: a column in a seperate "dashboard" table that is used to  
determine the number of pages in my html report

All of that is rendered into a report which navigation  
(http://reports.ecseed.com)  Mail me offline for username and password  
if you want to look

So, I guess Forrest is not what I'm looking for in this case.
Although I use the same techniques.


>> Can you provide me with a link so I can see what Forrest is capable  
>> of ?
>
> Sorry, that was quite an omission on my part, I should have been much  
> clearer.
>
> Apache Forrest is a publishing framework that transforms input from  
> various sources into a unified presentation in one or more output  
> formats. The modular and extensible plugin architecture is based on  
> Apache Cocoon and relevant standards, which separates presentation  
> from content. Forrest can generate static documents, or be used as a  
> dynamic server, or be deployed by its automated facility.
>
> The plugin I referred to integrates JCharts into Forrest. Since  
> Forrest is Cocoon based it is very easy for you to adapt the plugin to  
> work in your own Cocoon app.
>
> For general info on Forrest see http://forrest.apache.org
> ViewSVN for the JCharts plugin is at  
> http://svn.apache.org/viewcvs.cgi/forrest/trunk/whiteboard/plugins/ 
> org.apache.forrest.plugin.output.Chart/
>
> I'm just deploying the plugin now, this will mean the docs (with some  
> samples) will be available in when the next website update happens  
> (around 2 hours). When the update has happened you can see basic docs  
> and samples at  
> http://forrest.apache.org/pluginDocs/plugin_0_70/ 
> org.apache.forrest.plugin.output.Chart
>
I will have a look

> As I said, I can help you integrate this into a different Cocoon based  
> app if Forrest doesn't provide what you need (incidentally, Forrest  
> also has a database plugin which will help with getting your data from  
> your DB, this is essentially the Cocoon database block).
>
Well, I think Forrest is not doing what I'm doing right now.  Forrest  
goes further in a lot of ways, but my solution is for one website that  
only has reporting and thus very simple to be described in my xml  
files.
But I'm open for discussion on this.

> Ross
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements


Mime
View raw message