Web dev is still fun if you want it to be
124 points| jacques_chester | 9 months ago |github.com
I wrote up my thoughts. Maybe they'll resonate with you. Maybe they'll infuriate you. As long as they make you feel something more than a cosmic shrug I'll be pleased.
simonw|9 months ago
The joy came flooding back to me! It turns out browser APIs are really good now.
You don't even need jQuery to paper over the gaps any more - use document.querySelectorAll() and fetch() directly and see how much value you can build with a few dozen lines of code.
icameron|9 months ago
AstroBen|9 months ago
Case in point: this site versus Reddit. HN is 100x snappier. Just a few lines of un-minified plain JS. Reddit crashes the browser on my iPad
andrei_says_|9 months ago
Embrace the cascade - check out ITCSS methodology.
Fluid typography and spacing - https://utopia.fyi
perrygeo|9 months ago
1dom|9 months ago
However, the frontend build systems are often complex to do complex state management. Sure, it's possible to reimplement it all and accidentally end up rewriting your own vanilla JS frontend framework, but beyond a point, that's equally as unfun as modern webdev.
It's not hard to shift the state management though, and when I find myself sat with a nice architecture that's formed without a complex frontend system, and with some really simple, uncluttered backend that could probably serve millions of requests a day from a homeserver and internet connection.... it gives me a profound feeling. It's a satisfying and familiar feeling from webdev I enjoyed around 2 decades ago as a teen. It feels like the old way of doing it.
Now, having designed, built and run systems from on-prem, through VPS & VMs onto serverless and static site stuff, doing it the old way again just feels better overall. Maybe it's nostalgia.
But then I feel the reason why we moved away from doing it the old way was because the complexity of the applications needed more efficient ways to make use of relatively limited bandwidth, storage and compute resources at the time. Now these things are all commoditised, and my home desktop and internet connection now has probably the same capabilities as a small datacentre back then... the dreamer in me wants to believe there's no reason why we can't all go back to the old ways of doing it now.
midiguy|9 months ago
roywiggins|9 months ago
sadcodemonkey|9 months ago
In the bad old days, there were a handful of canonical tutorials you used to learn the basics (HTML, CSS, JS) of web dev. Is there anything like that now that starts from those three technologies to build an understanding of web apps?
It seems like it could fill a real need for beginners who want to start by grasping the DNA of the web, so to speak, instead of the complex/sophisticated tools that are popular (not that there's anything wrong with that approach, if you need those skills for a job or project immediately).
notyouraibot|9 months ago
princevegeta89|9 months ago
Many big companies and startups blindly jump into the React/Vue/Angular stack, along with other complexities like Vite, Webpack, SSR, Zzzzzzzz... etc, where things are tied so loosely with 100s of dependencies and with a fragile underlying platform such as NPM. The output produced is only very marginally different from what could be achieved by the traditional MVC frameworks like Django/Rails/Phoenix etc. What do we lose here? a breathtaking amount of productivity and time. In addition, all the complex layers brought in place to make React FEs work with the backend such as GraphQL etc, also only increase the number of places you will have to maintain.
With SPA and all the modern snake oil like "serverless", engineers only will have to make changes at several places and implement some extra adapter logic, and spend a lot more time writing crap, than actually getting things out the door. With something as simple as JQuery which still holds its ground today, coupled with helper libraries like HTMX, Stimulus/Turbo, you can replicate 90% of the SPA experience, and ship things insanely fast, and maintain logic and state only on the backend. Your user only cares about seeing new features and existing features being easy to use. They don't give a fuck about whether you're using React or plain JavaScript or JQuery at the end of the day.
unknown|9 months ago
[deleted]
conradfr|9 months ago
I usually don't make a SPA though, only using it for specific parts (with their own entry file).
strogonoff|9 months ago
It is a similar sort of confusion that comes from people thinking React is a Web framework. It’s actually a small library.
unknown|9 months ago
[deleted]
bstsb|9 months ago
exiguus|9 months ago
Instead, you can adopt 2025 standards, including Web Components, JavaScript and CSS modules, and modern JavaScript (ECMAScript 2022, also known as ES13, and even ES15). Additionally, CSS Level 3 features such as variables and container queries, along with WCAG 2.2 guidelines, are all widely supported by the latest browsers.
mushufasa|9 months ago
Lasted for a year until we had users wanting to do complex interactions on the frontend.
Simple CRUD apps are fine, but users expect a lot of interactivity these days where things on the screen interact with each other.
The nice thing about Django, though, is that you can easily switch to api-based backend with DRF or Django-Ninja. We used DRF but if I were to do it again, I'd choose ninja.
r1290|9 months ago
number6|9 months ago
React, not so much fun
frankie_t|9 months ago
I keep seeing the same point that argues against how "not fun, depressing, worse a <thing> has gotten these days". The most recent incarnation of that is how programming with AI feels worse than programming on your own.
I don't think the problem is inability to find a way to derive fun, the way you could previously. The problem is deriving fun while still getting paid for it.
To reiterate on the web-dev, you probably can make it fun again, given that you were able to have fun with it previously. But it probably will have to be done in your spare time after job.
vouaobrasil|9 months ago
29ebJCyy|9 months ago
bstsb|9 months ago
nico|9 months ago
Being able to super quickly iterate, without caring too much about the results, but having fun seeing what comes up
I’ve really enjoyed exploring. Making small experiments, that you can make 5-10 of easily of in just one session
Like these silly things:
* https://openjam.ai/lonely_ant_702/vnqovd512h
* https://openjam.ai/stupid_coral_852/pvjda0dyc2
* https://openjam.ai/stupid_coral_852/qg8yembjg5
beakerbox|9 months ago
2OEH8eoCRo0|9 months ago
rsolva|9 months ago
I started out with Server Side Includes on a shared host, but converted to using PHP along the way to be able to make a base file with all the stuff that is repeated (header, main, footer etc), and then injecting the content from index.php, /contact/index.php etc.
Turns out, you get really far with HTML, CSS and a light sprinkle of PHP, and it is super fun and fast and you get things EXACTLY how you want it. No fighting other peoples opinionated decisions.
I have created many sites from scratch with Hugo, and generally enjoy the process, but this is even more fun, because ... I can do whatever I want!
lelanthran|9 months ago
I have a static file download only webapp[1], and I managed to get the includes done with only a 99-line JS component.
Honestly, once you get a decent way to specify, in HTML tags, include files, a significant portion of what you use a framework for (DRY) becomes redundant.
[1] Dynamic data to hydrate elements on the page is via API-only URLs.
scruple|9 months ago
ofrzeta|9 months ago
DamnInteresting|9 months ago
pjmlp|9 months ago
PHP, ASP.NET or Spring/Quarkus, with just enough JavaScript, no npm, no builders, nothing.
Likewise with WebGL or WebGPU, direct src includes, no build.
bob1029|9 months ago
All of my web resources have code like:
Form submissions are super trivial to work with too. Covers 99% of my use cases. Every time I think I need something like web sockets, I can usually wiggle my way out of it with some kind of rearranging of the problem.rorylaitila|9 months ago
I stay sane by shipping HTML over the wire from server rendered handlebars templates (Java/Lucee) against a MySQL database. Forms and Links only for navigation. JS for spice. My apps never break. Backwards compatible.
chuckadams|9 months ago
eizaguir-lai|9 months ago
wwall3r|9 months ago
Yes, some of them have a case for local-first. If you do, you really should start with that out of the gate though.
irrational|9 months ago
lifesaverluke|9 months ago
unknown|9 months ago
[deleted]
ericd|9 months ago
mattl|9 months ago
Worse still are sites that require JavaScript to read them.
bstsb|9 months ago
unknown|9 months ago
[deleted]
iamflimflam1|9 months ago
notyouraibot|9 months ago
xythobuz|9 months ago
gaiagraphia|9 months ago
mediumsmart|9 months ago
mattl|9 months ago
simonw|9 months ago
Hardly a ringing endorsement there!
Apparently even saying "I tried AI and it was somewhat OK" is enough to summon the anti-AI comments.
jacques_chester|9 months ago
draw_down|9 months ago
[deleted]
sublinear|9 months ago
This is always true for any web project. HTMX is an abomination of opinions that are harmful to both small and large scale projects. It attempts to solve problems (poorly and naively) in the mid scale that almost nobody ever spends much time in. It's a toy for inexperienced managers to create bullshit maintenance work while they try to quickly jump to something else. We need to stop making crap like this and focus on coding according to web standards and sparingly add much better tools as the project scales up.
recursivedoubts|9 months ago
https://github.com/bigskysoftware/fixi
we are hopeful that w/the work of alex petro and the triptych project that we can get some of the core ideas of htmx into the HTML spec itself:
https://alexanderpetros.com/triptych/
karolusrex|9 months ago
shayway|9 months ago
lelanthran|9 months ago
Often I find that the common web app needs nothing more than a few dozen helper js functions.
justonceokay|9 months ago
I haven’t been working on any sort of crazy features with elements moving around the page or excessive Ajax components (do they still call it that!?). On the other hand, most sites don’t have these features.
chuckadams|9 months ago
mathgeek|9 months ago