Some explanations about DynaLib

Wed, 02/06/2008 - 14:38 by uadeveloper @

Some time ago I received email from prospect which is thinking about purchase of DynaLib. He asked to explain all negative signs in comparison table for DynaLib, xLib and DFD. Here I cite direct answers of Oleg Rudenko who's the developer of this excellent library as you know:

> Create structure from string

Creation of structore on basis of its declaration from string:

dGrp.LoadDeclare('MyGrp GROUP|Name STRING(60)|Index LONG|.')
  ! Create completed structure like
  ! MyGrp  GROUP
  ! Name     STRING(60)
  ! Index    LONG
  !        END
  ! It is analogue for other structures too.
  ! values of TEXT controls may be used for parameters

> Create structure from text file

Analogously to above case but declaration is loaded from usual text file. Syntax of declaration of sturctures is completely coincide with code in CLW files.

> Create Structure from existent disk file

Creation of FILE structure from disk file (arent uderstandable?!). You just point a file and some options. Library opens file. defines a driver. for DAT files can read a password, defines structure and
create it. Just one method!

> Link mode to static structure

It is possible to link to any existent structure and get from it whole information wnd work with it using DynaLib.

> Native work with referals to base data types

If usual structure contain string reference (&STRING), then using
WHAT/WHO/WHERE you can receive only address of string from this field
but not value of the string. Dynalib allows to work with these fields
both as with references and as with string that is referenced by this
reference directly.

> Extended properties for fields in created structure

For example you may add additional properties for fields that will be
used in LIST box, i.e.

Price DECIMAL(15,2),ALIGN(R)

Also it is possible to add comments for field, that will be saved in
properties of this field and may be used by developer later:

Sum DECIMAL(15,2) ! Sum = Price * Total

> DeepAssign works for FILE-structures with all MEMO- and BIND-fields

It is possible to assign buffers of files (including of MEMO/BLOB-fields) using single method. It is comfortably to use in
copy procedures.

> More methods for direct access to field

All methods are described in help. In particular for access to field
using DFD you may use only mechanism WHAT/WHO/WHERE. But DynaLib has
methods Field/ClrField/PutField/FmtField/PutRef/GetRef, that allows to work with required fields using their labels or number inside
structure directly.

> Information methods for all fields

DynaLib allows to receive ALL stored information for field inside
structure. In particular type/size/precise etc. DFD does not give
those information. Almost complete information it is possible to receive for FILEs and VIEWs using props. Information for
GROUP/QUEUE/CLASS is limited by base level using WHAT/WHO/WHERE.
For example they does not allow to get type and size of field.
Besides using these operators in C5x will crash with GPF accessing
to arrays.

> Extended methods for access to structures

This point is particular case of point "More methods for direct access..."

> Processing-macro-methods for complex processing
> of QUEUEs/FILEs/VIEWs with
> copying/removal/updating by user instructions

Methods of bulk process of structures: Process/LoadTo - this single
method can replace by itself enough "overload" procedure for copying/processing of files/queues.

> Finding created structures by label/names

Each structure created by DynaLib (also Link-structures) is stored in
inner list of DynaLib. Using procedures declared in MAP at the end of
dLib.inc you can find in this list required structure by its label. As result you get referenec to instance of search class. Work with it as usual. DFD, naturally, does not use those list. Clarion RTL use those list partially (for FILEs/VIEWs). And just only for opened structures. To get legal access to this list is impossible. That is why impossible to find structure created using DFD by its label.

> Building VIEWs? DFD has view support.

From what times DFD knows how to create VIEW-structures?! In general,
DFD knows how to create ONLY dynamic FILE-structures! It CAN NOT CREATE dynamic GROUP/QUEUE/VIEW!!!

> Information methods for VIEWs

Using DynaLib you can get ALL information about VIEW-structure. It is
allow to easy recreate its declarion one to one. Using Clarion props
you may get only part of information about VIEW. All available methods for work with VIEWs are described in TDynaViewClass help.

> More productive and comfortable work with any SQL statements

DFD itself, does not contain classes and methods which would allow to
work directly with SQL-sources and queries. I.e. it allows to create
only file structure on the basis of SQL-query and all further worj
with this data source can be controlled using only standard operators
via one of the Clarion SQL-drivers. DynaLib can do all aforesaid. But, in addition, DynaLib has separated class TDynaSQLClass that allows to organize work with SQL-queries as via Clarion SQL-drivers of a Clarion as directly via ODBC-driver of the operating system, that in many cases gives big profit in speed of execution of SQL-queries and receiving of process results.

Hope this allows you to make decision more quickly. :)