Live data from Hacker News

A JavaScript-Free Front End

dev.to

61–70 of 215 posts

Re: A JavaScript-Free Front End

#61
it’s actually easy to do no-js websites when all you’ve got are forms, text and some images.

but there are a lot of use cases where js is essential.

it all comes down to what you’re building.

Re: A JavaScript-Free Front End

#62
post #61

it’s actually easy to do no-js websites when all you’ve got are forms, text and some images. but there are a lot of use cases where js is essential. it all comes down to what you’re building.

You can even add huge "sign up for our newsletter!" text and button after every paragraph.

Re: A JavaScript-Free Front End

#63

Im not sure how elegant I think the CSS hack is compared to just making a simplistic script for it. Would a user really notice the parsing time for such a simple javascript application?

I object to considering the techniques in the article "hacks". They all employ minimal markup, without extra boxes or complicated classes, and the CSS side is very simple.

I give you that its not a verbose or complicated hack. but I still would say that a hidden checkbox acting as the middle man for modals etc is pretty hacky :). A hack doesn't need to be complicated, most times its not. But after all I can't imagine anyone thinking about this as a feature when they implemented checkbox inputs back in the days.

Re: A JavaScript-Free Front End

#64
post #14

Since I'm caching and gzipping everything, each subsequent pageview is around 6 KB; far smaller than the SPAs I've seen with equivalent functionality. That's ace. But my internet connection has a 2 second latency so I still have to wait an annoyingly long time every time I interact with your app. My connection is terrible too, so it drops every 10th request, and now I'm seeing a lot of broken pages. If only you'd wri…

> If only you'd written an offline-first PWA and used background-loading and prefetching with some intelligence to retry failed requests in order to deliver content before I actually need it this would have worked so much better.

Then I would have waited too long to load the page the first time and give up.

Re: A JavaScript-Free Front End

#66

Earlier quoted context omitted.

Definitely...only use C on the backend, any other language is just a hack.

I get the snark, but Java, Rust, Erlang are all better options than an interpreted language for backends IMO

I'm a java engineer who writes lots of Elixir at home, and i _still_ don't agree with this sentiment.

Use the tool / language that makes the most sense for your problem.

Re: A JavaScript-Free Front End

#67
post #65

Naive question - but how could you do any interactions (login, add/edit stuff that talks to a server) without using Javascript?

Form posts to the server, just like the old days.

Of course, then you need a full page reload every time you edit something.

Re: A JavaScript-Free Front End

#70
post #28

I like the slogan "JavaScript-free"! Finally something to rally around. I don't mind projects which use a tiny bit of hand-coded, vanilla ES6. Would be nice if there were a slogan that included these. Looks like it actually does use JavaScript for the "select2" case. This is exactly the case I'd be happy to special case. edit: added paragraph

The term I've usually seen is "JS sprinkles". Not sure where it comes from — maybe DHH in the context of mostly-server-side Rails apps?
Post reply on HN