Live data from Hacker News

Back-end languages are coming to the front-end

github.com

291–300 of 328 posts

Re: Back-end languages are coming to the front-end

#291
post #141

I keep waiting for something better than js/ts to do frontends so I dont have to learn it. I'm still waiting... I thought wasm would have gotten further along by now.

Pretty much any wasm language will require a JS runtime somewhere if you’re going to do substantial things with it, so might as well learn it either way.

Really though? I think wasm app will be able to write to DOM so no JS required, it can't yet but seems inevitable.

Re: Back-end languages are coming to the front-end

#292

Earlier quoted context omitted.

I do dearly hope Blazor works out - I would be so happy to never have to deal with the Javascript/Typescript tooling hell ever again - but I'm not holding my breath. Political shifts inside Microsoft could leave it dead and unsupported like Silverlight tomorrow...

Compared to the Blazor tooling, the Typescript tooling is miles ahead imo. We did a Blazor app during a hackathon and I was pretty frustrated with how inconsistent the build errors were with blazor components. What makes me most skeptical about Blazor though, is that it's shifting a huge burden to the client just to make developers happy. Even if the runtime is stripped down and compiled to wasm, it seems kinda wild…

> Even if the runtime is stripped down and compiled to wasm, it seems kinda wild to send a whole runtime just so you can run C# code

FWIW, you seem to be talking about Blazor-WASM, but most real-life Blazor usage right now is server-side Blazor which doesn't do any of that.

Re: Back-end languages are coming to the front-end

#293

What's incredibly frustrating about the knocks on JavaScript is that it's not a shortcoming of the language that creates the problems hinted here, but the poorly-considered engineering choices of the popular frameworks. After building my own framework [1] last year, I realized just how disconnected JavaScript developers—yes, the "big boys" are especially off in CS la-la land—were from web development fundamentals. HT…

Most languages are quite tough to get into. And they require some real learning if you want to do anything trivial. JS is easy to get started (only the browser you already have) and you can do quite a lot without understanding anything about computer science. But it catches to you anyway. I've seen on Twitter someone repelled by the MDN documentation, describing it as not intuitive. I realized that the documentation…

JavaScript used to be easy to get into (and I suppose technically still is) but the old days of open a console and type in some code or put a src file at the top of the HTML page seem to be gone for most practical and production purposes. Now it's typescript and webpack and a 200 hour course to get started with React. And big teams tripping over each other making components.

The funny thing is, I don't know that the resulting product is really much better.

Re: Back-end languages are coming to the front-end

#294

Earlier quoted context omitted.

Virtual doms are a cute idea, but virtual dom diffing will always leave a lot of performance on the table. It’s complex, slow, and entirely unnecessary - especially now we have frameworks like svelte. It can still work well enough when developers don’t go crazy with divs, and when they use shouldComponentUpdate. But nobody uses that stuff; and modern pages are bloated like crazy. For my money I think the problem is c…

I love how the new Reddit gets frequently used as a straw man in arguments of front end developers are bad, the state of front end is a mess, etc. If you care to look at the actual reasons that Reddit and so many modern websites really are terrible, you'll see that it comes from the top and in many cases is on purpose. Reddit (and many others) don't want you to use their website. Especially on a mobile browser. They…

We might have to agree to disagree on this.

I bet a huge percentage of Reddit’s traffic comes from their website. And if they didn’t want people using the website, they wouldn’t have bothered putting so much effort and attention into the redesign. Why bother redesigning something you want nobody to use anyway? And if your argument is that they made it bad on purpose, they may as well have just made their old site worse.

Also, if their business model is analytics and ads, why do they allow 3rd party reddit clients like Apollo?

I hear what you’re saying, but I stand by my perception of what’s going on.

Re: Back-end languages are coming to the front-end

#295

Earlier quoted context omitted.

> I realized just how disconnected JavaScript developers—yes, the "big boys" are especially off in CS la-la land—were from web development fundamentals. HTTP distilled down to its absolute essence is brilliant, but for some reason gets absolutely ignored in the JS world. Can you please elaborate what these areas of disconnect are? I looked at Joystick documentation hoping to find more of your thoughts this topic, but…

I've tried writing a response to you a few times but realizing how complex it is—the real answer to your question is worthy of a long blog post. The core problem is the blurring of the lines between a framework and the underlying technologies of the web (HTML, CSS, and JavaScript). To me, it seemed like a lot of unnecessary complexity was being added just to achieve the common goal of rendering some HTML, styling it…

>The core problem is the blurring of the lines between a framework and the underlying technologies of the web (HTML, CSS, and JavaScript).

I believe the core problem is that we've switched from a static document model to a dynamic application model, yet kept at the center of our focus the idioms and technologies meant for the former.

Re: Back-end languages are coming to the front-end

#296

Earlier quoted context omitted.

