#1 2015-01-25 15:22:27

DobiSoft
Member
Registered: 2015-01-25
Posts: 1

Some questions

Hi,

First of i ma utterly impressed with mORMot and your dedication to improve it.
I am in the same situation as many many delphier i falled into the trap of RAD with Delphi 1 and still cannot escape.
Found mORMot a week ago and started collect information about it here, reading the excellent doc (still need to digest it though, and grat for the other great product SynProject).
Right now i start evaluating  my possibilities because i started a new project.
It must be a cross platform enterprise product management system with windows ios android and web client requirement.
The product database must be partially schema-less so called EAV anti pattern schema. There is a Product Categories tree structure and every product belongs to one of those categories, and those categories define the product attributes which can be added dynamically after deployment. The user can search based on those categories and attributes.

The database will be most possibly PostgreSQL ( the second place win by MariaDB) based on the possibility to store those EAV attribures and ability to fast select based on them. MongoDB still on the list but i afraid the for the normal SQL like work it will be suboptimal.

I study mORMot and possibly RO Data Abstract to craft the middle tier Application server.

Some questions to mORMot that i cannot ansver based on docs (maybe totally my fault).

Is there any possibility to define global Bussiness rules based on data manipulation on the server side and scripting it with spidermonkey for the best elasticity? For example after CRUD operation on tables possibly cascade propagating the changes to other tables. Such events are possible in RO DA, how can i implement them in mORMot?
Client AND server side validation. How can i implement server controlled validation schemas deployed by server to the client to save bandwidth and improve the user experience?
How works the multi user concurrency and change conflict resolution? The is some exceptions on client side when conflicting changes occur?
I red some debates about supporting nextgen compilers. Is it still a problem? I need to support FM apps from XE7 to the upcoming new compilers for a several years from now.
How i can support livebindings in FM gui widgets. I would like to drop all together TDataSet and like components and work with collections? 

That is for now i have some other question mainly for database design of partial EAV schemas but i need first for myself clarify them big_smile

Thanks for your time and again gratz for that great product!

Sandor Dobi

Offline

#2 2015-01-25 16:59:43

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

Re: Some questions

Thanks for your interest!

You can add whatever process you need at CRUD level, using TSQLRestServer.OnUpdateEvent property.
But I would not go into this direction.
Putting some logic at persistence level (by some kind of high-level triggers) is just a wrong idea, IMHO.
In short, with RAD you mixed UI and logic. You know the result.
With triggers, you mix logic and DB. Guess the result.

For a new project, I would consider switching to a SOA approach.
Relying on services, instead of just storing data.
Services is the right place to put the logic, not at CRUD level, IMHO.
This is where DDD comes to mind.
Putting some logic at persistence level (by some kind of high-level triggers) is just an anti-pattern, according to DDD.
Take some time to read our documentation, and our slides, about DDD.

For the ORM, you have filtering and validation features in mORMot.
See http://synopse.info/files/html/Synopse% … ml#TITL_56
Those work on both client and server sides.

For concurrency, you have a LOCK feature at ORM level.
This work from client side: you can lock an object at TSQLRest.Retrieve() with forupdate=TRUE, then release the lock at update, or using TSQLRest.Unlock.

The main mORMot units cannot be compiled with the NextGen compilers. And I'm not willing to do it. Code would become an awful mess, due to compatibility breaks.
But our SynCrossPlatform units can be compiled with the NextGen compilers. So you can consume mORMot services from FM apps on any platform.

Offline

Board footer

Powered by FluxBB