Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Building a web application with a UI in a professional context without a frontend build is borderline malpractice. Even a "thin" layer of JS on top requires some degree of dependency management, and I personally have no desire to go back to the days of vanilla CSS, so you need a SASS/SCSS transpiler. Then there's a lot of handy things that frontend builds do, like normalizing SVG icon formats, automatic organization of static assets etc. The fact is the "islands of interactivity" model still requires two builds.


> Building a web application with a UI in a professional context without a frontend build is borderline malpractice.

I sincerely disagree. I am not about to add node to a project that gets by fine with Django + HTMX.

I'm tempted to say that adding hundreds of perishable npm packages to a project is a better heuristic for 'malpractice'.


Very funny that you think a build with an entire CMS involved is somehow "simpler". You apparently have a lot of patience for Django's static asset management pipeline, but I do not.


> I personally have no desire to go back to the days of vanilla CSS, so you need a SASS/SCSS transpiler

Modern CSS is amazing. Why on earth would anyone use SCSS? It pays to look at what Vanilla can do these days.

> Even a "thin" layer of JS on top requires some degree of dependency management

Use modules and import away. If it is truly a thing layer, there's no need for further optimisation until far along in the product.


Modern CSS has _some_ of the features of SCSS/SASS. It does not have all of them. But most importantly, many of dependencies one might want to use also make use of SCSS/SASS downstream. If you're happy to build everything from scratch and eschew any dependencies that require a build system, then have fun explaining to your product person why it took so much time to build a thing that they know very well is a pre-built component in some frontend library somewhere.


> Modern CSS has _some_ of the features of SCSS/SASS. It does not have all of them

You say it like more those features are desirable.

> then have fun explaining to your product person why it took so much time to build a thing that they know very well is a pre-built component

Sure. I wasted more time getting an assortment of pre-built components to behave than I did building the basics from scratch. And then comes a breaking change. And then that component library uses styled components and doesn't run properly on the server. Why do people do this to themselves?


> Building a web application with a UI in a professional context without a frontend build is borderline malpractice.

Why do you think that? What problem is a build tool solving for you that without it you think you're being irresponsible for not doing it by hand?


Nowhere in my comment did I say abandon a build step?

I’m saying—if you do not have high interactivity requirements, which I would claim is most things on the web—you will encounter a lot less overall complexity shipping mostly server-rendered pages with isolated, self contained JS bundles where you need them.

I was using multi-entrypoint build steps outputting separate per-page or per-feature CSS and JS bundles long before I ever worked on an SPA, it’s hardly a good reason to move your entire UI and routing to the client-side.


What's rendering the pages on the server? Because if its not javascript, and you still have a frontend build, you have a repository with two separate builds, and builds are expensive to maintain. If your containerizing, you need two different containers, each with a dependency management system, a runtime, probably a separate workflow for development and production.

There are many ways to render pages on the server using a single JS builds, most template rendering engines have a node implementation, and most javascript frontend frameworks have a mechanism to render components statically to a string. If we're talking about a simple, mostly-static website, the content is going to be cached so the performance of the backend isn't a huge factor. So just use JS for the whole thing, and save yourself a build.


Do you know, that some of the most used features of SASS/SCSS are now in vanilla CSS?


> Building a web application with a UI in a professional context without a frontend build is borderline malpractice.

This is outdated nonsense for most sites.


What does "most sites" even mean? I do this professionally, and I assume that most of the people replying here do as well. The article we're discussing is written by a professional for an audience of professionals. The number of sites I've had to build that were entirely static with no interactivity I can count on one hand.


You don't need a heavy frontend build for interactivity. All you really need nowadays is asset fingerprinting.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: