5 ms·
FastComments is a couple hundred thousand lines of JS now (backend and frontend, with a couple small backend java services) I hope to move to TS in 2025 But,
by winrid 2y ago
FastComments is a couple hundred thousand lines of JS now (backend and frontend, with a couple small backend java services)
I hope to move to TS in 2025
But, we still don't use a frontend framework, we just write components as classes. Each component takes a root node that the parent is supposed to "own", and that's kinda it. React is more productive short term, but I find this easier long term with complex UIs, keeping memory usage low, and less work keeping stuff upgraded.
- zdragnar 2y agoI worked at an agency that did this (they were rather religious when it came to the "no frameworks" rule) and I can absolutely say that it is far less productive for complex UIs. It's basically a home-spun version of backbone, and the reason people don't do that so much anymore is the same that backbone fell out of favor- you don't naturally get composable components without lots of manual management and excess paints and reflows. It's certainly possible to build what 75% of websites actually need with this approach, but I wouldn't consider it for a moment for any UI that I actually consider to be complex.
- tinthedev 2y agoIt is far less productive for complex anything, not just UIs. The only way to do home-spun stuff in JS/TS is to narrow the use-cases and components down religiously. The moment you'll require more than 2-3 bits of the website to interconnect... take one long hard look at the future and avoid the headache of writing your own JS boilerplate. I love eschewing JS frameworks as much as the next man, but I also love my free time. Too much to waste it debugging problems coming from hundreds of different user stories and approaches. React's mature enough, as are most of the big libraries commonly leveraged on it.
- winrid 2y agoI don't waste time doing that. Sounds like a skill issue :) React is on like version 18, you guys can keep getting paid to upgrade frontend libraries every year, I'll watch.
- meiraleal 2y ago> React's mature enough, as are most of the big libraries commonly leveraged on it. Mature software doesn't break things every other year.
- in-pursuit 2y agoIt really depends on what you mean by “complex UI.” In you mean a UI that needs to handle real-time user input, then it is extremely difficult to get React to be performant once the complexity reaches a certain scale. As an illustration, try to make a website that has 1000 drag-and-drop elements that you can drag around the page. Getting it to render at 60-120 fps is hard and fragile.
- lukan 2y ago"As an illustration, try to make a website that has 1000 drag-and-drop elements that you can drag around the page. Getting it to render at 60-120 fps is hard and fragile." Glad I always avoided react then, despite all the hype.
- winrid 2y agoReact is nice for a lot of things, but when it's a pain it's really a pain. That's abstraction for you! :)
- winrid 2y agoYeah I wouldn't use backbone either. I use reusable components. It really hasn't been a productivity issue for me... I wrote all of fastcomments (uis, backend), so... :P
- deleted 2y ago[deleted]