The problem is we use the same platform, the web, for real-time applications, games, CRUD, static blogs, and so on. It’s a flexible platform and many tools have niches in these different scopes & some _are_ quite large. But a lot of folks misdiagnose the scope & size of their projects choosing the wrong tool. Some of this is fueled by wanting to build résumés or try new hotness or just overcorrecting an ancient jQuery spaghetti that should have been a web app. Suggesting jQ+PHP is the only thing you need is naïve: both in that there isn’t a silver-bullet software architecture for all projects and that often times even jQ+PHP is overkill when a static generator could suffice.
I don't really get why someone would use JQuery, still. My experience with fixing old codebases is JQuery is difficult to write in a way that prevents bugs when moving html elements. That seems like a complete nonstarter. Selectors are extremely brittle. You're either selecting by ID or you're traversing up and down the DOM and hoping that never changes.
I'm aware this is how people did it for a long time, but we surely have better "simple" tools now. Maybe Svelte, Hyperscript, etc
Comments
The problem is we use the same platform, the web, for real-time applications, games, CRUD, static blogs, and so on. It’s a flexible platform and many tools have niches in these different scopes & some _are_ quite large. But a lot of folks misdiagnose the scope & size of their projects choosing the wrong tool. Some of this is fueled by wanting to build résumés or try new hotness or just overcorrecting an ancient jQuery spaghetti that should have been a web app. Suggesting jQ+PHP is the only thing you need is naïve: both in that there isn’t a silver-bullet software architecture for all projects and that often times even jQ+PHP is overkill when a static generator could suffice.
I don't really get why someone would use JQuery, still. My experience with fixing old codebases is JQuery is difficult to write in a way that prevents bugs when moving html elements. That seems like a complete nonstarter. Selectors are extremely brittle. You're either selecting by ID or you're traversing up and down the DOM and hoping that never changes.
I'm aware this is how people did it for a long time, but we surely have better "simple" tools now. Maybe Svelte, Hyperscript, etc
You can get a lot of value doing const $ = document.querySelector, $$ = document.querySelectorAll;