Friday, September 09, 2005

Report Functional Segregation

On the BIRT message board, I was asked, “isn't it better and make much sense to split the rpt design into two pieces:- one that contains all the screen layout details (the actual view part) and another part that contains the actual business logic and the query?”

One of the core designs in BIRT is that the ROM allows report developers to do just that. The breakdown of what goes where may not be what you were expecting, but it does have a logical break out of functionality. One of the key tasks for BIRT developers will be deciding where they should place their unique custom logic to achieve the maximum functionality and reuse.
So how should logic be split up in a BIRT report? Well like many I am still exploring the functionality in BIRT, and I am still waiting to see how the Library functionality is applied in BIRT 2.0. That said, I approach report designs thinking of five key functional areas. The links on the component names will take you to the RomDoc on the BIRT web site which is a valuable resource for understanding what a component can do.

Report Specific Properties (ReportDesign )
Data Acquisition and Preparation (DataSource, DataSet, Row, Parameter)
Report Structure (Grid, Table, TableGroup, Row, Column, )
Report Format (Style, TextData, Text, Image, Rectangle, Label, Line)
Page Presentation (GraphicMasterPage, SimpleMasterPage)

When libraries are enabled in 2.0 this breakdown of functionality will really start to be important. With libraries BIRT developers will be able to create sophisticated report components that can be re-used in multiple report designs.

For example, the DataSource component is responsible for a connection to the outside world that is used to acquire data. A good DataSource component would be able to query the run-time environment, perhaps for a configuration file, to determine what the DataSource should connect to, Dev database in the Dev environment, stageDb in the Stage environment, etc.

In my next few posts, I will attempt to spend a bit more time discussing the various types of components and how they are logically combined and used.

No comments: