I'm doing something similar because I was disappointed by the output of current static generators: everything gets prerendered to static markup, runtime JS only augments UX. In my case, the key breakthrough was reducing everything to arbitrary constrainted emitters with a topological sort. -- The build uses a GraphQL database to store the results (Prisma/Postgresql because it's great with Typescript). The whole site…
How does your solution compare to Gatsby?
Astro: Ship Less JavaScript
151–160 of 171 posts
Re: Astro: Ship Less JavaScript
#152Earlier quoted context omitted.
That's not really fair. A lot of static sites simply don't need JS at all but they're built with it because it's deemed "best practice". My latest website, for example, has zero Javascript in it. So much content is published in Github READMEs (typically markdown) and while Github itself will have Javascript elements, it does demonstrate that you don't need Javascript heavy sites to publish content. I honestly think h…
You can use NextJS to build a fully static website with no JavaScript at the initial loading. There are tons of libraries (I think around 300Mb) to compile your site, but if you do optimizations right, the final website should be as lightweight as you expect it to be. What you get? Routing, instant refresh, image optimization, and code optimization (your CSS could be smaller if you minify it).
Re: Astro: Ship Less JavaScript
#153I get it, I’m glad it exists, it’s Neat, and congrats, but it’s also amusing to me that we’ve reached the point of JS tooling where we’re making frameworks to deal with frameworks, build tool frameworks a few levels deep, etc. It just seems like so much…stuff. And now we have stuff to help us use less stuff, but it’s still stuff in itself. Nothing is stopping anyone from opening notepad and writing HTML with inline s…
In your argument, you could replace HTML/CSS with Assembler and JS/React/whatever with C and everything that came after. The productivity gained from these Tools is worth it, even if some use cases could be solved without it.
The comparison was foolish then and just as foolish now.
Re: Astro: Ship Less JavaScript
#154I get it, I’m glad it exists, it’s Neat, and congrats, but it’s also amusing to me that we’ve reached the point of JS tooling where we’re making frameworks to deal with frameworks, build tool frameworks a few levels deep, etc. It just seems like so much…stuff. And now we have stuff to help us use less stuff, but it’s still stuff in itself. Nothing is stopping anyone from opening notepad and writing HTML with inline s…
Imperative UI sucks. There is a very good reason everyone is using declarative UI frameworks these days
This is common, but it’s still very junior thinking.
The best way to minimize tech debt is to supply the most direct solution to a given problem and refactor along the way to bring similar solutions together into a single delivery. Decoration in the code is not that.
Re: Astro: Ship Less JavaScript
#155Earlier quoted context omitted.
In your argument, you could replace HTML/CSS with Assembler and JS/React/whatever with C and everything that came after. The productivity gained from these Tools is worth it, even if some use cases could be solved without it.
I remember a few years back, just before You Might Not Need jQuery became a site, any mention of not needing jQuery would immediately be met with some analogy to writing assembly. The comparison was foolish then and just as foolish now.
Re: Astro: Ship Less JavaScript
#156Earlier quoted context omitted.
Is the Amazon forest a contract job? Would love to read more detail about that arrangement if you can make it work. Sounds big enough you could also get an ongoing retainer for maintenance and support of their set up after the initial work.
Ummm. I thought I might have to put a disclaimer in there. But I figured it was over the top enough to be clear. I was wrong. There is no app. No cactus farm. No Forest Service. No Amazon. Edit: Ok, fine! The U.S. Forest Service does exist. So does the Amazon. But the story is fiction.
Cheers.
Re: Astro: Ship Less JavaScript
#157Earlier quoted context omitted.
I remember a few years back, just before You Might Not Need jQuery became a site, any mention of not needing jQuery would immediately be met with some analogy to writing assembly. The comparison was foolish then and just as foolish now.
Spoken like someone that has never actually created an webapp with significant scope. Reading your comments in this thread is a good reminder how strongly the clueless argue about things they don't understand.
Re: Astro: Ship Less JavaScript
#158I get it, I’m glad it exists, it’s Neat, and congrats, but it’s also amusing to me that we’ve reached the point of JS tooling where we’re making frameworks to deal with frameworks, build tool frameworks a few levels deep, etc. It just seems like so much…stuff. And now we have stuff to help us use less stuff, but it’s still stuff in itself. Nothing is stopping anyone from opening notepad and writing HTML with inline s…
There is an ebb and flow in the JS ecosystem. First we get a framework. That framework is missing some key functionality or features so we get plugins and eventually a meta-framework standardising the new behaviour and maybe introducing a slightly new paradigm. That meta framework gets unwieldy and we get a ground up rewrite (new framework) that trims the fat and uses the new evolved features as first class concepts.…
Svelte's compiler-first approach really fixes all of my problems with the JS ecosystem. Compile-to-JS langs aren't new, but learning a whole new language has non-0 overhead. HTML, CSS, and JS/TS in a .svelte file is awesome, and the syntactic sugar makes the ugly parts of JS (like state management and reactivity) extremely trivial to implement.
The first class support for Vanilla JS & Typscript is brilliant. Vite and ESBuild are incredibly fast and hassle free. The water has never felt nicer for me as a web dev!
Re: Astro: Ship Less JavaScript
#159I get it, I’m glad it exists, it’s Neat, and congrats, but it’s also amusing to me that we’ve reached the point of JS tooling where we’re making frameworks to deal with frameworks, build tool frameworks a few levels deep, etc. It just seems like so much…stuff. And now we have stuff to help us use less stuff, but it’s still stuff in itself. Nothing is stopping anyone from opening notepad and writing HTML with inline s…
[1] https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_i...
Re: Astro: Ship Less JavaScript
#160Frameworks is not just some hyped up abstraction layer. Advanced frameworks offer advanced functionality for advanced projects. They really do.
They have standardized certain ways of doing things, structuring complex web applications and solving problems.
I completely agree about using a framework to build a personal blog is overkill in many ways, but don't blame the framework for that. Just like you shouldn't blame the saw for being bad at hammering in nails.