A standards-first web framework
49 comments
·January 16, 2025spankalee
tipiirai
Lit has indeed done important work in standards-first development through web components.
But the issue is that Lit still approaches web development through the lens of components. While these components may be "standard" web components that encourages developers to keep bundling markup, styles, and behavior together rather than maintaining proper separation of concerns.
Nue takes a different approach by removing all the unnecessary layers between the developer and web standards. Where Next.js forces content into JavaScript components and requires complex build pipelines, Nue provides a more direct development experience built directly on HTML (layout), Markdown (content), vanilla CSS, and vanilla JavaScript.
With Nue HMR completes in milliseconds rather than seconds. The HMR spans css, content, data, and HTML-based server and client-compnents. CSS updates instantly through the native cascade instead of rebuilding components. The entire development feedback loop stays under 100ms, maintaining perfect flow while preserving document state.
Most importantly, this sort of standards-first architecture enables true systematic design trough vanilla CSS. Instead of coupling design decisions to components through utility classes or CSS-in-JS, with Nue you can build design systems directly with CSS variables, calc() and other modern goodies.
spankalee
> But the issue is that Lit still approaches web development through the lens of components
Why is this a problem? Reuse is incredibly important for building almost anything on the web, and it's been with us since long before the web platform supported it natively, e.g. with CGI scripts that used Perl functions, to output repeated HTML "components", or PHP, web frameworks, etc.
If you don't have some method of reuse in the platform or framework, developers either have to copy-and-paste (and deal with so many difficulties of updating and maintaining consistency that it's not a realistic option), or push reuse to a non-standard layer of the system like server templating.
Server templating is fine, but it doesn't actually get rid of the implicit concept of components that'll be in the page or app, it just disaggregates it among to non-colocated parts of the system.
tipiirai
The issue is the coupling of HTML and CSS into your JavaScript code, which is a step away from the standards first development model.
bitpush
Lots of big claims, including bashing React and this seems to be a framework to build static sites, like blog posts with little to no reactivity?
Also, kinda silly to "appeal to authority" by invoking Dieter Rams. I understand that the author was inspired by Rams work, but this is akin to saying "My new framework is Iron Maiden" because I happen to really like maiden.
bitpush
(replying to self)
I just checked out the demo site, and now I'm question their design choices as well.
https://simple-blog.nuejs.org/
Nue claims to be minimalist and an outright rejection of everything that is bloated. And yet, this simple page has an obnoxious blur. I get that it kinda looks nice on first load, but click around - the blur happens on each navigation.
This screams form over function if anything.
bitpush
(replying to self)
I looked at the code, and I'm finding it very hard to take them seriously.
https://github.com/nuejs/nue/blob/4ed9b628f9f307f19bd6dd4d09...
This almost feels like someone taking on a challenge to create a toy framework themselves.
--
While we're at it, since the author wanted to poo-poo tailwind. Com'on https://github.com/nuejs/nue/blob/4ed9b628f9f307f19bd6dd4d09...
mind-blight
Yeah, I was expecting something bigger and more explicit when he went after tailwind. Instead, the author just re-hashed older design patterns (MVC and semantic html decorations from css) without providing context add to when and why you would prefer the older patterns over newer ones. I've been building since the jQuery days, and I totally agree that there are a lot of challenges that people tend to forget from that time. Decoupling html from css just didn't provide much value, but it did create a lot of bike shedding.
I really like how htmx has handled explaining their architectural trade offs. They're very clear about the kind of problem they're solving, how they're solving it, and when/why their solution is better.
This post just has "get off my lawn" vibes without a ton of substance
Gualdrapo
I like the blur, actually. Well, not that much - it's too much blur.
But I definitely don't like that on top of the blur effect there are scaling animations for each element. I shouldn't be saying this as I'm guilty myself of doing silly things for page transitions in my portfolio, but am working on that.
tipiirai
This blog is for introducing people to Nue's development model rather than a guide to minimalistic design. See
tipiirai
Nue is currently mostly just for static sites, but as the article states the development is building towards single-page applications too, keeping the idea of separation of concerns at core.
For reactivity, Nue's client-side library provides the same capabilities as React (components, loops, state updates) in just 2.5kb through HTML-based syntax. But crucially, this interactivity is added to semantic content rather than replacing it.
The critique of React is best explained in this document:
Coupling content, styling and behavior into JavaScript components can easily turn into hard-to-read code that compounds over time. Nue proves you can build more sophisticated interfaces through web standards while keeping codebases lean and maintainable.
fenomas
Agreed - I read the whole thing and I'm not sure what this even is. I guess an SSG and with a design system? If so, all the React bashing comes off like "airplanes are too complicated these days, check out this bicycle".
Edit: after checking the code samples, this looks a lot like svelte (pre-runes). So, single file components with templating with reactivity. I didn't get that at all from TFA..
tipiirai
I want to address Markdown and it's role in standards first development.
While MD itself isn't a web standard, it's a strategic choice that reinforces standards-first development by generating pure, semantic HTML. This creates a natural separation between content structure and visual presentation.
Consider the impact on CSS development.
In React codebases, engineers spend 90% of their time writing JavaScript - managing state, coordinating effects, optimizing builds. Style sheets become an afterthought, buried under framework patterns and utility classes.
Nue flips this ratio: codebases become 90% CSS, focusing engineering effort on systematic design through web standards. By keeping content in Markdown and presentation in stylesheets, we maximize the power of native CSS features - from custom properties and container queries to mathematical relationships for typography and spacing.
tipiirai
Author here: this is Nue's new, more natural direction. Our previous focus on design engineers and CSS design systems was accurate, but missed the most important point: the web platform itself has evolved to eliminate the need for most framework abstractions. What began as elegant HTML, CSS, and JavaScript has devolved into build systems demanding hundreds of dependencies just to render a page.
This is a long term, ambitious project to strip away these artificial layers and return web development to its core strengths. Instead of fighting web standards, we're taking them to their absolute peak.
Happy to hear your feedback.
bitpush
What's your reasoning behind the choice of markdown?
To quote yourself -
> What began as elegant HTML, CSS, and JavaScript has devolved into build systems demanding hundreds of dependencies just to render a page
If HTML is so elegant, why isnt nuejs not using it?
---
On the similar line, if you're so much for web standards, why are you recommending the use of Bun which breaks so much of standards in the name of speed?
tipiirai
HTML for layout, Markdown for content. How else could it be?
bitpush
The entire nuejs route is built using markdown. https://github.com/nuejs/nue/tree/master/packages/examples/s...
which is totally non-standard. Super common, but non-standard. You compiled the markdown to html using a tool (another non-standard item)
You dont get to claim "standards-first" framework and then use non-standard technology and workflow.
mind-blight
I've also been developing web apps since the days of jQuery and Flash. I think there are some interesting kernels here (in particular, emphasizing how much browsers have evolved), but the post brings up older architectures as better (MVC, separating CSS from HTML) without providing arguments for why those were better at addressing current pain points.
Personally, I hated MVC in frontend code. It works ok for backend apps (though I prefer service-oriented architectures more), but it tended to creating arbitrary separations that provided little value on the frontend.
Similarly, I think the separation of CSS and HTML was an illusion 90% of the time. The CSS is always coupled with the html, and having it spread across multiple files just made design updates more error prone. That provided all of the problems with separation of concerns with none of the benefits. You want to be able to update things like fonts, colors, spacing, etc site-wide in either 1) components (which works great with coupling html & css inside of component files) or 2) logical areas (which works great with css themes and variables). Neither of those are due to the separation of HTML and CSS.
I think there are a couple of interesting ideas here, but I'd need to see clearer arguments about why these patterns were actually better on the frontend (and when they fail) to be convinced in this direction.
tipiirai
Gotcha. My next argument is going to be visual trough the design systems explained on the article. Hope that's clearer.
assimpleaspossi
Repeating this here for emphasis:
>>the web platform itself has evolved to eliminate the need for most framework abstractions.
mickael-kerjean
Yep, I rewrote my OSS Dropbox like frontend for every file transfer protocol in vanilla JS [1], so far it's not only faster with smaller memory footprint, the app is faster to boot, lighter in size despite the optional build system, there is no framework code I don't know about running at the worst possible time and I can effectively run to the maximum of what a browser can do.
It's refreshing to be able to open the network tab and see the original files coming out [2] and the developer console showing the full structure of it untouched in the same way it's visible from github.
This has opened new doors that was previously closed with any kind of framework, the option to dynamically patch those js file at runtime to customise the interface for unique needs that make sense for someone but wouldn't make sense for 99% of everyone else. Now it's just a matter of submitting a small plugin patch that do it and tada, a happy customer while maintaining only a single codebase
[1] https://github.com/mickael-kerjean/filestash
[2] https://demo.filestash.app/login?type=s3&access_key_id=Q3AM3...
bitpush
Do you think the code can be extended and maintained by someone other than you? How about a large team?
When I look at the contributors, I see abysmal contribution from other people.
https://github.com/mickael-kerjean/filestash/graphs/contribu...
----
What works for one disciplined (and talented) developer such as you might not work at scale.
flashgordon
I think this sounds exciting. As a backend eng (who prefers Htmx) and someone who totally struggles with css, reading your intro made me walk away feeling dumber than before. Again not expecting an ego boost or anything. Something that felt counter intuitive:
1. Lack of drawings hurt - I had no idea what zaha or rams meant. You had bold text which I thought were links but alas they were just bold text.
2. I actually appreciate math and still wasnt sure how I could use math in the new proposed framework (id kill for a constraint system that was similar to what iOS had).
3. +1 on the crazy level of complexity in today's frameworks (which is why I hate using nextjs etc) but perhaps some code samples (even if proof of concept would have helped) would have been helpful.
bitpush
It is 100% true that modern frontend javascript development is hard. You take your eye off the ball for 6 months, and you lose what's going on. I can understand why casual folks find it difficult to get started.
For instance, a year back everybody was using pnpm. But now you use pnpm thru corepack.
----
I can understand why people yearn for simpler days, but the reality is frontend developement is super-duper nice, even with all the warts. Anyone who is romanticizing the "good old days of jQuery" is being non-serious or has not lived through the pains of that.
---
You cant write a spotify.com or a amazon.com with jQuery and have 100s of engineers collaborate and maintain.
And neither can you with nuejs.
tipiirai
I can answer these questions very clearly once the design systems are released. Now they are just listed with plain text to give you an idea what's coming.
jkrems
> The gap between design and engineering has never been wider.
This seems like such a weird claim to make. This used to be "here's a JPEG, you may beg for the PSD". Not saying that there's no gap today but... never been wider..? Am I missing something about the typical Figma setup that makes it worse than a random JPEG export of one state of the UI?
tipiirai
This is about the gap between Figma and React/Tailwind/CSS-in-JS, which is wider than Figma -> CSS
ripped_britches
Everybody who is so upset about the proliferation of so many heavily abstracted, complicated JS frameworks should probably recognize for a moment that we have a horrible backwards compatibility problem with HTML, CSS, and JS. None were ever designed with the idea that they could support apps like freaking Netflix for Smart TVs or React Native apps for virtual reality.
If you want a truly standards first UI development stack, try Flutter. It critically changed how I view UI development: 1 canvas for any screen. Truly a beautiful thing.
tipiirai
Flutter fundamentally misunderstands web standards and separation of concerns. It imposes a custom rendering engine and widget system on top of the web platform, creating another layer of abstraction rather than leveraging native browser capabilities.
The web already has a powerful "canvas for any screen" - it's called HTML and CSS. Modern features like container queries, CSS grid, and view transitions provide sophisticated responsive capabilities without fighting against web standards.
Flutter's approach is precisely what we need to move away from - trying to solve web development challenges by building on top of the platform rather than understanding its inherent strengths. True standards-first development means embracing HTML's semantic structure, CSS's systematic design capabilities, and JavaScript's proper role in progressive enhancement.
Creating better interfaces doesn't require new abstractions. It requires deeper understanding of web standards and systematic design principles.
colonelspace
> Dieter Rams is the man behind Apple's design philosophy.
Rams and his work at Braun may have inspired Apple's products via Jony Ives, but Rams never worked on an Apple product (as far as I'm aware).
It's a bit like claiming "Thomas Edison is the man behind Tesla's motor technology".
tipiirai
Jony Ive specifically has said he looks up to Dieter Rams and his philosophy
colonelspace
Yep, as I mention above
tipiirai
Cool. So the original claim is firm:
> Dieter Rams is the man behind Apple's design philosophy.
(no need for him to work there to impact Ive's stance on design)
gherkinnn
Nice work. I've been following Nue for a while now. Stripping away (obsolete) abstractions in favour of what the web now can do natively is liberating.
bitpush
Nuejs uses markdown, which is not web. You cant claim to be standards-first, yet use something that is 100% non web-standard.
That is before we talk about their use of 'bun', which is famously my-way-or-highway engine.
ellinoora
Obviously not a web standard, but Markdown is the closest one we have for content. Right?
mocamoca
This article is extremely well written and energizes me... Having a framework that allows separating the graphical work from the logic would be great. But I have trouble imagining this idea passing the brutal test of production -- except for showcase websites and blogs. I'm specifically thinking about apps (linear?) But I'm looking forward to seeing what comes next and hope to get more information when the templates arrive :)
__jonas
I like the attitude in general although it does come across a bit arrogant, the goal seems to be a noble one.
I can't really tell what it currently offers over Astro, it does seem to be a static site generator with a couple of nice tricks, I feel like Astro has perfected this.
I don't think it's any more "standards first" than Astro, or am I missing something?
bitpush
I'm glad that you brought up Astro. This is Astro but crappier. It even has "islands", something that Astro has made super-duper popular.
To their credit, Astro authors are humble to tell you that Astro is not a good fit for all usecases, and focuses sharply on blogs, static content with little interactivity.
I help maintain Lit[1], which I consider a very standards-first non-framework.
With Lit you can build full apps with standard and plain JS, CSS, and HTML; standard web components; and no build tools.
I don't immediately see how this is any more standards-first, especially when it mentions Markdown, tooling, and a CLI. I don't actually really see what exactly this even is from this landing page. It would help to show something up front.
[1]: https://lit.dev