#1 2014-02-26 02:02:49

eelias
Member
Registered: 2012-09-06
Posts: 1

Newbie in ORM. Looking for some advice

HI there,

I am about to start a new project that will be very important for my professional life for the next years to come. I have decided to maintain delphi as my primary language for this.

However I have decided to update the way I used to do these things. My last big application, a medium size ERP, was a mess to maintain using RAD approach. Fast to start and bring the first version, a nightmare for the rest of the years.

I see frequently references about the mORMot on SO and have look at it. Not at code yet.

But what led me to take it more seriously is the benchmark testing from Roberto Schneiders where at conclusion he personally choose to stick with mORMot instead others and specially DataSnap.

So, I have now a strong feeling that mORMot is something that can be taken on production smile

However I have some questions and would like to see if can be answered, before a deep documentation reading. Sorry about that. I really want to get away from the client-server approach of database. I want to go OOP classes for representing my data and relationship.

The problem is that I am creating applications that at some point I cannot connect easily because the database tables do not match. (of course this is a case not projected before, but would be nice to connect different project more easily).

1) For now I am planning to use UniGUI to create HTML forms. Unigui is extremely RAD oriented. However, I see there are ways to avoid this approach and change it. This project I need to start is based on a chain of Hamburger stores, like McDonalds. The main backend application is web based. That makes easier to update, and mainly to conciliate data at top management level.

2) However I cannot rely on internet connection for the local store. In this case I have my old faithful POS solution, using DBISAM tables.
  I have some options here:
    1) change the database to something else. I was thinking on ElevateDB because it has automatic sync features. But mainly from my previous experience with DBISAM that is rock solid product. Easy to use, no problems, easy to correct in case of corruption, etc. Any problem with the Windows OS there is not problem with the DB. The customer is extremely sensitive about costs to support the stores. Any Windows SO problem that needs to be re-installed or changed can corrupt the database installation (like Firebird or others) and that is no good at all. On DBISAM and its successor there no such problem, even on the server version, that there is not need to user registry or lots of dll. At end, ElevateDB is simple, easy to maintain, and make data Sync easy.
    2) I could write a program (I made this before with DBISAM) to send and receive change log of the database. There is no much tables, only what is needed for the POS to work.
    3) something else I don't know about mOTmot

3) The backend application will receive all POS updates somehow, and users will interact with it. This is will be a web app using unigui working as ISAPI, on IIS 7. The database server could be anything that works fine. Right now I could be using ElevateDB. Or anything else. I dont know clearly how difficult is to install mORMot on a computer. The thing is that UniGUI also permit to be compiled as a standalone indy http server. For small customers that is great! Installation is just a copy and paste of the folder. For small companies with many money restrictions there is no need of complex IT stuff. Just a pendrive with the folder and they have everything back running.
  1) How is that with mORMot ?
  2) Is there a database I could easily work like this?
  3) I know I can use ElevateDB but this will require a connector and this means dealing with Windows, that is very bad. What other option do I have? I would like to have a installation process that is not more than a copy and paste of a folder (!)

4) I have another need for a project where at peak it eventually can reach 20.000 connections. For that I will use backend as UniGUI web app (few users) but at frontend ExtJS + JavaScript, to work locally in each computer and there is no need of expensive server needs (I see mention of much more connections on a single server using mORMot)

5) I have a RAD mindset and that is getting very uncomfortable. I want to switch to something else (like mORMot) and at begining need to have the smallest possible learning curve. Even if do not take all the benefits or need to have refactoring of the code. This project has a hungry start and a flexible medium to end finale. I wanted to start in something new that could be evolved.

I ask for patience on my reasoning and questions...

Please, Any guidance on this process would be much appreciated.

EDIT:

Quote from SAD "Too much documentation can kill the documentation!".

Wow there is so much documentation amazing. I am feeling overwhelmed.

I am comparing TMS Aurelious with mORMot. I know (with no offending) I am comparing a bike with a Ferrari. However the way it is explained for those who are newbies in Aurelious make it simplier and more appealing. But I dont want do be deceived. smile

Please, where can I get a direct to the point simple example and documentation for something like items/customer/invoice very small testing program, for someone that always made it RAD way and want to change in a progressive manner. Without the need to all those fantastic and even warp drive ways to cross the galaxy. Just plain simple item, customer, invoice.

Eduardo

Last edited by eelias (2014-02-26 12:39:53)

Offline

#2 2014-02-26 15:39:47

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

Re: Newbie in ORM. Looking for some advice

Getting away from RAD, and focus and good OOP design is a good path to maintainability.

TMS Aurelius has some nice features which are not in mORMot, like lazy loading or direct handling of lists, via generics.
The main difference is mapping from an existing database - Aurelius has a modeler (separated AFAIK). mORMot did go in another way, i.e. write the SQL by hand on the server then expose it via SOA service: an existing database comes with an existing set of SQL statements smile and you can add some new tables via the ORM feature of mORMot.
But other features (like remoting via JSON) are more like toy features, when compared with a full RESTful solution like mORMot. In respect, DataSnap or RO DataAbstract are much more advanced - but not REST.
About performance, there is a huge difference - see what Roberto wrote here: http://synopse.info/forum/viewtopic.php?pid=6363#p6363

20.000 connections is not a problem for mORMot's http.sys based server.
See http://blog.synopse.info/post/2013/09/1 … -of-mORMot
smile

About the SAD:
- Ensure you got the latest unstable 1.18 revision;
- Please read the FAQ (page 58) - some questions your are asking here are covered there;
- Use the keyword index at the beginning of the document.

For the disconnected feature, this is not handled directly by mORMot.
But you can embed a SQLite3 local database on the client, which will be the entry point of your UI.
Then a version-based system may synchronize the content on the main server, to another Sqlite3 database or any other mean (e.g. Oracle or MS SQL, depending on your customer expectations).

Did you take a look at the supplied samples?
There is the "Main Demo" sample, which is detailed in the SAD pdf - see "25. SynFile application" page 1277 and later.

Offline

#3 2014-06-10 19:40:56

Junior/RO
Member
Registered: 2011-05-13
Posts: 210

Re: Newbie in ORM. Looking for some advice

Eduardo,  you wrote "1) For now I am planning to use UniGUI to create HTML forms. Unigui is extremely RAD oriented. However, I see there are ways to avoid this approach and change it. "

How do you plan to change the RAD approach of UniGUI?

Offline

Board footer

Powered by FluxBB