I've tried writing a response to you a few times but realizing how complex it is—the real answer to your question is worthy of a long blog post. The core problem is the blurring of the lines between a framework and the underlying technologies of the web (HTML, CSS, and JavaScript). To me, it seemed like a lot of unnecessary complexity was being added just to achieve the common goal of rendering some HTML, styling it…

You say that JSX adds complexity and plain HTMl is simple and obvious, and yet, when I look at joystick, I see a render functions, and non-obvious helpers like `each, when, component`, etc. JSX is really simple to understand for basic use cases and it provides so many benefits: - support for Javascript expressions - transpilation - better error reporting I'd also argue that JSX is overall a LOT more readable than som…

Each renders each item in the array you pass, When renders the html you pass when the condition is met, and Component renders another component. Those are all used inside of a plain string, leveraging JavaScript interpolation (core language feature, no hacks). Again, I want you to be able to go from learning pure JavaScript to Joystick. Assuming you learned about stuff like interpolation and template literals, you’d have an existing mental model for understanding what’s happening. Coupled with writing plain HTML, it’s as close to the metal as you can get.

As for Next, it’s certainly a step forward, but the folder-based routing is another abstraction that obscures the concept of a URL and uses hacks (like weird folder names to support params) to get what is a one line string in something like Express (the router in Joystick). Nothing inherently wrong with that, but it breaks affordances around how the web works. Check out the Next boilerplate on Github on the CheatCode account. Working on that furthered my motivation to build Joystick.

As for syntax highlighting, you can get this by prefixing an html`` before the backticks for your string (I need to spend some time automating this so IDE’s respect the HTML in the string w/o a helper).

To be frank, based on your general tone and username, you sound like someone from one of these projects (or your livelihood depends on them in some way) and got your feelings hurt.

Re: Back-end languages are coming to the front-end

#297

Earlier quoted context omitted.

> I realized just how disconnected JavaScript developers—yes, the "big boys" are especially off in CS la-la land—were from web development fundamentals. HTTP distilled down to its absolute essence is brilliant, but for some reason gets absolutely ignored in the JS world. Can you please elaborate what these areas of disconnect are? I looked at Joystick documentation hoping to find more of your thoughts this topic, but…

> Can you please elaborate what these areas of disconnect are? I'm not the OP but something I have noticed is the JavaScript wünderkind seem to want to completely reinvent web browsers but in JavaScript. They seem to not actually know HTML, CSS fundamentals, or even HTTP. So you end up with frameworks that reinvent everything a browser already gives you (for free) but entirely inside their JavaScript monstrosities. I…

Bingo.

Re: Back-end languages are coming to the front-end

#298
post #288

What's incredibly frustrating about the knocks on JavaScript is that it's not a shortcoming of the language that creates the problems hinted here, but the poorly-considered engineering choices of the popular frameworks. After building my own framework [1] last year, I realized just how disconnected JavaScript developers—yes, the "big boys" are especially off in CS la-la land—were from web development fundamentals. HT…

> That rendering some HTML, CSS, and interactive JS in a browser has been turned into what it has is staggering. I think you are probably ignoring the fact that we have basically converged back to a web monoculture again. A lot of the current frameworks were born out of "Chrome is shitty this way. Firefox is shitty that way. Internet Explorer is shitty this other way. This framework elides over all that."

Not at all. I cut my teeth debugging CSS in IE6 (front-end Vietnam). I’m an old timer. And based on what I’ve learned, what I’ve done in Joystick could have been done in some capacity pre-ES6 and easily in 2014-2015 when most of these frameworks were born.

Re: Back-end languages are coming to the front-end

#299

Earlier quoted context omitted.

Most languages are quite tough to get into. And they require some real learning if you want to do anything trivial. JS is easy to get started (only the browser you already have) and you can do quite a lot without understanding anything about computer science. But it catches to you anyway. I've seen on Twitter someone repelled by the MDN documentation, describing it as not intuitive. I realized that the documentation…

JavaScript used to be easy to get into (and I suppose technically still is) but the old days of open a console and type in some code or put a src file at the top of the HTML page seem to be gone for most practical and production purposes. Now it's typescript and webpack and a 200 hour course to get started with React. And big teams tripping over each other making components. The funny thing is, I don't know that the…

Yes. What you describe is where I started out and I watched it devolve over the last 15 or so years (why I decided to take a swing at building Joystick—it was getting too ridiculous to keep entertaining). I think so many started out in the chaos that they don’t know what the “before time” was like and don’t have perspective on how complex it’s gotten (it’s just normal to them).

Re: Back-end languages are coming to the front-end

#300
post #291

Earlier quoted context omitted.

Pretty much any wasm language will require a JS runtime somewhere if you’re going to do substantial things with it, so might as well learn it either way.

Really though? I think wasm app will be able to write to DOM so no JS required, it can't yet but seems inevitable.

I’m not an expert, but DOM APIs seem particularly suited to JavaScript. There is probably a way to handle it via Wasm, but this is a bit like avoiding learning C when writing native code.
Post reply on HN