Live data from Hacker News

State of JavaScript 2021

2021.stateofjs.com

171–180 of 245 posts

Re: State of JavaScript 2021

#171
post #14

Earlier quoted context omitted.

Vue.js is heavily magic and doesn't support basic React concepts like render props. How is that possibly a popular framework? Like any "easy" library, you'll run into hard situations with no solutions.

What do you mean? Vue has slots which is similar to render props. https://vuejs.org/guide/components/slots.html#scoped-slots

After a read, I guess it does. A developer I respected claimed it was not easy to pass components down like this. Now I no longer respect him.

Also, I still don't respect vue. Look at this abomination

    
      {{ text }} {{ count }}
    

Re: State of JavaScript 2021

#172
Preact was interesting to see. Loads of "not interested" comments, but very well liked from people who tried it.

It's a library that should get more love than it does.

Re: State of JavaScript 2021

#173

Not familiar with much front-end work - can anyone give insight to what's gone on with Ember?

Ember today is too little too late.

As someone else said, Ember was never that popular, and the community doesn't really strive to be popular. This is, however, a dilemma, because you need some popularity for your framework to have people interested in working on it.

Ember was cool initially because, if you knew Rails, then you could get what Ember was about even if it was confusing at times.

There were some choices made early on that even the Ember core team implicitly admits weren't so good, and they spent a lot of time moving away from those choices. As time went on, more developers became interested in other libraries like React because it's simpler and obscures much less of what it's doing under the hood. Ember decided to sit on the sidelines and take the time to figure out what to do next. This was both a good and a bad thing for Ember in the long run.

The long road to "modern" Ember got us the Glimmer component system, which is much nicer than the classic reactivity system, and it also gave us an improved templating system to classic Handlebars. Usability in the space of the runtime code was much improved, but this seemed to be at the cost of the build step being up to snuff with every other emerging JavaScript toolchain. Broccoli does some interesting things, but literally no one outside of Ember uses it because not only is it poorly documented but it's inferior to Webpack in a lot of ways. If an add-on that integrates Ember builds with Webpack wasn't made, Ember would be totally dead by now. Because Broccoli is niche and kind of hard to understand, even the developers who managed to figure out how to create add-ons for Ember didn't seem to understand the potential performance penalties of making a library into an Ember add-on as opposed to finding some other way to include code. Somehow a lot of Ember apps become really slow to build in Ember CLI, and that's partly because so many apps import a bunch of Ember-specific add-ons that are all doing something with the Broccoli tree.

Now there's Embroider, but we've been hearing about Embroider forever now, and it's neither reached v1.0 or the compatibility level it's advertised (in my experience). Not only is it too little way too late but it's still too complicated a way to simply bundle and share code between Ember projects. Trying to be compatible with Broccoli was a complete mistake and it should have been an opportunity to completely leave behind the cruft of v1 add-ons.

There's also some failed promises along the way. This thing called "module unification" which was going to greatly change but also improve the directory structure of Ember apps was sold as being something to look forward to in "Ember Octane", only to be dropped long into the process because for some reason it became infeasible. What does that tell you about Ember when the developers of Ember can't even change their own directory structure? Eventually they introduced template co-location, which was a good enough improvement over having a separate directory for templates, but that's another example of too-little-too-late. How is anyone supposed to be excited for template co-location when we were promised something better and every other framework is already more flexible to start with?

No matter how hard it tries, Ember is stuck in the past. Everyone has seen better at this point.

Yes, you can build ambitious web applications with Ember, but at least in other frameworks you can more easily figure out how to do something without getting stuck somewhere deep in the endless stack of framework code and being baffled. Yeah, Ember Data will "just work" for you until you want to do something like also fetch nested resources (example: /users/123/posts/456), which I'm pretty sure is still hard to do without some workarounds. Yes, the router is pretty great until you realize you need a wildcard segment in your URL.

But why would you do that when you could have used that time to just write your own solutions or swap out different libraries if you were using most other frameworks?

In Ember, you hardly get that choice because you have to use Ember CLI, you have to use Broccoli, you have to use the Ember router, you have to use the Ember/Glimmer reactivity model, and so on, and so on. With Ember, you're either all in or you're all out, more or less. Yes, technically you can write your way out of these things, but like I said, at that point you might as well just write your own framework using any number of other tools out there.

All in all, Ember isn't bad. It's just another tool like anything else. I've worked with it on apps with millions of users worldwide. There are still things I like about it. That said, I don't find it surprising that Ember is declining in relevance. With React and Svelte on two ends of the frontend continuum and Vue somewhere in the middle, there just isn't a big demand for what Ember provides. In order to do that, it would need to accept that it's lost and do things to entice new users, which would mean completely abandoning

Re: State of JavaScript 2021

#174
post #136

"Popularity contest" describes the front-end community in a nutshell. I've been in software development since before the web was a big deal. Never have I seen any language have more "high school popularity" style personalities hawking whatever the "best" library is... without any knowledge or wisdom. Any attempt to point out why some of these technologies or approaches are a "bad idea" leads to massive downvote train…

Well, if developers would approach their task with knowledge and wisdom, then the abomination that is Node.js would never have been unleashed on the developer community. But here we are: "yay, Google has written a blazingly fast JS engine, so now we can use JS in the backend!" - never once stopping to question if this is really a good idea...

