Hacker News new | ask | show | jobs
by zelphirkalt 2055 days ago
Someone must have gotten the a hold of the credentials of the device, where I put my brain dumps and made it into a blog post.

I wish more people did approach web development in this kind of minimalist most accessible and responsive way, that does not require me to trust all their scripts and simply lets me access a hypertext document to get the information I seek.

1 comments

The OP mentions things like Nextjs, which I find odd. A well crafted site built with the help of Nextjs (and similar) works w/o JS just fine: The site becomes progressively enhanced through hydration, but if you disable JS altogether, you can still read and navigate the site.

For sites with minimalist designs, straight forward data models and low to no interaction (like a blog or similar) I agree that any sort of JS can be overkill. But professional web devs use these technologies because they tick some important boxes (trade-offs) ranging from expressivity, structure to performance and provide a uniform way to write front-ends.

Aha? That sounds interesting. Usually those "I'm gonna use a full blown framework, although nothing special is needed." websites appear in pure white over the whole screen, with nothing to be seen. Which is usually when I close the tab. Are you saying, that NextJS encourages a design, which keeps no script in mind? Is it its default to render a noscript tag or something? This would definitely raise it in my personal rating.
To add to what ruicaridade said:

> Are you saying, that NextJS encourages a design, which keeps no script in mind?

It quasi enables it, a NextJS site has three rendering stages:

1. static at build time 2. server side at request time 3. dynamic in the browser

It leverages React hydration for 1-2 and client side React for 3.

If you avoid 3, or rather build your site with progressive enhancement in mind (`noscript` can help but is often not necessary) then this framework makes it very easy for you.

I think https://reactjs.org/ is built with Gatsby (a similar framework, but not as dev friendly in my opinion). And you can browse it just fine with JS off last time I checked.

Next has two different ways to deploy:

1. Next renders the React page server-side and sends it as html/css. Once everything is done loading on the client, it becomes a regular React page. Requires a server. 2. Next pre-renders your whole website with data fetched at build time, like Hugo or Jekyll. Drop it on a CDN and you're golden.

Is it able to somehow transform dynamic loading of content into expected clicking of links, upon which the server delivers another static HTML + CSS page? Or is this "prerendering" limited to already static parts of the website?

It would be great to have a web framework, which automatically transforms everything into links, which, when clicked, cause the server to deliver an updated HTML + CSS, which shows the same info, as one would have seen with a dynamic update using AJAX.

Hmmm more like: "I actually have a JS framework website, which would use AJAX to load parts of the page to update pages and not reload the whole page, _however_, if you have JS deactivated or blocked, I will automatically work using normal links, which then work as if someone had taken the effort of writing all the code for making the dynamic portion of the page work by just using links and full page reloads." -- So kinda like magic.

But what you linked to is interesting nevertheless. :)