[Lazarus] Using Classes Generated by Lazarus Database Desktop

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Mon Jun 23 19:05:30 CEST 2014


On 2014-06-23 15:14, Jack Linke wrote:
> Any assistance or clues you can provide will be very much appreciated.


This might also be of interest to you:
  tiOPF is a Object Persistence Framework, which allows you to create
applications using OOP. The framework abstracts the data persistence
(load or saving of data), and allows you to switch backend databases
without changing a single line of code in your application. tiOPF also
includes an advanced Model-GUI-Mediator (MGM) implementation. This
allows you to hook up your data objects to standard VCL, LCL or fpGUI
widgets - no need for DB-aware components. MGM also gives you
bi-directional updating.


About Lazarus Data Desktop usage - here is old post I wrote in the tiOPF
newsgroup. Hope this helps.

====================================================
http://opensoft.homeip.net/webnews/webnews.cgi?user=anonymous;group=tiopf.support;article=7151
-------- Original Message --------
Subject: Lazarus Data Desktop binaries available for download
Date: Thu, 26 Aug 2010 09:23:47 +0200
From: Graeme Geldenhuys <graemeg@*****>
Newsgroups: tiopf.support

Hi,

For you convenience I created binaries of Lazarus Data Desktop and made it
available on SourceForge in the File Downloads section. Despite the name,
this utility can be used by Lazarus and Delphi developers and it's a
stand-alone program.

It summary, Lazarus Data Desktop is something like Borland's old Database
Desktop and tiOPF's tiSQLEditor rolled into one, with some new features...
Features like creating visitors, whole class units etc from your database
design. This is a *huge* time saver - especially if you use hard-coded
visitor.

http://sourceforge.net/projects/tiopf/files/

I uploaded Linux 32 & 64-bit, and Windows 32-bit executables. The latest
source code for Lazarus Data Desktop is included with Lazarus IDE.


How to use it:
--------------
Steps to create a tiOPF Object and ObjectList class, and the associated
CRUD visitors.

1) Run Lazarus Data Desktop and setup and open your database connection.

2) Expand the database tables treeview on the left. Expand the table you
are interested in.

3) Select the 'Table Data' node. You will now see a grid with data only
the right.

4) Select the document icon with the letters "PAS" above the grid. For
some reason the tooltips are not available under Linux. You will now see
a "Code Generation Dialog".

5) Select you choice.  tiOPF is the 3rd option in my system. Code
generation is a plugin system, so other options will become available in
the future.

6) The "Configure Generate Code" dialog will now appear.

6a) This dialog allows you to reorder the fields, specify which ones you
want to use, what property types to use (though the default are pretty
accurate), specify the property name if you don't want it the same as
the table field name etc...

6b) Under the "Options" tab you can specify what visitors to generate.
What the names are of the object and objectlist classes. What the
ancestor class should be used (default is TtiObject and TtiObjectList).
Also you can specify the name of the unit which the code will reside in.

    Note #1: under the VisitorOptions you have a ReadList visitor (very
             handy)
    Note #2: under ClassOptions you can specify the caCreateClass option
             which will then generate the BOM classes, otherwise you will
             only generate visitors.

7) Specify the name of the unit in the "Save to" edit box.

8) Click OK.  The code will be generated. A popup window will appear
with the code as well.


Hope that helps....  I can now generate classes and visitors with
impressive speed. :-)  The generate code normally needs one or two
tweaks and it's ready to go.

------------------------------


For more details, you can read an old posting in this newsgroup titled
"Create classes and visitors as easy as 1,2,3!" and dated 2008-07-10.


Regards,
  - Graeme -

====================================================



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the Lazarus mailing list