Hacker News new | ask | show | jobs
by headcanon 3499 days ago
It depends on what you're doing, and what you're comfortable working with. If you have page content that is largely rendered server-side, with bits of interactivity and some basic AJAX on the frontend, jQuery's your friend. If you want to build a single-page application that rests mostly or entirely on the frontend, thats what the newer frameworks and methodologies are designed to do, and you're better off going with one of them.
2 comments

Also, for maintainability - if you're freelancing and plan on handing this off to someone unknown later, I would err on the side of being conservative, and if it turns out that an SPA is what you want to do, then go with a really widely-used framework like React or Angular.
OP here: I'm a back-end dev working on an internal company site. I have used jQuery for the past years for things like simple AJAX and manipulationg dropdowns. Recently I had to build an AJAX heavy part of the page, and got a bit lost in callbacks and DOM manipulations (1500+ lines already). There is no real reason to re-code everything, now it's working, but after seeing all the new shiny frameworks, I started to question my ability to maintain the code of this specific page ("Wouldn't this framework be better and easier to read/debug/extend?"). Still, don't know if one javascript-heavy page is enough to bring a new framework in the project and start over again.

    > I had to build an AJAX heavy part of the page, and got a bit lost in callbacks and DOM manipulations
Have you missed all the posts on intercooler.js - http://intercoolerjs.org/