Greetings after several months,
Being project architect / GUI DB developer / DBA / Software Distribution engineer all wrapped up into one, I had to abandon Laz in favor of MS Access 2007 to build this application. (
http://www.lazarus.freepascal.org/index.php/topic,13754.msg74973.html#msg74973 ) No time to deal with the Client / Server environment learning Laz curve on top of all of the other parts of this project.
So, I would still like to consider Laz for either future areas of this application, or for the next application. I ended up pushing Access to the absolute max as a Client / Server front end development tool.
I have double class wrapped data between the forms in the SQL Server back end. As the application starts up, it creates objects for each database table. Those DB objects exist in global memory space for the entire time the client app is running. Then the application boot-strap phase ends and the first real Form opens, and the main non-UI form terminates.
That first form is a list form, so it is a read-only form. All "list forms" in the application are read-only as I did not want to deal with messes of lock tangles. "Double click the record to bring it into edit mode." Behind the scenes, record list forms run a Stored Procedure to select the correct records, and Access DAO.QueryDef objects are nested to download all of the data into an Access FE DB temp table. Then the form builds yet another DAO.QueryDef object also on the fly to populate the form record list control from the FE temp table.
** I would like to find some way to cache data in Laz front ends, not necessarily Access tables, something cross platform would be preferred. **When records are brought into edit mode, a Stored Procedure to check out that one record based on unique ID of said record is executed. I use ADO Command / Paramemters objects to issue those Stored Procedures. I found a couple of bugs with automatic datatype mapping between Access and SQL Server... when I call the parameter refresh API, something guesses wrong so in those instances I must manually fix the parameter datatype before I execute the SP, else I get a crash. Otherwise it works reliably.
** Is there something cross platform and comparable to ADO Command / Parameters objects in Laz? **VBA in Access 2007 can even do real OO things... I coded up an in-memory collection class. I know Laz / Free Pascal can do such. I was surprised to see that VBA could offer such capabilities.
The other layer of class wrapping is what I call my Validation classes. Whereas the DB objects exist the entire time the application is up, the Validation class instances are created by Add/Edit record forms and exist only while that said form is open. So Add/Edit record form opens, in the Open logic there exists knowledge of where to find the ID of the record that form must edit (in the case it is an Edit form), otherwise opens with blank fields in the case of an Add form. Either way said Form creates an instances of the correct Validation class. Let's take the EditForm example. So Form opens, creates an instances of the Validation class, form passes to the validation class the ID of the record it needs to edit, and tells Validate to Populate passing a reference to Me (which is the form itself). Validation class then contacts the DB class object to look up the record matching ID. If successful, Validation class receives the record back form the DB object, then Populate uses the Pointer to Me (MePointer) to Populate the unbound form controls with the record to be edited. If the Commit button is pressed, then the Validation class it instructed to stuck the data back out of the unbound form controls, Validate that no business rules are being violated by any of the proposed data. If bad data is found then Validate turns the form control red, an error dialog is popped, and the DB does not get touched. If however Validation of the data passed, then the Validation class contacted the DB object passing all fields back to it, and calling the correct INSERT / UPDATE method of that class. If the COMMIT succeeds, then the form closes, and the Validation class instances is destroyed along with the form. Hopefully all of this scenario is very doable in Laz.
** Comparing what I am doing with Access ("Client/Server Edition") to Laz with Data Modules... I get totally lost trying to equate Access to the Borland tool style. Open to suggestions in this area.**Project stats thus far on my lil project...
19525 LOC's in 76 stand along classes / modules
13926 LOC's in 47 GUI forms
Totaling
33451 LOC's in 123 modules
(And that is client-only... ignoring all of the DDL on SQL Server, SP's galore.)
And the project is no where near completion. The client would like me to develop fully Hierarchical / BOM awareness into this application, whereas currently it uses a flat model. And some other mind-numbing capabilities.
I have had quite many scary encounters with undocumented Access bad behavior. At one point I was certain that I had corrupted the DB. Na, just an undocumented Access bug that if one creates an instance of a Form via its OO Class, then said instance does not have its key set in the Forms collection. Manually spinning through the Forms Collection checking each Form Instance's name is the only way to receive back out of the Forms collection a Form instances in the case that the way it was instantiated was the fancy OO way.
Some times Access will just crash out of the blue for no good reason... and if that happens to be when running a DAO query, then I have to comment out the .Execute in my shared query code, and run the query interactively (through the UI) in order to receive the error, as when driven by VBA code no error will appear, Access simply crashes.
And on and on... (rant)

So, I'd like to get up to speed on Laz, and then see how the two tools compare. Besides, I run Linux on my non client computers - Laz runs on Linux, not Access!
Oh, one suggestion on this forum system. A number of other forum systems I am a member of have a view which shows all threads I have ever posted to. Threads with yet un-read posts will show up in
BOLD font, and threads I have already read all of the messages in are in normal font. Such would be very handy in this forum system. This is not the same as reviewing all of my posts, as if I replied more than once to a thread, that would show each response. The view by threads shows all threads I have ever posted to, in descending order based on date of most recent post. So if someone replies to a thread I commented on months ago, then right away it bubbles to the top of that list, and is
BOLD so I can see that someone replied to that thread.
TIA!
Michael