I've been working as an Angular/.Net developer for over five years now, and I'm really feeling the strain from keeping up with constant major version updates — I started with Angular 6 and have kept pace all the way to 17. The upgrades and maintenance are driving me nuts.
I'm looking to build an app to track my files, kind of like a home cloud dashboard. My main goal is to create something that remains maintainable in 10 years. I've seen apps I built 8 years ago become stuck in outdated npm/typescript environments and essentially frozen in time.
I've decided I don't want to rely on node/npm anymore. So, the bottom line is: while I love TypeScript, I'm seriously considering going for vanilla JS for the frontend. What do you all think?
4 Answers
Keep in mind that any framework you choose will eventually become 'stuck in time' too. If you want to go dependency-free, look into using module scripts and import maps. It gives you the freedom to utilize modern practices while keeping things manageable.
Why not build your app so it doesn’t solely depend on JavaScript? You can integrate JavaScript just for the user experience. That way, if any JavaScript breaks (which it likely will at some point), your app will still function, and you can fix it whenever you have the time. With frontend frameworks constantly releasing major updates every few months, it's smarter to hold off until things stabilize. Stick with what you know for the backend and create static pages, adding JS only as needed. Vanilla JS has improved a lot over the last five years, and it’s still a great option.
Is plain JavaScript really what you need? Consider using a modern ASP.Net Core site with Razor pages instead. If you do need JavaScript, keeping it simple with vanilla is a good way to go. Alternatively, you might want to look into frameworks like Hotwire's Stimulus that cater more towards Multi-Page Applications (MPAs).
Vanilla JS paired with JSDoc for type safety sounds like a solid approach! You can even organize your code into a package.json and utilize ESM imports. That’s really all you need to get started without the overhead of a framework. I have a strong opinion against using any frontend framework; if you have a solid grasp of JavaScript, you'll usually enjoy working with just vanilla and find frameworks unnecessary.
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically