3 ms·
I’ve been writing single-page apps for about 4 years now, and somewhat agree with your sentiment. Lately I’ve been experimenting with Jekyll and Vue. The appro
by pier25 8y ago
I’ve been writing single-page apps for about 4 years now, and somewhat agree with your sentiment.
Lately I’ve been experimenting with Jekyll and Vue. The approach is not perfect but it’s a lot closer to the simplicity of the old-school approach you are preaching.
- apolymath 8y agoVue is very close to a straight-forward approach. I would argue that Mustache.js would be a more straight-forward approach than Vue since it is simply a string parsing library for binding JSON objects to templates. No event binding, no black box, just simple template rendering and then you can do whatever you want with the rendered string.
- pier25 8y agoYeah, but a simple templating system is tedious when you need interactivity or certain types of DOM manipulation based on data. For example, right now I'm working on a form with dropdowns that filter the next dropdown and with Vue I can do that with very concise code which is simple and easy to reason about. With Mustache or jQuery it would be tedious. I'd need functions for every little change of the DOM and multiple event listeners and its handlers. Data-binding is great for this kind of data driven stuff. Not so great for other use cases. Last week I was working on a drag and drop solution with React and it was a pain to figure out how to do it.