I got stuck on the ToDo App Tutorial so I had to look elsewhere for answers. Things started to make sense when I found the Calculator Tutorial. I think I understand now, but it is confusing. Let me explain. This maybe helpful for others new to Backendless.
The phrase Binding is not just for binding a control to a Data Table, as it is so elegantly done with the Data Table control. No. It seems EVERY control must include Binding to be referenced. And this is the confusing part. Traditionally objects and controls are referenced by their default or defined ID name and an associated property. But here, in the Codeless UI Builder, UI Controls are referenced by their Label, as is clearly demonstrated in the Calculator Tutorial. Of course, correct me if I’m wrong.
I can accept that all Controls need to be bound (associated with a variable) before they can be referenced, by why the Label Name is used instead of the ID name, escapes me.
Also, IF IT IS TRUE that every Control must be bound (associated with a variable) before it can be referenced, why do we have to always type the Label Name into the Value Logic field in the Handlers section of the Logic screen? Maybe this assignment should be automatic. Or at least, the Value Logic field should include a drop down with available references.
Are there any situations where a name being entered into the Value Logic field is NOT a Label Name, but in fact a definition of a new variable? If so maybe it needs to be defined intentionally as such, instead of being defined off handily here.
Maybe I missed it. Maybe there is some documentation on this. If an object oriented programmer like myself is confused by this, I can only guess that other Backendless newbies are as well. Hopefully you can help all of us all with this ever so critical concept.
I am struggling a bit with the understanding of your understanding
Maybe it is the terminology used in the post.
Take for instance the following statement:
That is not quite accurate. A binding is a linkage between a property of a control and a value that sits in the data model. That data model can be Page Data, App Data, or a specific object.
Here’s another one:
A couple of points here:
Every control must not be bound. As I mentioned above, you bind a property of a control rather than the control itself.
When you say "type the Label Name into the Value Logic". What do you mean by Label Name ? Could you attach a screenshot of what you’re referring to?
Btw, have you watched this video? It is specifically about data-binding:
My Confusion: Somehow I was under impression that the names being entered into the Binding fields, needed to be the property of a previously defined control. I did not realize that the the text being entered into the Binding field was a NEW DEFINITION.
I Now Understand: The names entered into the Binding fields are either NEW DEFINITIONS or subsequent names previously defined in another Binding field. And that Bindings act like a tunnel between two objects, forcing the value in both, to always and instantly stay in sync. (match)
Thanks Mark! For another quick Solution!
Question: A complex page may have a dozen different bindings. Where are all active Bindings listed?
I am glad it clarified it for you. Data Binding is a simple, but very powerful concept. Once you understand how it works, you can truly start taking advantage of many things our approach for UI development has to offer.
When you click the LOGIC tab, you will see a list of all controls on your page. For any controls that have binding configured or logic, it will show them in the list: