You are not logged in.
Dear AB,
I know Mormot before and also play the examples it is a great tools for Delphi developer,
Thanks your efforts, delphi developer still has place to survival under web trends.
However, I get confuse in Mormot.
Our company develops a program in traditional Client/Server mode.
Now, my boss ask to change to web-based program,
I think the client interface use HTML+CSS+Jquery
and the database server use MariaDB,
how about application server apply Mormot?
diagram: <DBServer> -- <Mormot: SOA/ ORM ? > -- <Web UI>
As I know SOA with interface(client/server), need delphi client, it is not suit the above case.
ORM only to map DB tables/fields to entity.
My request is Mormot need:
1.) contains functions (web UI request -> logic process with DB data -> return simple result array)
2.) process SQL (web UI request -> update/insert/delete SQL to DB server)
3.) I never success to connect MariaDB until now, Mormot support MariaDB ? any example ?
Win10
Delphi XE7
MariaDB 10.0.2 or above
Please any suggestion to build the system base on Mormot.
Regards
Mark
Last edited by Mark (2017-10-18 08:56:52)
Offline
Take a look at the MVC Web part of the framework.
It can generates HTML + CSS content very easily.
But the page is rendered on the server side.
If you want to write an AJAX website, rendered on the client side, consider using the interface based services.
You can access to them using plain JSON and HTTP/HTTPS.
Offline
Thanks AB point me the right way.
How about MariaDB connection, I get cannot find any example, or fail when modify the mssql example.
any hints to me, thanks your help
Offline
Hi, AB
Do you plan to support direct with MariaDB in mORMot ?
because MariaDB is a Nova in RDBMS in the coming future.
many cloud provider also provide this RDBMS.
So, It is good for system development in mORMot.
In your exmple, I have tested well with MSSQL2008R2 Express connections, but it is limited by MS other than paid license fee. not as good as MariaDB(Open& cross platform that means run in Linux).
Thanks.
Last edited by Mark (2017-10-19 08:12:37)
Offline
Thank AB,
I download "libmariadb.dll" and use Zeos, success to connect and retrieve JSON via browser
Also use unidac to connect, it is success!
I have a question, I have existing mariaDB tables which contains 1 or multiple keys fields,
But mORMot model create "ID" automatically, how to suit my existing tables key-fields (I don't want to change my exisitng table structure because many users using these.
Thanks for your help
Mark
Last edited by Mark (2017-11-02 09:19:28)
Offline
As documented, the TSQLRecord.ID field is used everywhere by the ORM to identify the item. The ID may not be computed by the ORM (calling Add with ForceID=true), but the ID should be an Int64.
You may have to use direct SQL statements, if you have existing not integer single primary key.
Or add an ID field, which will be used by the ORM internally.
Offline
Thanks AB,
I also have a confuse about SOA,
SOA as micro service to handle simple function (may be 1 function of logic),
In the real case, there are hundreds of functions within a business system,
that means hundreds of SOA created within a system ?
If yes, it is the pain-point to handle these hundreds of SOAs' admin (eg. start/ end services, ...)
Mark
Offline
No, of course, unless you want to make "server-less cloud" development, which is IMHO an anti-pattern: you run a function.... so you end up with pure procedural code.
MicroService is about single responsibility, not single function.
Just like with the Single Responsibility principle in SOLID.
Offline
Thanks AB
I start to familiar with mORMot, thanks your right direction!
To understand your materials with solid example will be more efficiently
because sometimes not fully understand your good theory & idea explaination (may be my low IQ),
but understand quickly when view related examples and think back again.
Last edited by Mark (2017-11-07 04:59:37)
Offline
Offline