miroiu / nodify

Highly performant and modular controls for node-based editors designed for data-binding and MVVM.
https://miroiu.github.io/nodify
MIT License
1.3k stars 208 forks source link

[Question] Is functionality going to be added for saving a node graph? #38

Closed Pat02 closed 11 months ago

Pat02 commented 2 years ago

Saving / Loading node graphs would be hugely beneficial, will there be any support out of the box, or will it be up to a user to implement their own save system?

miroiu commented 2 years ago

Hi, this feature doesn't make sense for Nodify, the controls library, but it would make sense for the consuming app which defines the viewmodels. That means you will have to implement your own saving system which is specific to your models.

Note that this feature may be supported out of the box for the new library in this PR: #36.

Chris-Tophski commented 11 months ago

I totally agree with @miroiu, however I would like to add a thought on this issue: The kind or strategy of graph persistence may vary widely, depending on the use case. We are trying to use it as a simplified UI on a Neo4j database, where there is no good way to preserve the positions of the nodes inside the database (long story). In another case you may want to edit the graph like a document, stored locally, for example. This file format could be anything like XML, JSON or even some binary stream. IMHO it would be better to keep Nodify as a visualization and modification tool, separate from your actual data structure and have your data structure handle how to serialize and deserialize the data.

miroiu commented 11 months ago

Good point. I will close this issue because it's not the responsibility of the UI to save data. Thanks for your input!