NJMVCOpenSource

Programmer use cases

1) Starting from a webapp with reporting requirements from scratch.

2) An existing application with jasper reports which needs to be web-enabled.

3) An existing application with jasper reports which needs enhanced capabilities

End-User use cases

1) Joe in sales runs his orders booked for the prior week every Monday. Joe goes to the sales recap report, changes the salesman to Joe (should default already), changes the period to the last week and runs the report to the screen in html.

2) Joe gets a little more sophisticated and wants to receive his reports via e-mail every Monday w/o going to the screen to run them. Joe sets the reporting parameters and waits for his report in PDF format so he can print it for his Sales Manager if he needs to.

3) Joe has to do some analysis, so using his trusty sales report, Joe runs all of last year output to XLS format by changing the start date, end date, output target (screen / email) and output format (html, pdf, xls).

The cool technologies in jasper-struts

1) struts: uses dynabeans, enhances the action forward.

2) xml <--> java: uses castor.

3) jasper reports

4) XLS, PDF, CSV output formats.

5) We are going to use JSF for our page designs

6) EL interpreter.

7) Object Oriented DHTML / Javascript

Comparison of building your own reporting interface vs jasper-struts Building your own with jasper-struts

Building your own With Jasper Struts
  • Write / test report / datasource
  • Write / test report / datasource
  • Write java to fill report
  • Write parameter file
  • Write jsp/servlet to export each type
  • Write security interface (one time)
  • Write jsp to accept parameters / start report
 
  • Testing procedures to test file handling
 

Benefits of Jasper-Struts

1) Report framework consistency. All reports have all output options.

2) No additional java / jsp code required, therefore no scripts or tests.

3) Security enabled.

4) I18N enabled (could become moot as Teodor is planning to do this). 5) Users can save and schedule reports.

Work to be done

1) JSP to create new reports parameter file - for the developer and the Associated action. This can be done early or late since the parameter files can be hand edited.

2) JSP to select the report to run from the list of reports in the directory of reports.

3) JSP to display start of report, and any report parameters to be modified as needed. This JSP also has options for saving the report parameters.

4) Servlet to cron report jobs.

5) The various output formats generated to the screen or to e-mail.

6) There are a lot of details in how report parameters can default. Thinking about using EL as the expression language for calculating default values.

7) JSP / Action to do user report designs.

Requirements

1) You need ant 1.5+, 2) java 1.3+

3) junit - a reasonably up to date version.

3) Tomcat 4.1+ (tested with 4.1.29)

4) A cvs client Optionally Eclipse 2.1.2. This is how I work and I canscript the install using it.

Installation

The script in Eclipse (v2.1) to install is

1) a cvs connection using pserver|extssh - if you want to commit you will need to use extssh userid password cvs.sourceforge.net cvsroot/njmvcopensource Note: If you are new to sourceforge, i.e. have never had cvs rights, before the first time you log into cvs, you will need to change your password.

2) open the repository, go to HEAD / NJMVCOpenSource, right click, Check Out As Project

3) modify the build.properties (should have been build.properties.sample) to point to your tomcat and ant directories, just click through the properties and check them.

4) Clean up the xerces, servlet, jdbc and ant jar class path references by right clicking on the project / Properties / Java Build Path / Libraries / Edit

5) Make sure the eclipse ant task is aware of junit.jar using Run / External Tools / External Tools / Ant Build / NJMVCOpenSource / Classpath. You might have to Add Jars if you don't already have junit configured for Eclipse.

6) To run the tests, right click on build.xml and run ant. You will see the various tasks, test-all should run the tests.