Hacker News new | past | comments | ask | show | jobs | submit login

Stop the madness. Its stupendously simple.

As the user, not you the author of some code, make changes to the UI it will be via events. In the respective event handlers just update a big state object with the identity of the node and how it is changed. When the page loads simply read from that state object to recreate the respective node exactly how they were when the user modified them. That's it. Nothing more.

Its how I wrote a full OS gui for the browser. It does far more than SPA framework, does it substantially faster, and requires only a tiny fraction of the code.

Yes, yes, here come all the excuses, like: I can't code or it wont work in a team, because other people cant code. Stop with the foolishness. Provide some governance, preferably fully automated, around event handling and you have complete obsoleted your giant nightmare framework.

I describe it here: https://github.com/prettydiff/wisdom/blob/master/state_manag...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: