#1 2013-02-18 18:39:00

warleyalex
Member
From: Sete Lagoas-MG, Brasil
Registered: 2013-01-20
Posts: 250

Suggestions for improvement

I wish to share my first experience with the mORMot, was not good but may be constructive.

I have registered to synopse mormot community and played a little with project No. 04 and 14, during my first day I found the very cool approach of mORMot, all my exclamations was WoW!, cool! etc... I think that the mORMot come out with very good ideas but simply still a beta product, lack a working examples, lack a real documentation to guide users and also may be useful. I'm struggling over and over with some very basic concepts. All days after I starting to become every day a bit more frustrate I cannot do simple things I do not understand how.

I read the docs and spent hours, looking inside code examples, I've felt a bit angry. This framework totally rocks and you guys ("AB") are doing a great job. I know this is a tough thing to get right. There are examples and documentation, but none seem to fit what I'm looking for, which is a complete example that explains how and why. You need a fair amount of knowledge to do anything serious with it.

Please improve your examples. Don't only say we can do it like this, put examples that runs in seconds.

A collection of simples and quick projects. e.g. Example of Master Detail Project using Firebird, MySQL, Associations, examples of mORMot with ExtJS, jquery... examples to showcase the framework’s capabilities and provide realistic sample code to draw from.

Cheers

Offline

#2 2013-02-18 19:30:54

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

Re: Suggestions for improvement

Most code using mORMot is closed source, from our side... for the reasons it contains dedicated business rules.

The main Demo is there, and explained in the doc, but it does not show all the features of the framework: just the status of the framework 2 years ago, to be honest.
External databases, security and interface based services are not included, for instance.

I'm adding samples day after day.
Thanks for putting the pressure to add more and more!
Firebird support is supplied with Zeos and Unidac, but I would like to finish the "native" SynDBFirebird class first.

But a true DDD project would indeed benefit to all.
With full SOA, persistence ignorance, business layer with ubiquitous language, entities and value objects.
Perhaps also CQRS and.. I would like to finish Event sourcing feature before writing a new big Demo.
The resulting code will be probably much more readable than other DDD demos around - see e.g. the huge and over complicated http://microsoftnlayerapp.codeplex.com
I was thinking about making a simple free PMS - Property Management System (for hotels Front & Back offices).

About AJAX, Smart direct integration is almost there.
We expect the 1.1 official release to appear soon. Very nice external contribution has been made here. See http://synopse.info/forum/viewtopic.php?id=1066

Thanks for the feedback.
Sorry you feel angry after all this time in the framework.

Offline

#3 2013-02-18 19:58:28

Leander007
Member
From: Slovenia
Registered: 2011-04-29
Posts: 113

Re: Suggestions for improvement

I can share your thoughts about frustration that some code is hard to understand and that it lacks "full blown tutorial examples", but you must understand that this is 99.99% work of single person (Arnaud and he missed to point this out smile) and that majority is done in his spare time.
If you take into consideration that this framework is evolving very fast (sometime I get feeling that to fast smile), it is hard to cope with all subtasks at once (examples, unit tests, documentation).
Community (we all in this forum) which test mORMot on daily bases (e.g. they use it in "production code"), could help with this.


P.S.: I have done real world application with mORMot successfully, but it is based on out of date version (more then year) of the library and I must "teach myself again" to return on current track (I was out for a while) smile.

mORMot is very much alive and kicking beast smile.


"Uncertainty in science: There no doubt exist natural laws, but once this fine reason of ours was corrupted, it corrupted everything.", Blaise Pascal

Offline

#4 2014-07-26 18:24:14

mariomoretti
Member
From: italy
Registered: 2012-01-29
Posts: 88

Re: Suggestions for improvement

I'm unlike to agreed with WarleyAlex : what a neewby of the frameword needs are elementary samples ,not sources of complex projects.
The master detail explanation in SAD is NOT a master detail sample : how can you say that a one to many relationship is one like this ?
(from SAD) :

TSQLMyFile = class(TSQLRecord) 
private 
    FSecondOne: TSQLMyFileInfo; 
    FFirstOne: TSQLMyFileInfo; 
    FMyFileName: RawUTF8; 
published 
         property MyFileName: RawUTF8 read FMyFileName write FMyFileName; 
         property FirstOne: TSQLMyFileInfo read FFirstOne write FFirstOne; 
         property SecondOne: TSQLMyFileInfo read FSecondOne write FSecondOne; 
end; 

this is a ONE TO TWO relationship : I have perhaps to write also ONE TO THREE ... ONE TO MILLION  classes to satisfy real world cases ?
Your framework has much documentation , but after month of reading and reading it i'm yet not able to do nothing more that not useful project, like your maindemo sample.

Regards

Offline

#5 2014-07-26 18:32:11

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

Re: Suggestions for improvement

AFAIK this is either

- a ONE to ONE relationship, from TSQLMyFile point of view
- a ONE to MANY relationship, from TSQLMyFileInfo point of view, if several TSQLMyFile rows point to TSQLMyFileInfo

Just like with a regular DBMS.

Offline

#6 2014-07-26 22:18:03

mariomoretti
Member
From: italy
Registered: 2012-01-29
Posts: 88

Re: Suggestions for improvement

AB,

I'd like to know how maintain a master-detail relationship whit your framework like customer-orders. How can I obtain this ?
Thanks.

Offline

#7 2014-07-27 04:38:53

mariomoretti
Member
From: italy
Registered: 2012-01-29
Posts: 88

Re: Suggestions for improvement

I have to be more explicit...
The relation among customer and orders is clear : in the order there is a tSQLCustomer...
But what about order and items ?
I think that adding a tSQLOrder in tSQLItem is not a good idea. It is an order property.
Does the framework automatically support this without the need of create a new class TSQLOrdereItems , but simply adding a TSQLItem to TSQLOrder declared as having multiply cadinality ?
Thank you very much

Offline

#8 2014-07-27 05:06:00

tech
Member
Registered: 2014-01-13
Posts: 107

Re: Suggestions for improvement

No, you must declareTSQLOrdereItems explecitly inheriting from tSQLRecordmany then maintain the has many relationship manually with some dedicated functions.

Offline

#9 2014-07-27 11:14:31

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

Re: Suggestions for improvement

There is a dedicated chapter about many to many relationship in the SAD 1.18 PDF.

Offline

#10 2014-07-27 13:55:30

mariomoretti
Member
From: italy
Registered: 2012-01-29
Posts: 88

Re: Suggestions for improvement

Well,
i've read the SAD.
I'll try to do something using tsqlrecordmany or dynarray as you suggest. The fact is that there are so many feature documented or not that i am a bit confused. This is why i think , and perhaps not only i , that more complete samples could help a lot.
If i'll bring to any result , i'll post here.
Thanks

Offline

#11 2014-07-27 14:16:04

tech
Member
Registered: 2014-01-13
Posts: 107

Re: Suggestions for improvement

You can see this thread for a sample http://synopse.info/forum/viewtopic.php?id=164

Offline

#12 2014-07-28 17:06:30

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

Re: Suggestions for improvement

I've updated the sample to latest 1.18 version of the framework, and included it in the "Third Party" samples folder of the source code repository.
It may help.

But it is still not so easy to understand.
UI and logic is pretty much mixed in this code.

Offline

#13 2014-07-29 08:27:07

mariomoretti
Member
From: italy
Registered: 2012-01-29
Posts: 88

Re: Suggestions for improvement

tech an ab thanks a lot.

Offline

Board footer

Powered by FluxBB