#1 2014-08-13 09:01:21

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

mormot and LiveBindings

Hi,
anyone have experience how to use livebindings with mormot?
im writing new small application and im curious to experiment livebindings.
Where to start?
bind an object is quite clear but i dont understand hot bind a TSQLTableJson or an array of record etc...
Any example?
Thanks in advance.

Offline

#2 2014-08-13 18:48:17

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

Re: mormot and LiveBindings

I, for one, do not use live bindings.
So I would not be of great help here...
sad

But take a look at mORMotVCL.pas to find out how to create a TSynSQLTableDataSet which will map a TSQLTableJSON for instance.
And generally sample "17 - TClientDataset use".
smile

Offline

#3 2014-08-14 07:24:25

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

Re: mormot and LiveBindings

hi ab,
when i meet mormot i forgot tclientdataset smile so i wont return to the past smile
now i use a procedure to "bind" objetc and vcl similar at your mormotUIEdit but im curious about livebindings potential (?!).

Offline

#4 2014-08-14 07:46:39

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

Re: mormot and LiveBindings

Our TSynSQLTableDataSet is not based on TCLientDataSet, it is a brand new TDataSet inherited class, which get the data directly from the JSON.
Performance is around 7 times faster (in Delphi 7), and memory consumption much lower.
But sounds like if you can't bind our TSynSQLTableDataSet in the IDE, since it is a runtime component, not a design time component...

But I'm not a LiveBindings expert.

Offline

#5 2014-08-15 14:23:02

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: mormot and LiveBindings

I immediately decided I wouldn't use it when I saw the first demo of Live Bindings years ago when it first introduced - it uses a way too complex solution for the problem. And I heard performance issue with it.

Last edited by edwinsn (2014-08-15 14:23:20)


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#6 2014-08-15 14:56:28

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

Re: mormot and LiveBindings

thanks for your experience edwinsn!

what do you think about this way?
http://members.adug.org.au/2012/03/16/u … o-objects/

Offline

#7 2014-08-15 17:21:25

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: mormot and LiveBindings

@lele9, just to clarify, it's not my experience but my own judgment based on what I have read and seen.

That's the code I'm talking about - overly complex. Just my two cents.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#8 2014-08-18 13:26:50

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

Re: mormot and LiveBindings

ok, so a question...
if i would like to create my own user interface, how bind the object with component?
now i use a procedure to "bind" objetc and vcl similar at mormotUIEdit with "load" and "save" method but i think there are best method to do...?
anyone have other solution?
Model GUI Mediator pattern is a good solution? it can be implemented at framework level or mormot offer other way to do?
thanks

Offline

#9 2014-08-20 07:50:04

AntonE
Member
Registered: 2012-02-03
Posts: 74

Re: mormot and LiveBindings

LiveBindings is not very cool IMHO.
Which is why I started this, not perfect either: (Which has moved along a bit since)
http://synopse.info/forum/viewtopic.php … 635#p11635

But have a look at samples here:
http://synopse.info/forum/viewtopic.php?id=1144
To get LiveBinding sample

Last edited by AntonE (2014-08-20 07:51:29)

Offline

#10 2014-08-20 08:30:16

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

Re: mormot and LiveBindings

We have a "UI automatic mapping (via "Mediator" or "MVVM" patterns)" feature request already.
See http://synopse.info/fossil/tktview?name=73c1da3c40

AntonE - if you can (and wish to), you may consider sending us a full sample program, ready to be incuded in the https://github.com/synopse/mORMot/tree/ … PartyDemos dedicated folder.
There is already your CSV2ORM sample in there!

You can join us via webcontact01 at synopse dot info - and send a .zip.
Thanks you all for your submissions!

Offline

Board footer

Powered by FluxBB