#1 mORMot 1 » Trying to understand mORMot’s server units and its concepts » 2021-05-28 07:16:28

nothratal
Replies: 1

Hello together,

I’m new to mORMot and I hoped I can get here some initial input to get started. I must admit that I just started recently learning Pascal (FreePascal in my case) too. mORMot’s documentation is very comprehensive, in a good way of course, so I was able to get into the core concepts. In other languages I used microservice frameworks, they were completely different in their concepts (configuration over convention), but I still try to make some comparisons.
I think the ORM-part is pretty clear for me, how it can be used, that URL's and rest endpoints are generated relative to the convention.

So, the questions I have so far, are:

1. What are the differences between TSQLHttpServer, THttpServer, and THttpApiServer? As I understood the TSQLHttpServer is used in an ORM context. But what about the other two? Technically there isn't a difference between a server used for API's or for web content.

2. Can I use the ORM-part without any database? Like working with a cache because technically nothing has to be persistent anyway? Can I use mORMot without the TSQLModel’s, so just the technical layer?

3. mORMot seems very elegantly handling databases. Coming from other languages & frameworks: How can I set up a simple HTTP server, just returning for example a simple hello world string instead of an automatically generated JSON? I found Units in SynCrtSock (e.g. THttpServer), but I didn’t get it run or found an example.

4. I know that mORMot2 is already in development. As I don’t really write code that has to run in production (or running anywhere besides my own personal laptop tongue ), does it make more sense to start learning immediately v2?

Thanks in advance!

Board footer

Powered by FluxBB