Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Guidance sought on the best approach for developing an MVC node graph app.
-
I am planning to creat an app on the MVC pattern where the model is a DAG (directed a-cyclic graph) with A single root node connected through the graph to a set of leaf nodes. Each node will derive from a node class. The viewer part will show the nodes and their connections as a line an box picture. The boxes will contain text from a text attribut of the underlying node class. The controller will allow nodes to be created, updated and deleted subject to certain Business rules.
I am a newbie to the python world, let along Pythonista. I would welcome any observations that will accelerate my progress is developing the app. For example has anyone done it, is there a library I should use, what graphics controls should I consider?
Thanks in advance.
-
I do not know if this qualifies as guidance, but I have a similar, unfinished project. You can find the code here - download all files and run bsp.py to try it out.
I used Pythonista UI views as nodes, with a custom
draw
method for the lines between nodes. The display code is all in bsp.py. For force-directed layout, I tried networkx and some other libraries, but found them overweight and underperforming, so wrote the algorithm myself based on some Internet sources (force_layout
method in graph.py).Underlying storage here is basically any key-value store. I used an earlier project, ReminderStore, that uses the iOS Reminders as a sort of a distributed database.
-
Thank you
I will give it a try