#1 2015-08-13 11:39:32

devol
Member
Registered: 2015-08-13
Posts: 6

mORMot + ZEOS + FB

I just meet a mORMot some weeks ago (and would like to adopt it!) ...

I have to work with Legacy code of a 10 years old application: 1.400.000 lines of Delphi code designed with RAD, I mean thousands of manual sql queries directly coded in VCL Control event callbacks :-(

I have some architecture experience (SOA/MVC/MVVM...) but I come from C++/J2EE world and I am a Pascal/Delphi newbie.
So I am looking for tools/libs/frameworks to smoothly improve the code maintainability/scalability...

I (urgently!) need to find a way to:

+ Implement tracing/logging stuff
+ Split business, GUI and DataStorage code in layers
+ Make the API testable
+ Auto generate the code doc ala doxygene or javadoc

Regarding to the mORMot documentation that I tried to read carefully, it seems that the framework could fulfill my need...


I started to code some tests this week to validate that I could go with mORMot but I failed to configure the ORM with Firebird:

    - I have successfully configured a TSQLDBZEOSConnectionProperties so I can use sql, it works fine (and fast!)
    - As specified in the 8.3.3. Database-first ORM doc, I have a very simple TSQLRecord class that I "register/map" to match my db using VirtualTableExternalMap
    - I tried a lot of different ways to create a TSQLRest instance to be able to call CreateAndFillPrepare but I failed


Could you please help me to start with a very simple mORMot-ZEOS-Firebird example with existing db?

Offline

#2 2015-08-13 15:45:14

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: mORMot + ZEOS + FB

Have you tried?:
mORMot\SQLite3\Samples\30 - MVC Server\MVCServerFirebird.dpr

Michal

Offline

#3 2015-08-13 17:58:19

ramersonw
Member
From: Brazil
Registered: 2015-07-16
Posts: 6

Re: mORMot + ZEOS + FB

Are you using a legacy database or using a new one?

Offline

#4 2015-08-14 06:38:38

devol
Member
Registered: 2015-08-13
Posts: 6

Re: mORMot + ZEOS + FB

I have already existing databases and a firebird server:
I can easily play with direct SQL using TSQLDBZEOSConnectionProperties but I would like to use the ORM stuff... possible?

Offline

#5 2015-08-14 10:10:07

devol
Member
Registered: 2015-08-13
Posts: 6

Re: mORMot + ZEOS + FB

It works! I forgot calling CreateMissingTables before fetching data.

Seems promising...

Offline

Board footer

Powered by FluxBB