Thank you for sharing an example Mohit.
Yes, I do remember that data-binding a table with a Visual Designer/GUI was
possible in Microsoft technologies too.
However, they do not do the same thing Glimmer does. They data-bind Table
(View widget) to a data source (not to a simple Model layer
bidirectionally) and in the video you shared, the Text Field (View widget)
that was editing the Table (View widget) was data-bound directly to the
Table (violating MVC/MVP), not to a Model in the Model layer as an
intermediate that would indirectly relay changes to the Table with the
Observer Pattern.
I am not saying that the data binding capabilities of Apple and Microsoft
technologies aren't impressive. But, they either do not provide the best
separation of concerns or they do not fully support bidirectional
data-binding for the Table widget, which software engineers could get in
Glimmer out of the box. Furthermore, those technologies often required the
developer to supply an extra Controller or even Listener/Observer code
manually in the Model layer. Glimmer, thanks to Ruby, will automatically
observe your simple Models (e.g. with basic Ruby attributes) so that you do
NOT have to implement the Observer Pattern yourself, custom binding
objects, or an extra Controller.
Of course, if truly needed, Glimmer could be augmented further in the
future through custom widgets to support all the different features Visual
Designers provide in Apple and Microsoft technologies.
In any case, again, if I am somehow wrong, and there is a simple example
out there of fully bidirectional table data-binding that does not require
writing extra code at the Model or View layers, then please share it with
us here, and I'll be happy to stand corrected.
Thank you Mohit for your appreciation of Glimmer. I still look forward to
your blog post about it. I think you should not write a long blog post at
first. A small first GUI example should be more than good enough to get the
ball rolling on a blog article series on Glimmer if you're up for it.
Best,
···
On Fri, Sep 2, 2022 at 1:16 AM Mohit Sindhwani <mo_mail@onghu.com> wrote:
Hi Andy.
On 2022-9-2 2:32 am, Andy Maleh wrote:
Well, I just updated the blog post to explicitly indicate "**
*bidirectional*** data-binding of a table with a single line of code
**(without using a visual designer/GUI)**". I have seen languages/libraries
before that enable developers to populate an initially READ-ONLY table
(unidirectionally) with data using only an option in code or using a Visual
Designer GUI (zero code). I am not a fan of no-code approaches as it is
slower to use the mouse and edit the configuration through a GUI for a
highly experienced software engineer than to change a single line of code.
Still, I have not encountered any languages/libraries out there, including
all the ones you mentioned, that do true BIDIRECTIONAL data-binding with a
single line of code (or even zero code), truly decoupling the table from
the models (following MVP or MVVM pattern) while also ensuring automatic
updates the table when the model collection or model properties are
directly modified at the Model layer alone without touching the table, and
also enabling users to update table cells directly in the GUI and have that
automatically persisted to the models, all happening through that single
line of bidirectional data-binding code (like in Glimmer).
It is using a visual designer but I seem to remember that C++ Builder (and
naturally Delphi) has the ability to visually attach to a data source using
the components (and also to web API responses) and show the results in a
grid or a table. If I remember correctly (it has been a while), it also
allowed setting something that would let you edit the records. That was one
of the early demos of Delphi/ C++ Builder and used to ship with the IDE. Of
course, you could attach listeners, etc. to handle the data differently if
you wanted. It's called Live Bindings and this video might cover it -
https://www.youtube.com/watch?v=NajaQIaXfd8 (I think this one I found in
a quick search doesn't cover 2-way updates but I seem to remember that
there is way).
Irrespective, I love what you're doing with Glimmer
and what it does
for the community of Ruby programmers.
Best regards,
Mohit.
Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
--
Andy Maleh
LinkedIn: Andy Maleh | LinkedIn
<https://www.linkedin.com/in/andymaleh>
Blog: http://andymaleh.blogspot.com
GitHub: AndyObtiva (Andy Maleh) · GitHub
Twitter: @AndyObtiva <https://twitter.com/AndyObtiva>