You are not logged in.
Pages: 1
Hello,
I plan to interface an ancient application written using Delphi 5.
I would like to connect this old application to a new server part.
Server is an interface based services (like Sample 14) written using Delphi 2010 + latest mORMot.
I tried to wrote a sample client (D5) application but I simply cannot compile my project.
Especially SynCommons.pas.
How to reproduce:
- Create a new project in Dephi 5.
- Add SynCommons to the uses.
- Compilation failed.
So chapter «Implemented Tests» of SAD 1.18 says that «Delphi 5 is supported for a limited scope including SynCommons and SynDB»
Did I missing anything or D5 support is dropped ?
Offline
The mORMot.pas unit does not work with Delphi 5.
So you won't be able to compile "regular" mORMot client.
The ORM and SOA part of the framework starts with Delphi 6.
What you can do is using the cross-platform client code generation.
I'm currently working on it.
Take a look at CrossPlatform.pas.mustache template file.
RESTful remote ORM access should work with Delphi 5.
Fully functional interface-based services will be added in the next days.
Feedback will be welcome!
Offline
I took a look at CrossPlatform.pas.mustache + SAD + «27 - CrossPlatform Clients»
Delphi has no TInvokeableVariantType so SynCrossPlatformJSON.pas will not compile.
And I am a little bit confused about the SAD.
Chapter 23.1.3 and Chapter 24.2.2 suggest that SynCommons.pas is compatible with Delphi 5.
But it refuses to compile.
I must admit that I do not have enough knowledge to see what to do - For the moment at least.
Of course I stay tuned for more details in the further days.
Thank you very much indeed.
Offline
You are right: TInvokeableVariantType is mandatory for SynCrossPlatformJSON...
As a result, I'm not sure I would be able to let the SynCrossPlatform* units work with Delphi 5.
We need this kind of custom variant to handle our document content, to/from JSON...
SynCommons.pas compiles with Delphi 5.
There was some minor issues, which are fixed by http://synopse.info/fossil/info/f243749a2ae6
The regression tests work as expected:
Synopse mORMot Framework Automated tests
------------------------------------------
1. Synopse libraries
1.1. Low level common:
- System copy record: 22 assertions passed 19us
- TRawUTF8List: 70,005 assertions passed 60.97ms
- TDynArray: 1,027,702 assertions passed 109.34ms
- TDynArrayHashed: 1,200,629 assertions passed 72.05ms
- TObjectListHashed: 999,875 assertions passed 295.95ms
- Fast string compare: 7 assertions passed 1us
- IdemPropName: 27 assertions passed 29us
- Url encoding: 130 assertions passed 736us
- GUID: 8,005 assertions passed 411us
- IsMatch: 599 assertions passed 84us
- Soundex: 35 assertions passed 6us
- Numerical conversions: 782,932 assertions passed 281.57ms
- crc32c: 30,030 assertions passed 47.07ms
pas 17.32ms 344.4 MB/s fast 3.43ms 1.7 GB/s sse42 1.54ms 3.7 GB/s
- Curr 64: 20,053 assertions passed 809us
- CamelCase: 11 assertions passed 2us
- Bits: 4,774 assertions passed 25us
- Ini files: 7,004 assertions passed 17.45ms
- UTF8: 61,128 assertions passed 584.62ms
- Iso 8601 date and time: 36,015 assertions passed 3.95ms
- Url decoding: 1,100 assertions passed 123us
- Mime types: 20 assertions passed 13us
- TSynTable: 41 assertions passed 657us
- TSynCache: 404 assertions passed 41us
- TSynFilter: 1,005 assertions passed 1.70ms
- TSynValidate: 677 assertions passed 430us
- TSynLogFile: 42 assertions passed 284us
Total failed: 0 / 4,252,272 - Low level common PASSED 1.47s
1.2. Low level types:
- Url encoding: 100 assertions passed 225us
- Encode decode JSON: 1,659 assertions passed 5.05ms
Total failed: 0 / 1,759 - Low level types PASSED 5.28ms
1.3. Synopse PDF:
- TPdfDocument: 4 assertions passed 4.28ms
- TPdfDocumentGDI: 8 assertions passed 36.31ms
Total failed: 0 / 12 - Synopse PDF PASSED 40.60ms
1.4. Cryptographic routines:
- Adler32: 1 assertion passed 24us
- MD5: 1 assertion passed 4us
- SHA1: 5 assertions passed 9us
- SHA256: 5 assertions passed 7us
- AES256: 12,177 assertions passed 497.84ms
- RC4: 1 assertion passed 29us
- Base64: 11,994 assertions passed 45.23ms
- CompressShaAes: 1,683 assertions passed 2.64ms
Total failed: 0 / 25,867 - Cryptographic routines PASSED 545.82ms
1.5. Compression:
- In memory compression: 12 assertions passed 102.79ms
- GZIP format: 19 assertions passed 199.82ms
- ZIP format: 36 assertions passed 360.14ms
- SynLZO: 3,006 assertions passed 47.19ms
- SynLZ: 30,019 assertions passed 515.48ms
Total failed: 0 / 33,092 - Compression PASSED 1.22s
Synopse framework used: 1.18
Generated with: Delphi 5 compiler
Time elapsed for all tests: 3.29s
Tests performed at 01/08/2014 20:08:06
Total assertions failed for all test suits: 0 / 4,313,002
! All tests passed successfully.
As you can see, the extend is much lower than Delphi 6 and up...
The whole ORM + SOA features are not available!
Offline
Thank you so much for the patch.
I'm now able to use common functions on both side!
I'm extremely excited about the possibility of being able to use you CrossPlatForm approach.
However I would agree that supporting Delphi 5 is not the future for a young mORMot - (FPC/Lazarus/CodeTyphon probably does).
I still want to use mORMot on server side.
I found MsgConnect written by Eugene Mayevski (Eldos.com).
MsgConnect is open-source and free for non commercial use.
(but you need to purchase a commercial license if you are going to charge your customers)
MsgConnect supports:
- Synchronous or Asynchronous communication, callback are available
- You can switch from TCP, UDP, HTTP, MMF (Memory Mapped File) for communication
- I use MMF since I would not want to add another TCP implemetention (MsgConnect is relying on Winsock.pas)
- User authentication is available
- I only tried Java and Delphi 5 but there are different port to Linux, WinCE, Android and .Net (written in pure C++, C#)
- There are some MsgConnect articles here
Of course you probably know this library.
I just posting details for all users.
All this to say that I am integrating MsgConnect as transport layer.
And I use RecordLoadJSON / RecordSaveJSON for Marshalling on both side.
Initial experiments and stress-test have proven very successful and very positive **
So the lack of support for D5 is not an issue for me.
** No mORMot were harmed during testing.
Offline
Pages: 1