Hi, This one for the suggestion box. And I know I am a student making a suggestion to far more knowledgeable persons than myself, but I hope this gets a rational reception. And I realise that future tutorials may cover the ground I am writing about here. But if not, here goes.
After finishing the calculator in Marks tutorial, I looked at the code and thought it overly complicated to read. (Note: I have changed the names of the components and properties to suit my eye, but I am sure you can look past that)
Suggestion 1 : “Page Data” is going to be used 90% of the time in “GetProperty”. You could have a new Code Block “GetPropertyOnly” (or some such) that assumes the “Page Data” part, only for use with properties in Page Data.
Suggestion 2: An input box (or any other component) when named, automatically creates a default property of the same name in the input box’s “Value Logic”, which of course can be overwritten if need be. That way the name of the Input box can be used in code blocks.
If these 2 suggestions have any merit, they will represent a shift, but they will make the code blocks smaller and far more readable and understandable.
We appreciate your initiative.
But I should explain some moments. Codeless based on JS, that means - Page Data is just a kind of object. So block “get property” gives you a possibility to work with ALL objects, not only Page Data / App Data but with server responses, created objects, and so on. In this case, Is think creating a separate block only for page data is a multiplication of entities.
In simple cases, you can just bind a Page Data property from the Handlers page.
What about Inputs, I don’t clearly understand you, but you can get data of any component everywhere you need.
Finally. You can simplify a piece of code from your screenshot, using variables.
If you have more questions, please let me know.
Great reply and I do appreciate that there will be more complicated stuff coming up. btw, Backendless and UI builder is the best codeless environment that I have tried the learn so far, so my comments are meant as constructive.
I have been thru the variables tutorial (which worked perfectly) since the last post and created the logic that ‘simplified’ the look of the code considerably.
My idea would ‘simplify’ the look even more and could avoid having to create variables just to simplify the look.
My idea would only apply when the object being referred to is Page Data. For any other object, “Get Property” would still be needed. Further , the one new jigsaw that I am suggesting, I called it “GetPropertyOnly” but in fact it could be nameless (like the text jigsaw or like the variable jigsaw )
And I appreciated you concern about multiplication of entities.
What I meant with the 2nd suggestion is…
I named the the 2nd box (an select box) in the calculator tutorial selOper, just to make things more obvious for me. This is not necessary of course, but if a box does get deliberately named then a property could be automatically created in content logic named the same (in my case, selOper). Then, combined with the first suggestion the jigsaws would look like …
Without my naming convention it would look even better.
The rest of your answer shows I still have a lot to learn.