Here are the main modifications of this version 1.2 of the framework:
- compatibility tested up to Delphi 2009, with or without our Enhanced Run Time Library (which now compiles up to Delphi 2007) - by default, the ENHANCEDTRTL compiler conditional is not defined;
- lot of rewrite made for the Unicode version of the compiler (tested with Delphi 2009) - it was quite difficult to avoid most implicit conversions... the compiler is a bit tricky, as soon as you want to use the UTF-8 encoding (as we do, since JSON and HTTP do like this encoding, together as SQLite3), and not Unicode (which is in fact UTF-16);
- can create an internal TSQLRestClientURIMessage messaging window, if you don't have any User Interface (so you don't have to add Forms unit);
- named pipe speed improvement (10 times faster) under Vista and Seven.
As usual, you can download the whole Open Source framework for free, in
SynopseSQLite3.zip.
Since I validated the sources for only Delphi 7, 2007 and 2009, I would
like some feedback from other versions.
You now have a whole Unicode (or not) SQLite3 wrapper (statically linked:
no external dll required), very fast, together with a true ORM framework, and a
JSON/RESTful client/server model with diverse communication layers (direct
access, windows messages, named pipe, HTML). Don't forget to test the included
reporting system, and the auto-generated User interface.
10 reactions
1 From Leo - 20/01/2010, 03:49
Hello Bouchez,
Thank you for your excellent work!
But I have been confused by Enhanced RTL and LVCL, I meet some problems when I compiled in D2007. Can you write some simple and clear step explanation?
I thought, It's a difficult matter if you want compatible with all Delphi editions. So, I suggest that you may (only) choose D7, D2007 and D2010 as the target platform of SynopseSQLite3.
Best regards
Leo
2 From A. Bouchez - 20/01/2010, 10:50
Thanks for your interest.
You don't have to install the Enhanced RTL nor the LVCL to use our SQLite3 framework.
I didn't test it with Delphi 2010, since I don't have this compiler version. I've paid for Delphi 2005,2006,2007,2009 and didn't use them for real production (still use Delphi 7+CrossKylix). So if you want to offer me the 2010 edition, you're welcome!
To install the framework, just create a directory to unzip the source files, open the TestSQL3.dpr file and compile it. The framework will be tested under your compiler (by a lot of unitary regression tests), and report any error.
Look for example at the SQLite3_Test function in SQLite3.pas unit to see how to create a database, and access the ORM framework. The SQLite3Http_Test function in SQLite3Http.pas will show you how simple it is to use the client/server remote access.
The code of the framework itself is a lot commented.
More documentation to come (this Week End I hope).
3 From A.Bouchez - 20/01/2010, 11:11
What are your test results on your computer? On my old Sempron 3000+, here are what I obtained (compiled with Delphi 7):
Synopse SQLite3 Framework TestsUsing SQLite engine version 3.6.22
TESTS OK
HTTP: first in 11.54ms, done in 200.24ms i.e. 4993/s, average 200us
Named pipe: first in 79.90ms, done in 110.42ms i.e. 9056/s, average 110us
Messages: first in 105us, done in 69.06ms i.e. 14479/s, average 69us
Direct: first in 73us, done in 54.14ms i.e. 18468/s, average 54us
Done - Press ENTER to Exit
Could you find a faster RESTful server (every JSON data message is 4803 bytes long)? Compare with the Dot Net WCF, and smile using Delphi under Win32!
4 From adrian - 22/01/2010, 09:20
I tried to compile using Turbo Delphi but I get the following error:
[Pascal Error] SQLite3Commons.pas(13978): E2251 Ambiguous overloaded call to 'Pos'.
If I'm commenting out the overloaded Pos function the project will compile without problems.
5 From A.Bouchez - 22/01/2010, 19:51
Very interesting. Which version of Turbo Delphi do you use?
6 From el - 28/01/2010, 17:05
Thank you for your excellent work!
7 From coblongpamor - 10/02/2010, 07:15
I interested to use this sqlite wraper, but i don't know how to use in a simple application. where i can find example standar operation, like standard data access (insert, edit, delete, loop, and so on). i tried to use TSQLTableToGrid, but not sucess.
best regard.
8 From A. Bouchez - 10/02/2010, 08:50
You can do non visual direct use of the SQLite3 wrapper by using the TSQLTableDB class, for example. This does not use the Client/Server approach of the framework, but allows you basic approach.
For standard operations (insert, edit, etc...) you can use the TSQLRestClientDB class, which calls directly the wrapper without any Client/Server approach. An example of use if available in the SQLite3_Test() function of the SQLite3.pas unit. And if you want to migrate to a true Client/Server application, you will just have to change the class creation instance: TSQLRestClientDB inherits from TSQLRestClientURI, so it's a standard Client of the framework.
The User Interface usage (like TSQLTableToGrid ) has no sample yet. It's very powerful and easy to use, so you are right looking after it! A "Master App" is coming, but we are using some proprietary UI components here (from TMS) so it's difficult to give the source code and not allowing you to compile it without paying a third-party company.
9 From coblongpamor - 12/02/2010, 07:28
Thank you for the quick respon. now i try to learn the SQLite3_Test() function as you suggest.
best regard
10 From A.Bouchez - 21/06/2010, 11:08