#1 2011-07-22 17:13:41

wpostma
Member
Registered: 2011-07-22
Posts: 5

Questions about SQLite3 framework and demo...

I am deeply impressed by the Synopse commons code I have seen so far.  I have been playing with SynFileDemo of the SQLite3 framework, and it's an impressive piece of technology. 

Most of the tabs (other than the data tab) seem to be self-evident in purpose and functionality to me, but I get a bit lost trying to figure out how the Data tab should be working...

So, with great respect for what an amazing piece of work this is.... I have a few questions:

1. Why does the SynFileDemo (and presumably others) use a blank main form and then construct all the components at runtime instead of working more idiomatically (at least for demo code) with a simple VCL form?    Is the purpose of the "Framework" to work opposite to all other Delphi conventions (avoid all TComponent and designtime stuff, and work 100% with only classes instantiated at runtime?).  Probably a FAQ, so a URL would be enough here.

2. When running SynFileDemo, I go to the data tab, and when i want to "create a new data", I get a "create a new empty data" file dialog, which seems to only work when I pick an existing file. Why is it called "new" when it requires a data file to work? The dialog doesn't tell me what the file extension is that it expects to find.  (Update: it seems it works with most basic mime types, and figures out mime types and attaches data files in any format.. So then that makes the Data tab clearer to me. I would have called it the "File-Attachment" tab, and the Create buttons really should be an Add Row button, in classic Delphi-world Database terminology.  Create conjures up the idea of creating a table, or creating a file, not adding a record to a file store.  Maybe CREATE is the word in SQLite circles for Add Record? )

3. Since the Data tab appears to be mostly about adding files to the system, is there a demo of a more typical "TTable" (think Fishfacts classic delphi demo)  available..... That shows string, integer, plus bitmap fields in a single record, and some kind of metadata editor (column type designer)?

What I'd like to do is something like the old BDE TTable functionality but using SQLite, where you define tables and fields, and you get a UI designed for you that displays (like a DB Grid view) the records/fields/data you are using. Essentially maybe I'm looking to see what to do to add a remote or local file "DataSet" (TTable) object to Delphi using this SQLite framework, and traditional data-aware controls.


Warren

Last edited by wpostma (2011-07-22 18:07:36)

Offline

#2 2011-07-22 17:58:57

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,656
Website

Re: Questions about SQLite3 framework and demo...

Thanks for your interest.

1. The RAD approach has its limits - I 100% agree with what is written here: http://www.simonjstuart.com/2011/07/22/ … he-fashion
You can use our ORM with a RAD approach, but you'll loose a lot of features.

2. SynFileDemo is.... a demo...
Its purpose is not to be an useful application, but show how the framework works and its MVC/ORM/n-Tier/SOA architecture works.
Of course, the naming can be changed.
In fact all caption on screen, all actions, all reports can be customized.
All you see is the default layout.
We use this framework on real applications, with some diverse implementations...

3. You're asking about a RAD demo.
It is not the main aspect of our framework, which is to use an ORM approach, in a Client-Server SOA architecture.
For a more "classic" approach, take a look at the latest SynDB/SynOleDB/SynDBOracle/SynDBSQLite3 units and the SynDBExplorer demo.
See http://blog.synopse.info/post/2011/07/2 … ect-access

If you have some time, download our documentation from http://synopse.info/forum/viewtopic.php?id=55 and read the general presentation of the SAD document.
It's not so didactical or well written (I'm no writer, and no native English), but I tried to introduce and reference some best-practice principles used in our framework.
Worth trying to understand it.

If you have ideas, you can help also for the documentation.
Thanks!

Offline

#3 2011-07-22 18:08:24

wpostma
Member
Registered: 2011-07-22
Posts: 5

Re: Questions about SQLite3 framework and demo...

Excellent.  Thanks. I am trying to wrap my head around the ORM and see if ORM+RAD can be hybridized in some way.

There is a lot to absorb here, and the HELP is in a format that I don't quite understand how to view yet.

Incidentally, that link about "dropping your business logic on your controls" makes a point.  But the solution I prefer isn't to reinvent (or scrap) RAD.  It's to make the general practice that a button gets dropped, and the code inside it looks like this:

  procedure TForm1.AddButtonClick(Sender);
  begin
    Controller.DoAction( {action}acAdd, {reference}ObjRef2);
  end;

Then the .DFM and .PAS contain a mapping of your Controller to your UI, only.    Your UI doesn't know about your model, and your model doesn't know about your UI.   But you can still use RAD.

Having said that, I defend your ability to write your own code HOWEVER YOU WANT. I'm only asking why so I can understand.  It is clear to me you're a phenomenally talented developer, and this framework is really really cool!

(Update: Removed my religious-RAD-jihad beliefs which are off topic for this forum!)

Warren

Last edited by wpostma (2011-07-22 18:24:20)

Offline

Board footer

Powered by FluxBB