Hum... Creating node was a good idea. Using it like people use nowadays that wasn't.

There are plenty of reasons why you may want a standalone JS interpreter.

Re: State of JavaScript 2021

#175
post #136

"Popularity contest" describes the front-end community in a nutshell. I've been in software development since before the web was a big deal. Never have I seen any language have more "high school popularity" style personalities hawking whatever the "best" library is... without any knowledge or wisdom. Any attempt to point out why some of these technologies or approaches are a "bad idea" leads to massive downvote train…

Well, if developers would approach their task with knowledge and wisdom, then the abomination that is Node.js would never have been unleashed on the developer community. But here we are: "yay, Google has written a blazingly fast JS engine, so now we can use JS in the backend!" - never once stopping to question if this is really a good idea...

I don't blame the language for what the community does though. I mean, I've suffered through VBScript. I know how bad a utility/glue language can really be. Netscape did have it running on the server way back in the 90s too. Should we create services with it? I dunno. For some things, I really don't care. Should we be tossing it CPU intensive, multiple db query traffic? No. No it doesn't do well at all in those scenarios. I've done enough PHP (really bad PHP) to realize that any time we lower the bar of entry, we're going to get a lot of folks with no programming background. That's actually pretty cool! What's not cool is getting folks who have no background, and refuse to listen to anyone who does.

Re: State of JavaScript 2021

#176

Earlier quoted context omitted.

Frontend development is not a great career path; it's mostly a young people's game. I know senior react developers in their thirties that are increasingly struggling to find well paying gigs because they are competing with young people at half their rate. A lot of frontend developers transition to full stack js and from there to doing more serious things using Go, Rust, or whatever. That's where the money is. It's a…

Do you have any data to back this up at all? My experience is opposite, many backend jobs have been replaced by different BaaS', while most of the programming is done on the frontend. If you hire a younger developer half your rate, you get what you pay for. Complicated frontend projects needs good seniors, and they get paid their fair share. IME demand for experienced and talented frontend seniors have never been hig…

> Complicated frontend projects needs good seniors, and they get paid their fair share.

Yes, but "needs" is different from "gets". I'm sure there are many places that hire experienced frontend developers, but the rule is that it's more a market of lemons than developers in general, so people jump out with time.

Re: State of JavaScript 2021

#177
post #22

I read this report every year. This year it feels the most like it's driven by hype (and marketing, hi Vercel!). In my professional and personal experience, react has never been better to use (in terms of features, DX, maturity, community, productivity), yet if you look at the "popularity" (oh dear) graph, it's basically just describing how older tech slides down while newer shiny tech comes in and is instantly the m…

I’ve got quite a lot of experience with non-IT enterprise, in Denmark, and almost nobody uses those fancy new technologies around here. Over the past few years everything has moved to typescript (typically with react, but some angular remains from older decisions), dotnet, Java, php or c++. That’s basically it. The only job listing to even mention things like Rust in the region where I live in the past 5 years is Goo…

While non-IT enterprise is a big job marked, I guess the HN crowd leans towards the startup scene. There are plenty of python/django and ruby on rails and node companies in copenhagen :-)

Re: State of JavaScript 2021

#178

JS and TS brought so much happiness to me for years. But I found it extremely difficult to constantly have to "decide" between X and Y. In the backend, I went all in with Golang and oh my... Now I just code. In the frontend, Svelte is a godsend. No longer need to find "React-friendly" libraries. Simple JS works for the most part. Not ideal but great versus React for the types of admin panels I build.

> JS and TS brought so much happiness to me for years. But I found it extremely difficult to constantly have to "decide" between X and Y. At least for me it was never a decision once I found TS, TS always got chosen. My spicy opinion in the JS space is that Typescript is better in every single way over Javascript, it is a superior language. Typescript IMO should be merged into Javascript, how anyone develops with jus…

TS has a lot of DNA from the failed ES4 attempt.

I think we need something quite a bit more radical than Typescript.

We have "use strict" and I think we need to add "use types" too.

In that mode, we need to disallow the more dynamic parts of JS. They add TONS of typing headaches resulting in poorly-typed projects and they hurt performance too.

This could allow for a much more simple type system and allow a path forward where things like type coercion aren't a thing.

Re: State of JavaScript 2021

#179
post #39

Only 4.5% of respondents said that they are unhappy with the state of front end frameworks. That satisfaction level is "official approval of a president in a dictatorship" high.

If you worked on the frontend through the framework wars from 2005-2015, you'd understand why having just 3-4 frameworks that have been around 5-7 years is an amazing state of affairs.

Maybe it's not good overall, but it's the best that the frontend has ever achieved.

Re: State of JavaScript 2021

#180

Proxies are cool. I use them in github.com/thebinarysearchtree/artwork which I haven't released. That libraries tag line is "you wanted less javascript and more html, so we delivered - artwork, the 100% javascript and css front-end framework". Anyway, I use proxies when I want a bunch of divs with classnames. You just do const { container, heading } = divs; and then container is assigned to an HTMLDivElement and the…

How badly do proxies affect performance?
Post reply on HN