#1 2021-01-21 07:44:51

L_VV
Member
Registered: 2020-10-29
Posts: 38

mORMot2 examples and documenation. Where should a beginner start?

Good day Arnaud,

Thank you very much for your wonderful project!

Could you tell us about when we can expect examples for mORMot2?

Since many classes have been renamed and redistributed among units, it is difficult for a beginner to understand from old examples and documentation where to start and how to do it.

Specifically, I want to try developing a project consisting of:
- application server with Interface-based services (json) under linux and windows ("REST" part of the mORMot2);
- Firebird database with 100% use of stored procedures, i.e. no ORM (via zeos lib);
- a client application that interacts with the application server (first a desktop application, then there may be other options).

All this on fpc / lazarus (stable or trunk).

What can I start from?

It is planned that the project will be big enough, so I want to start doing it right away on mORMot2, and not on the previous version of the framework.

Last edited by L_VV (2021-01-21 07:53:22)

Offline

#2 2021-01-21 10:38:29

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

Re: mORMot2 examples and documenation. Where should a beginner start?

There is no mORMot 2 documentation yet.
I don't want to make something as huge - and therefore unreadable for some users - as mORMot 1.
The mORMot 2 documentation should be more like a "User Guide".

Currently, the easiest is to look at mORMot 1 documentation, and blog articles like https://tamingthemormot.wordpress.com/2 … databases/
Then the mORMot 1.18 classes have all their mORMot 2 classes defined by default.
So use regular mORMot 1.18 client/server code - just change the unit names.
Then you define USEPUREMORMOT2 and you just change the old names into the new names.

Offline

#3 2021-01-21 10:59:35

L_VV
Member
Registered: 2020-10-29
Posts: 38

Re: mORMot2 examples and documenation. Where should a beginner start?

Thank you for the quick answer, Arnaud!

ab wrote:

I don't want to make something as huge - and therefore unreadable for some users - as mORMot 1.
The mORMot 2 documentation should be more like a "User Guide".

Yes, the documentation for version 1.18 is very voluminous and detailed, it is rather more suitable for developers already working with mORMot to clarify details and best practices.

For beginners, we need something simple to get started quickly. And already in the process it will be possible to improve knowledge and approaches.


ab wrote:

Currently, the easiest is to look at mORMot 1 documentation, and blog articles like https://tamingthemormot.wordpress.com/2 … databases/
Then the mORMot 1.18 classes have all their mORMot 2 classes defined by default.
So use regular mORMot 1.18 client/server code - just change the unit names.
Then you define USEPUREMORMOT2 and you just change the old names into the new names.


It's excellent if for all classes with new names there are corresponding classes with old names, this greatly facilitates learning the framework smile
We can take any old examples, try them, and after the desired result is obtained (well, or in the process), simply change the names of the units in uses. Great!

And somewhere there is information, which classes were moved to which units?

It is also a pity that the mORMot blog is not available right now to view articles in it sad

Offline

#4 2021-01-21 11:03:48

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

Re: mORMot2 examples and documenation. Where should a beginner start?

Just search for PUREMORMOT2 conditional in the source - you will have all the old/new names type redirection.

I will try to make the blog work again - with mORMot instead of DotClear.

Offline

#5 2021-01-21 11:44:19

L_VV
Member
Registered: 2020-10-29
Posts: 38

Re: mORMot2 examples and documenation. Where should a beginner start?

Thank you!

Offline

#6 2021-01-27 11:17:40

radexpol
Member
From: Poland, Krk
Registered: 2019-11-29
Posts: 116

Re: mORMot2 examples and documenation. Where should a beginner start?

AB, please, pleeeease add a lot of sample code to the methods you describing, as you wrote in one of your old posts "the sample is better than million of words", if I see the sample usage it helps me use it in my code.

Offline

#7 2021-01-27 12:44:49

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

Re: mORMot2 examples and documenation. Where should a beginner start?

At first, the regression tests may help you understand the features.

They are more uncoupled now, so it should be easier to follow them..

They cover all parts of the framework.

Offline

Board footer

Powered by FluxBB