3 ms·
Can you explain that a bit more? I've been building various web UIs for quite a few years, and the jQuery parts are generally just simple calls whenever the DO
by white-flame 9y ago
Can you explain that a bit more? I've been building various web UIs for quite a few years, and the jQuery parts are generally just simple calls whenever the DOM needs to be updated, or when an action needs to recollect some UI state to carry out actions. Most state is held in the JS data structures, and the UI simply reflects it through pretty basic transformations.
I don't quite understand the model of writing that would lead to massively tangled jQuery code. Obviously, I'm building internal use and personal projects, but I also design my UI elements based on what HTML/CSS already offers, instead of trying to force foreign designs & models on it.
Of course, JS & front-end development isn't my primary domain. Backend distributed non-web servers, data analysis, and software automation is more my thing. Front ends are just a side requirement of completing the loop sometimes, but software manageability issues at scale aren't unfamiliar to me. I just don't see how people can tangle themselves up as much as they have across the board in the web front end domains.
- mythrwy 9y agoLOL. I remember saying almost exactly the same things and not long ago! It's not necessarily a matter of "tangled up" (although that happens also with size if one isn't careful). It's more a matter of very unwieldy to work with and a lot of cognitive overhead. The few "updating DOM" things turn into hundreds, the callbacks multiply, "what function was it that did this? What file was that in?", the bindings start tripping over each other, it quickly turns into another level of problem at size and when it gets to the point it does it's big enough to be real work to refactor. At the scale you are talking about sure, raw HTML, a handful of global functions doing this and that and a few arrays and objects holding data, no problem. If you have (or work with) something of a different scale using jQuery I'm pretty sure you'll see for yourself and come to the realization I have. There's a reason for the rise of these frameworks and it isn't all fancy hipster nonsense. Well not all of it anyway :)