Difference between revisions of "New Report Design - 2009"

From Catglobe Wiki
Jump to: navigation, search
(Lesson learn)
(Current implementation status: => UPDATEd)
Line 92: Line 92:
 
{| border="1"
 
{| border="1"
 
|-
 
|-
| '''Task'''  
+
| '''Task name'''  
| '''Current status'''  
+
| '''Done'''  
| '''Planned actions'''  
+
| '''Not yet done'''
 +
| '''Time estimation'''
 
|-
 
|-
| Implementation
+
| Generation process
 
|  
 
|  
* Generation process
+
* Generation path is well defined and tested => '''Stable'''
** Data generation is well defined and tested
+
* '''Cross diagram''' is fully implemented (statistic)
* Image charts
+
|
** Bar/Line/Pie/Radar charts have been implemented for single case of CrossDiagram
+
* Apply data generation for other Diagrams
** All stylesheet and dom operations are split into different files to ease the maintenance, however the files are still messy and need cleanup
+
* Optimize values calculation
* Table charts
+
* Save calculation result to XML
** Table adaptors have been defined and tested
+
|
** Prototype for splitting huge table into sub-tables has been done
+
''TODO''
** Full support for HTML
+
|-
** Acceptable support for PDF
+
| Nevron (image) charts
* Stylesheet
+
|
** The stylesheet is kept as is intentionally to isolate to keep changing as the minimal level
+
* Bar/Line/Pie/Radar charts have been implemented for single case of CrossDiagram
* Tabulation Script
+
* All stylesheet and dom operations are split into different files to ease the maintenance, however the files are still messy and need cleanup
** The main script library has been moved to CatGlobe.Report assembly
+
* Nevron 2009 is applied and can be deployed side-by-side with Nevron 2007
** The code is hacked (with minimum impact) to allow plugging of new report's script library
+
|
** Diagram can be created using script
+
* Full testing (manual) is required after DiagramViewer page have finished
* Web controls
+
|
** DiagramViewer control has been created
+
''TODO''
** DiagramSettings control has been created also, however this need more time to implement custom business and testing
+
|-
 +
| Table charts
 +
|
 +
* Table adaptors have been defined and tested => '''Stable'''
 +
* Full support for HTML
 +
* Full support for PDF
 +
* Draft support for Excel and Ppt
 +
* Table layout in PDF is in acceptable mode with 1x1 tables => '''Wait for real sample of 2x2 cases'''
 +
* Stylesheet is fully applied => '''Still in testing mode'''
 +
|
 +
* Full testing for stylesheet
 +
* Full support for Excel and Ppt
 +
|
 +
''TODO''
 +
|-
 
|  
 
|  
* Generation process
+
Stylesheet
** Apply data generation for the full CrossDiagram
+
|
** Apply data generation for other Diagrams
+
* The stylesheet is kept as is intentionally in order to keep changing at the minimal level
** Optimize values calculation
+
|
** Save calculation result to XML
+
* Redefine the hierarchy of stylesheet classes
* Image charts
+
|
** Full testing (manual) is required after DiagramViewer page have finished
+
''TODO''
* Table charts
 
** Apply external stylesheet
 
** Apply the table splitting code
 
** Support for PPT/Exel
 
* Stylesheet
 
** Redefine the hierarchy of stylesheet classes
 
* Tabulation Script
 
** Move all implementations to new assembly
 
* Web controls
 
** Make sure DiagramViewer works on FF
 
** Create client side event handler class to reuse the business
 
** Implement ReportViewer control and page
 
** Apply DiagramViewer to Dashboard and Monitor
 
** Apply ReportViewer to TabulationScript result viewer page
 
 
|-
 
|-
| Intergration
+
| Tabulation Script
 +
|
 +
* The main script library has been moved to CatGlobe.Report assembly
 +
* The code is hacked (with minimum impact) to allow plugging of new report's script library
 +
* Full support for tabulation script => Lots of unit tests have been written
 +
* Tabulation script editor screen has been changed allowing running with new report code
 +
|
 +
* Move all implementations to new assembly
 +
* On-screen testing
 +
|
 +
''TODO''
 +
|-
 +
| Web controls
 +
|
 +
* DiagramViewer control has been created
 +
* DiagramSettings control has been created
 +
* Diagram viewer page has also been created
 +
* Diagram settings and viewer has been applied to monitor and dashboard => still in prototype phase
 
|  
 
|  
* Code has been committed
+
* Full testing on Diagram viewer page
* Side-by-side Nevron's assemblies deployment is fine
+
* Replace current diagram viewer page
* However, the project files (to actually build the new code into trunk) are not yet committed
+
* Implement ReportViewer control and page
* DiagramViewer page has been created
+
|
 +
''TODO''
 +
|-
 +
| Unit tests
 
|  
 
|  
* Commit everything after version 5.8 has been released
+
* Unit testing framework for report is created => '''Stable'''
* Finish DiagramViewer page => replace the current page
+
* Testers have been trained for writing unit tests => '''Stable'''
* Start the ReportViewer page
+
* Unit test coverage has been checked => which part needs unit tests?
* Start integrating to Monitor
+
** Excel and Ppt table chart
* Start integrating to Dashboard
+
** Pseudo calculator for displaying calculation formulas
* Start integrating to Tabulation Script
+
** Filter
 +
** Significance
 +
|
 +
* Integrate with CruiseControl for running everyday
 +
* Web-testing for testing controls
 +
* Ppt/Excel assertion => ''Use new XML format of Office''
 +
* 3D image assertion => ''at last resort compare byte to byte, another approach is comparing by calculating hash value''
 +
* Configuration settings for hard-coded values
 +
|
 +
''TODO''
 
|-
 
|-
 
| Optimization
 
| Optimization
 
|
 
|
 +
* Stylesheet rendering is being optimized for using with AJAX
 
|
 
|
* Unit/Integration tests code coverage must be checked => acceptable ratio is 85%
 
 
* Code profiling must be done => minor change in design
 
* Code profiling must be done => minor change in design
 
* Performance counter must be implemented
 
* Performance counter must be implemented
 
* Generation time must less than current system
 
* Generation time must less than current system
|-
+
|
| Testing
+
''TODO''
|
 
* Test data generation API is completed
 
* Testers have created most of the current test cases
 
|
 
* Configuration settings for hard-coded values
 
* Check code coverage => define more test cases
 
* Ppt/Excel assertion
 
* Integrate CatGlobe.Report.Test project back to DomainTester project
 
* Testing of controls and javascript code
 
 
|}
 
|}
  

