Each of us in his work, daily encounters hierarchical data structures.
Organization of file storage, data categorization, etc.
I would like to discuss the possibility of adding standard widgets to display structured data with drag and drop support. And also in connection with the release of the new database manager, the generation of a service table describing the hierarchy structure (Closure Table in my opinion is the most universal).
Questions of this kind periodically arise on the forum:
I would certainly support an effort to display a tree structure - if appropriate to the hierarchical database.
I believe it would save an enormous amount of support time in situations where changes to the databases are going to be reflected in the appearance/utilization the data that is constantly being changed or requiring new additions (for instance where product pricing or promotions are constantly being changed in e-commerce).
It would also greatly enhance the ability of web designers without database-technical training to visualize the data in tree-form and assist in designing the menu structure of a website.
Iâll repeat what was mentioned in the original thread regarding this subject and say that Wappler is not a replacement for Magneto, Wordpress, etc, nor should it be. The functionality you want is simply not viable within Wappler and I say once again it would be a waste of many hours of work to try and replicate such a feature, it is not the job of Wappler to do this, yes it would be âniceâ but feasible it is not. There is no such provision in any web development platform as far as I am aware? Its all too easy to say Wappler should do this, and the reasons why you need it. BUT other tools are available to visualise your database structures. You can then use Wappler to work with the DBâs output and display it in whatever way you want as you require. There is no one solution fits all, some learning will be required on the basics of how RDBS operate, for that there is a multitude of great educational resources on YouTube. Such as Caleb Curryâs excellent series on MySQL:
Nobody can replace this guyâŚnot even Wappler.
Hey @Teodor and @GeorgeâŚdo you guys think I can get a totally undeserved badge like âMeme Masterâ or something similar? I know you guys give them for free just because.
Sorry to derail this topicâŚbut as itâs not going to get anywhere I might as well do something with it
Best serious but not serious forum ever.
I vote for your Meme Master badge, you deserve it, haha
Congrats Jon, lonely there, luckily there are no âLong Winded old fartâ badges, i think a few members could get one. âDog with a boneâ badge i could think of a few recipients, and this is why I donât have the power to make badges, haha
Congratulations @JonL !
Returning to the topic of the post, I share @Dave opinion. This is a specific functionality that you can easily do without, and that can be performed by specialized tools. For planning and design purposes, it is better to use third-party programs. In terms of creating queries and relationships between database tables, the current Wappler approach is already very good.
Wow nice badge you got Jon!
I will have to up my game and proof I am worthy of it!
I may not have put it correctly, it is clear that in the topic that I gave as an example, you need not a tree structure of tables in MySQL, but the display of a hierarchical structure in the web interface. for example using jquery treeview.
So you mean an AC component?
Yes, but not only that. This is just a matter for discussion.
- AC component (jquery treeview)
- on the server side, we define what structure we display in treeview: file structure, database table, JSON (rest api data).
If we want to define a database table as data categorization: - auto create Closure Table to this table / view to describe the hierarchy
https://hsto.org/getpro/habr/post_images/aae/77e/8bd/aae77e8bd18c7a576b9903094edd698a.png
In my opinion this can remove a lot of routine tasks for displaying hierarchical structures
Presenting a real hierarchical data that is fully nested recursively present many challenges.
The database design with self referencing table is easy, but then:
- querying the table with recursive query
- display a recursive data? It canât be done with simple repeater because it is all nested so you need a tree like component
- the the maintaining of the data - you shouldnât have deadlocks in the self references otherwise your queryâs will go forever
- what happens if you delete a branch does all children go with it?
These are just a few of the challenges you will encounter when working with fully recursive hierarchical data.
And the worst is that your users actually donât understand the complex structure and will often make mistakes of maintaining it - kike crating deadloops per mistake.
So saying all this and saving you a lot of trouble it is better to keep hierarchies up to 2-3 levels max and make them usable.