Move over JavaScript: Back-end languages are coming to the front-end(github.com)
github.com
Move over JavaScript: Back-end languages are coming to the front-end
https://github.com/readme/featured/server-side-languages-for-front-end
14 comments
I was looking at the Caldera micro chat example, but noticed that the local state does not update the shared state until after the form send? Why not during the onChange() event? I am assuming the number of requests would be too high for the simple json file io?
Or am I thinking of this incorrectly? This is the first time I've investigated a solution of this type.
Or am I thinking of this incorrectly? This is the first time I've investigated a solution of this type.
Don’t let anyone fool you. We let a generation of progress go to complete waste because some fools wanted to run JS on the front end and backend instead of actually fixing the front end debacle that existed.
It’s a shame we didn’t make better use of our time solving the problem before the JS posers did their horrors by pretending that the solution was to take front end languages and code the backend.
It’s a shame we didn’t make better use of our time solving the problem before the JS posers did their horrors by pretending that the solution was to take front end languages and code the backend.
Name checks out
I looked into phoenix a it. The migration story seemed pretty bad though. It's amazing to me that other frameworks don't look at django and copy that.
Ecto (the ORM in Phoenix) seems like it should have all the parts for automatic migration generation but it's just the last little step missing.
Ecto (the ORM in Phoenix) seems like it should have all the parts for automatic migration generation but it's just the last little step missing.
Nah. JS is popular for more reasons than its syntax. One being that with node and vue or react you can code the whole backend and frontend with one language that was designed specifically for the web. If anyone has wet dreams of writing webapps with go or rust then boy do i have bad news for you. If anything node will replace even more of php, python, ruby and other similarly limited languages.
JS is popular because it's the language you can use natively on client-side web pages. You need to know it for the front-end and front-end webdevs were sold an easy way to do full-stack with Node.js. It might maintain it's momentum for a while, especially while WASM requires JS to integrate, but lets not pretend that JS is popular because it's an exceptionally good or well designed language. If it were so great there wouldn't be A) so many languages that compile-to JS, B) so many languages embedded-in javascript (that weren't traditionally), or now C) frameworks like Phoenix Liveview/Blazor/Livewire that try to hide it from the developer altogether. If you catch people gushing how much they love javaScript it's probably because it was their first programming language and they're really gushing that they love programming.
The sooner JavaScript haters assume there is no way around it, the better we'll all be.
I do like a lot Livewire, Hotwire, Unpoly, HTMX, etc... but using these tools (or any backend language compiled to wasm, etc,etc) as a way to try to avoid JavaScript is never going to work and will only cause pain and terrible applications.
Even with those HTML first technologies (which I like a lot) you need to learn to accept JavaScript is just another tool and one that you will definitely need to learn and use to make anything decent.
It is great to have a framework such as livewire that when you click a button to "load more" will render the new items in the backend and just swap out a placeholder and done. No JavaScript, no API, etc. Amazing.
It is just *terrible*, flaky, unresponsive, overkill and absurd to reach for the backend to re render a bunch of html because you needed to toggle a class or hide a box.
Use the right tool for the job.
I'm really tired of backend developers hating on JavaScript the same I'm tired of JavaScript developers hating on PHP, etc, etc.
Different tools. Different tasks. Let's not try to be purists and "JavaScript all the things" or "I'm not touching JavaScript because it sucks".
I do like a lot Livewire, Hotwire, Unpoly, HTMX, etc... but using these tools (or any backend language compiled to wasm, etc,etc) as a way to try to avoid JavaScript is never going to work and will only cause pain and terrible applications.
Even with those HTML first technologies (which I like a lot) you need to learn to accept JavaScript is just another tool and one that you will definitely need to learn and use to make anything decent.
It is great to have a framework such as livewire that when you click a button to "load more" will render the new items in the backend and just swap out a placeholder and done. No JavaScript, no API, etc. Amazing.
It is just *terrible*, flaky, unresponsive, overkill and absurd to reach for the backend to re render a bunch of html because you needed to toggle a class or hide a box.
Use the right tool for the job.
I'm really tired of backend developers hating on JavaScript the same I'm tired of JavaScript developers hating on PHP, etc, etc.
Different tools. Different tasks. Let's not try to be purists and "JavaScript all the things" or "I'm not touching JavaScript because it sucks".
> Use the right tool for the job.
This is a strawman. I never claimed one should use Liveview for all web work. I'm just saying people _want_ to do web stuff with languages other than javaScript. javaScript is only "the right tool" in the sense that it's the only one that's native to the browser. If they substituted javaScript with any of the other popular general purpose languages no one would be any worse off for it (not factoring in the ecosystem built around it). javaScript doesn't have any features that make it better suited for the web than other general purpose languages. It's _only_ real advantage is that years ago a decision was made to create and use JS (edit: ..in the browser) and we've all been stuck with it since.
This is a strawman. I never claimed one should use Liveview for all web work. I'm just saying people _want_ to do web stuff with languages other than javaScript. javaScript is only "the right tool" in the sense that it's the only one that's native to the browser. If they substituted javaScript with any of the other popular general purpose languages no one would be any worse off for it (not factoring in the ecosystem built around it). javaScript doesn't have any features that make it better suited for the web than other general purpose languages. It's _only_ real advantage is that years ago a decision was made to create and use JS (edit: ..in the browser) and we've all been stuck with it since.
> If they substituted javaScript with any of the other popular general purpose languages no one would be any worse off for it
This is what I'm talking about. This is not going to happen any time soon. And all attempts to do this only lead to more confusion. It is easier to just learn it and help making it better. The language improved a lot over the last few years so I don't see why replacing an entire ecosystem, browser implementation, libraries, writing transpilers, etc, etc, etc can be any better than just learning to love it as the tool it is.
And let's say in some parallel universe it could be replaced. What is it going to be replaced with? Go? Python? Rust? Everyone has a different opinion so there is no agreement possible. And having any and every language available in the browser is just a wild dream.
So, yes, JavaScript is not perfect. And probably there are a ton of better languages but trying to avoid it and write everything in Go/Clojure/Python/Whatever is ridiculous. That won't happen any time soon. Not using JavaScript is just self inflicting limitations oneself.
This is what I'm talking about. This is not going to happen any time soon. And all attempts to do this only lead to more confusion. It is easier to just learn it and help making it better. The language improved a lot over the last few years so I don't see why replacing an entire ecosystem, browser implementation, libraries, writing transpilers, etc, etc, etc can be any better than just learning to love it as the tool it is.
And let's say in some parallel universe it could be replaced. What is it going to be replaced with? Go? Python? Rust? Everyone has a different opinion so there is no agreement possible. And having any and every language available in the browser is just a wild dream.
So, yes, JavaScript is not perfect. And probably there are a ton of better languages but trying to avoid it and write everything in Go/Clojure/Python/Whatever is ridiculous. That won't happen any time soon. Not using JavaScript is just self inflicting limitations oneself.
Please note, my original comment was simply correcting the notion that JS is popular because it was especially well suited for working on the web. I see projects like Fengari[1] and would _love_ to use something like that but I recognize I can't impose an extra 300kb on end users just because I want to write in a more pleasant language to develop. I accept that JS is what we have, but I won't pretend like JS was the cream that rose to the top.
[1]: https://fengari.io/
[1]: https://fengari.io/
You're correct, JavaScript isn't the best, but neither anything else, there's no best 'Programming Language' that everyone would agree on, everything has up and down side. But, TypeScript is the best bet for this frontend ecosystem I think, you should give it a try.
You're really ignorant. Gopher exists. Scalajs exists. It's okay to not know but then watch your tone. Or just always
We've banned this account for repeatedly breaking the site guidelines.
Please don't create accounts to break HN's rules with.
https://news.ycombinator.com/newsguidelines.html
Please don't create accounts to break HN's rules with.
https://news.ycombinator.com/newsguidelines.html
I feel like too many developers never venture out past javascript and it shows. different languages highlight different ways of approaching and solving problems and I look forward to how that will play out.