Revision as of 03:51, 27 October 2009

Introduction

ReportEngine.jpg

The components/modules that are using Report engine are: Dashboard, Monitor, Tabulation Script, Report Viewer, Diagram Viewer. These modules send request of generation to report engine including:

  • A data cache which contains all source data
  • Stylesheets (including external and inline stylesheet) to apply
  • Kind of presentation that the report should be exported as (pdf, excel, ppt, word, html, image)
  • Other kinds of settings

The report engine takes the request, make calculation using the Interpreter, and then export the result into desired format.

A report consists of elements like: diagrams, images, text blocks, pages, paragraphs. The most important element is Diagram, which can be discriminated based on:

  • Data
    • Cross Diagram
    • Standard Diagram
    • Tracking Diagram
    • Campaign Diagram
  • Presentation type
    • Table chart
    • Image chart which include many kinds of chart like: pie, bar, line, funnel, area, radar etc.

Why a new system?

Current system drawbacks

  • Heavy XML processing
  • Heavy code duplication
  • Inconsistent generation process

Thus it makes the cost of fixing bugs and maintain the old system greater than the cost of making an new system.

New system goals

  • Remove the drawbacks of current system
  • Side by side working with the old system
  • Fully unit testing
  • Unit/Integration tests can be run automatically
  • Testing API must be simple enough for testers to join writing test cases
  • Report API must be keep as simplest as possible
  • Design documents must be officially registered on wiki page

