|
Metastorage generates report classes
Manuel Lemos, 2005-06-06 05:30:00 GMT
A new version of Metastorage was
released providing several new features, being the most important the
newly added support to generate classes for extracting data for report
generation or other kinds of bulk processing.
A report class is a new kind of class that Metastorage can generate. This
kind of class can execute queries that may return values of variables of
individual objects of many related classes at once.
Report classes are more efficient to use than data classes when it is
intended to retrieve data from many persistent objects of different
classes for read-only tasks. Such tasks can be for instance
generating reports to present to application users, sending
newsletters to many users, or any other kind of operation to
process information of many objects of one or more data
classes.
Unlike data classes, report classes return arrays of data that constitute
rows of columns defined by expressions that make part of report query
definitions. Report queries use Metastorage
OQL (Object Query Language) to define conditions to filter the objects
to be queried. The result sorting criteria is also part of the definition
of a report query.
The generate report functions can be customized to return all the result
data at once, one row at a time, and even supports limiting the range of
rows that are returned by each query, which is a very important feature
for applications that need to present result data split in multiple pages.
The documentation was updated to present a detailed example
of all the capabilities of Metastorage generated report classes.
The report class generation support has been in use since December 2004 to
implement the discussion forums system of the
PHP Classes site. This system includes the listings of all forum pages
and the support for sending e-mail alerts to the site users when the forum
threads of their interest are updated. The message thread listings and the
alerts mailing list are retrieved using one report class generated by
Metastorage.
Several other features were implemented in this Metastorage release:
- Relationships with external components
Metastorage now supports defining reference variables or collections that
point to classes defined in other component definition files.
This feature enables the construction of complex applications with
multiple modules that reference each other objects without requiring to
load at the same time all the classes of the involved modules.
- Fix of bug in the command line arguments processing under PHP 5
A bug in the class that processes the command line arguments passed to
Metastorage was fixed.
Despite this bug was harmless, it made Metastorage halt in error when
using PHP 5, while under PHP 4 it continued to execute normally.
- Update of automatic variables
The values of autocreate and autoupdate class variables
are now updated with the values that are actually stored when the objects
are persisted.
This way, applications may subsequently inspect the object variables to
retrieve the actual values that were stored in the persistent container
(database table).
- Word wrap of text in UML class diagrams
The layout of UML class diagrams generated by Metastorage was enhanced to
word wrap long declarations of variables or functions. Now, the class
boxes should no longer appear excessively wide as before.
|
|