fle-internal / lex

Phase 2 development to generalize the KA Lite framework
Other
1 stars 3 forks source link

scrap TOPICS, store data as NODE_CACHE #5

Open bcipolli opened 10 years ago

bcipolli commented 10 years ago

NODE_CACHE format should be the standard format for our topic tree. It's a much more simple representation, more amenable to editing and fast searching.

The major issue with NODE_CACHE is that it can't be saved easily--parent, parents, and children all have object references that wind up creating loops.

So, here's how to save/load NODE_CACHE to/from disk. Then, TOPICS just becomes NODE_CACHE['Topic'][""]:

That's it! Then, editing becomes so easy, to add / edit / delete nodes. No tree structure needed for navigation; just add, setting all properties necessary on the node, and you're done!