#1 2012-07-03 07:07:45

Marmot76it
Member
Registered: 2012-07-03
Posts: 4

Getting started and paradigm shift

Hi,
it's my first post here and I'm playing a bit with mORMmot since a couple of days, so forgive me, because my questions are the questions of a first-time evaluating user.
I'm quite experienced in Delphi programming, and in the next months I will go trough a big project update wich involves writing some sord of DB server that will be used mostly locally to serve a number of clients applications accessing to the same DB and remote services.
I've not read the whole documentation (it will take a while to do so), but judginf from what I've read I think that mORMot can be the way to go.
Now, facing the real (i.e. far from ideal) world problem.
Like everytime I'm called to build something very quickly. Not the project I was talking about, but a client application (I should describe it as a device control system) that of course has it's DB.
I was able to get a local SQLite DB running quite quickly by using a TSQLRecord derived class and by lloking at the examples. But now I'm thinking about the UI side of the application.
I really can't rely on automated UI generation, because it's a device control system and it has nothing to do with the typical DB application, I must be able to create the controls with a high level of customizability. And here I'm lost! smile
I mean: I'm used the classic "drop a bounch of DB controls on your form, connect them, customize them, and you're done". So my question is, if I would like, for example, to display a list of records, am I supposed to read them manually by iterating over my TSQLRecord derived classes and to manually fill (always an example, of course) a TStringGrid of some sort?
Is there any quicker way to do it? Or, better question, what's the best practice to do it while staying true to the mORMot way of doing things?
Thanks a lot and best regards.

P.S. I've got a suggestion: the SAD document (what a terrible name! smile "SADness" is what I felt when I discovered it was 800 pages long! Ahahaha!) lacks a full PDF index, I mean: the navigation is really difficult, a real index (that can be kept opened on the side of the document) would be really useful.

Offline

#2 2012-07-03 07:59:44

lele9
Member
Registered: 2011-10-28
Posts: 170

Re: Getting started and paradigm shift

hi marmot76it,
about mormot i think there is  a good choice but you can discover using it.
about auto generated UI, i don't use it. it's an option, not an obligation.
about the grid you can search in the SADness smile documentation about FillStringGrid (sqlite3ui.pas) if you use TStringGrid or SQLTableToGrid if you use a TDrawGrid.
about other component, if you are ancored to DBControl you can use the new .pas to generate TDataset from mormot TSQLTable or you can fill the record by hand if you don't use DBControl ( i use this way).
Some post ago i read in the forum that someone use livebinding to bind TSQLRecord to VCL controls. i haven't time to try but i think its the best solution if you use a recent delphi version.
i hope this can help you.
Emanuele.

Offline

#3 2012-07-03 13:18:05

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

Re: Getting started and paradigm shift

If you do not RTFM, then you won't blame us!
smile
The SAD pdf is huge, but you may at least read the first pages, i.e. general introduction to mORMot concepts.
If you take 30 minutes to read the first part, i.e. up to "1.4.7. Source code implementation", most of your questions will be solved.
For instance, queries are detailed at the beginning of the document.

About the missing index in the PDF file, I know, this is due to the fact that SynProject does not create standard word titles.
To be fixed later on.

Thanks for the feedback.

Offline

#4 2012-07-03 14:50:08

Marmot76it
Member
Registered: 2012-07-03
Posts: 4

Re: Getting started and paradigm shift

Well, of course I'm not blaming anyone, I hope that my main question doesn't mean that I'm blaming anyone for anything, because I really feel grateful for having the oportunity to test such a powerful tool and posibly using it. Not jocking here, maybe this framework will save me tons of coding, so I really appreciate it.
Of course my point was a more generic one. I mean: I work on code since more or less 15 years, so I went trough a considerable amount of APIs and toolkits. In my experience there's a swet spot in considering a toolkit adoption that stands on "what I'm able to do with it, with no or little knowledge, in a day or so"...
Well, at least this is the time that I usually got to figure out if a framework is a viable route or not.
I know it's not much, but it's the way things goes in most company I've worked for. So, from that point of view, reading up to 1.4.7 of the SAD document means 200 pages, and without the titles it's not that easy figuring out where one should go.
Don't think I'm lazy, of course I will go trough a deep read of the documentation, once that the toolkit is recognized as a viable way.
But, if I can, without sounding bad, I would suggest that: the documentation is quite clear and immediate for the DB part, the shift from tables to objects and so on.
Maybe, having some similar "quick" introduction concerning the UI side of the whole thing, would help in getting started.
Having that said, contratulations for the huge work!

Offline

#5 2012-07-03 15:41:46

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

Re: Getting started and paradigm shift

Your point of view does perfectly make sense!

Hope you'll find mORMot useful, and be sure that any feedback is welcome.
A lot of mORMot features comes from requests on end users, just like you.
Some have found the framework to be able to fit their need, even if only a part of it was needed.
You are not bound to embrace all features of the framework! You can just use ORM, and/or Services, and/or JSON/RESTful Client-Server, and/or logging, and/or whatever...
wink

Take a look at the "Main Demo" part of the SAD.
You'll find out, in a few pages, some existing demo of the framework.
May be a good start.

Offline

Board footer

Powered by FluxBB