Menu

Home

Jean SUZINEAU

Basically this library provides the mean to create a list of objects from a TDataset.
Then around, you have all the bells and whistles to use these lists in the most common contexts where you usually use a TDataset. For example to edit a field value, instead of using
a TDBEdit component you can use a TChamp_Edit.
In a dataset, you can have access to one line at a time. But with this mapping you can build complex relations between all the objects, directly reflecting the underlying UML class diagram. For example in our planning software, tasks are read
from a single table and end up displayed in a tree. Each object-task can be connected
to objects representing teams, employees, vehicles, tools, a bit like a piece of fabric.
You can get several different views of this fabric, listing the planning of an employee,
or the affectations of a tool. May be it's not completely impossible to achieve with datasets, but it's a lot more easier to do this way.

The wiki uses Markdown syntax.

Project Members:


Discussion

  • Jean SUZINEAU

    Jean SUZINEAU - 2014-09-25

    jsWorks

    Besides the library, the package includes an example of use, jsWorks. Initially I wrote jsWork to manage my work time as freelance and prepare my invoices. The first version of jsWorks was written in Delphi with datasets and Zeos components around year 2000. But with time, new version of mysql appeared, with new version of Zeos components and new interfaces: the code was not compilable anymore. The jsWorks included here is the starting point of a complete rewrite.

     

    Last edit: Jean SUZINEAU 2014-09-25
  • Jean SUZINEAU

    Jean SUZINEAU - 2014-09-25

    Main design pattern for data

    The library contains a lot of code. Basically, the design pattern for a given table named "TableName" involve 3 units containing principally 3 classes:
    - unit ublTableName defining class TblTableName
    - unit upoolTableName defining singleton class TpoolTableName
    - unit uhfTableName defining class ThfTableName

    TblTableName is the class representing a line of the table.

    poolTableName: I'm not expert in java, but I think TpoolTableName corresponds to the concept of factory in J2EE. poolTableName store the loaded instances of TblTableName, and when you need the blTableName for a particular key, you will call something like poolTableName.get( key). poolTableName is also the object that can retrieve a list of lines. This list of lines can be aggregated to a bl of another table or be used for display in a visual component (mainly TDockableScrollBox for now). I have no example for now but the list can also be used with some code derived from OOoDelphiReportEngine (also published on SourceForge) to generate OpenDocuments from templates (mainly .odt from .ott).

    It's a bit tedious to write by hand the units and classes of this main design pattern. The best is generate the code automatically from a template with the name of the table and list of fields as variables. For now I use plugins i've written for ModelMaker (UML software bundled with Delphi 7) and StarUML (also published on SourceForge). I plan to include them in this library but some work and reflection is needed.

     

    Last edit: Jean SUZINEAU 2014-09-25

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.