this post was submitted on 22 Jan 2025
9 points (100.0% liked)

Frontend Web Development

297 readers
1 users here now

Community to discuss stuff all things related to frontend web development. (sharing resources, discussion etc.)

founded 4 years ago
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 2 weeks ago* (last edited 2 weeks ago)

JavaScript is adequate for doing everything, but should be used sparingly.

I feel like if your web page is mostly dependent on the speed of your chosen framework, it’s probably not doing anything complicated enough to warrant a framework in the first place. In that case, JavaScript becomes unnecessary fluff.

My email service is mainly bottlenecked by the speed of my Postgres queries, so optimizing them is much more important and impactful. Good database and query design is a must.

Just look at Gmail. Their frontend is slow as hell, but their backend is lightning fast, and nobody really complains. Once you’re past that first couple seconds of a loading bar, you care a lot more about how quickly the next interaction takes, and the next, and the next. I believe page load times for a dynamic page don’t matter as much as the industry thinks they do.

That being said, there’s obviously an upper limit. Five seconds to even get the HTML would be really pushing it.

I’ve written tons of simple pages that just use plain old JS too. It’s surprisingly easy to not use a framework these days. Here’s one of my favorites, that lets you perform WebDAV functions all with plain JS:

https://github.com/sciactive/nephele/blob/master/packages/plugin-index/src/IndexPage.svelte

(It’s rendered on the server side with Svelte into plain HTML, and all the JS in the <script> tag at the top there is plain JS that runs in the browser.)