Approach to new system

Steps are defined for approaching the new system, which are described below:

  • Take the smallest possible case for prototyping (CrossDiagram with one axis for both row and column)
  • Design the core functions to server the single case with full testing
  • Approach in depth to:
    • Tabulation Script
    • Diagram Viewer
    • StyleSheet
    • Different presentation types
  • Move on with Report and Report Viewer
  • Move on with Monitor
  • Move on with Dashboard
  • Move on with data calculation optimization
  • Performance refining => change design and test cases
  • Full implementation for:
    • Cross Diagram
    • Other diagrams
    • All presentation types
  • Replace the old system's gui components

Design details

Lesson learn

This section lists all the:

  • Mistakes
  • Useful knowledge

that we have encountered during implementation.

Current implementation status

Task name Done Not yet done Time estimation
Generation process
  • Generation path is well defined and tested => Stable
  • Cross diagram is fully implemented (statistic)
  • Apply data generation for other Diagrams
  • Optimize values calculation
  • Save calculation result to XML

TODO

Nevron (image) charts
  • Bar/Line/Pie/Radar charts have been implemented for single case of CrossDiagram
  • All stylesheet and dom operations are split into different files to ease the maintenance, however the files are still messy and need cleanup
  • Nevron 2009 is applied and can be deployed side-by-side with Nevron 2007
  • Full testing (manual) is required after DiagramViewer page have finished

TODO

Table charts
  • Table adaptors have been defined and tested => Stable
  • Full support for HTML
  • Full support for PDF
  • Draft support for Excel and Ppt
  • Table layout in PDF is in acceptable mode with 1x1 tables => Wait for real sample of 2x2 cases
  • Stylesheet is fully applied => Still in testing mode
  • Full testing for stylesheet
  • Full support for Excel and Ppt

TODO

Stylesheet

  • The stylesheet is kept as is intentionally in order to keep changing at the minimal level
  • Redefine the hierarchy of stylesheet classes

TODO

Tabulation Script
  • The main script library has been moved to CatGlobe.Report assembly
  • The code is hacked (with minimum impact) to allow plugging of new report's script library
  • Full support for tabulation script => Lots of unit tests have been written
  • Tabulation script editor screen has been changed allowing running with new report code
  • Move all implementations to new assembly
  • On-screen testing

TODO

Web controls
  • DiagramViewer control has been created
  • DiagramSettings control has been created
  • Diagram viewer page has also been created
  • Diagram settings and viewer has been applied to monitor and dashboard => still in prototype phase
  • Full testing on Diagram viewer page
  • Replace current diagram viewer page
  • Implement ReportViewer control and page

TODO

Unit tests
  • Unit testing framework for report is created => Stable
  • Testers have been trained for writing unit tests => Stable
  • Unit test coverage has been checked => which part needs unit tests?
    • Excel and Ppt table chart
    • Pseudo calculator for displaying calculation formulas
    • Filter
    • Significance
  • Integrate with CruiseControl for running everyday
  • Web-testing for testing controls
  • Ppt/Excel assertion => Use new XML format of Office
  • 3D image assertion => at last resort compare byte to byte, another approach is comparing by calculating hash value
  • Configuration settings for hard-coded values

TODO

Optimization
  • Stylesheet rendering is being optimized for using with AJAX
  • Code profiling must be done => minor change in design
  • Performance counter must be implemented
  • Generation time must less than current system

TODO

Document revisions

Version No. Date Changed By Description Svn revision
0.1 27.04.2009 Nguyen Trung Chinh Create the first version for working with a single case of CDG NA
0.1 20.07.2009 Nguyen Trung Chinh Refine the document NA
0.2 30.07.2009 Nguyen Trung Chinh Finish version 0.2 54885