incubator-isis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <dkhayw...@gmail.com>
Subject Re: Reports
Date Tue, 14 Dec 2010 19:22:08 GMT
Hi Mike,
Sorry not to reply sooner.  Thought I'd pick this thread up from your 
original question.

On 09/12/2010 17:41, Mike Burton wrote:
> To improve my understanding of Isis and to establish new potential features, I'm adopting
a "devil's advocate" approach by looking at features I add to my projects and asking "can
(or should) Isis do this"
>
> In this way I thought of _reports_, with filtering, sub/totals, and output to PDF/ CDR/
XLS.
> The data to report on may be Domain Objects, or joins / query results (perhaps "ViewModels"
ie similar to "Views" in database parlance.)
>
> How would Isis approach this?
The way we've done this sort of thing on the big Irish project is to 
either extract information out of the domain objects themselves, or to 
create a "view model" that aggregates relevant information into a single 
transient (never persisted) object.  We then hand this raw information 
off to an injected domain service, which does the actual work of 
generating the PDF, XLS etc.

For example, for sending out letters we have a FormCommunication (this 
is the view model).  This references a Customer, some of the relevant 
relationships of that Customer (eg spouse/child etc), Benefits and so 
on.  We then use the XmlSnapshot capability (see either my book or the 
new applib documentation, chapter 12) to generate XML.  From this we can 
do whatever: apply XSLT, use Xpath to extract info, etc etc.

So... is there functionality missing from Isis?  Well, only insofar 
that'd it'd be nice to have a bunch of these domain services 
(PdfRenderService, XlsGenerationService etc) available for reuse.  
This'd be a nice project for someone to pick up.  I was thinking that 
eventually these precanned domain services might live under 
trunk/domain/services (you'll notice a placeholder in the maven modules 
page on the wiki [1]).

HTH,
Dan

[1] https://cwiki.apache.org/confluence/display/ISIS/MavenModules

>
> Best regards
>
> Mike Burton
>
>
>
>
>

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message