Live data from Hacker News

Why are there so many JavaScript frameworks?

news.ycombinator.com

11–20 of 46 posts

Re: Why are there so many JavaScript frameworks?

#17

Unlike many pieces of software the shortcomings of JavaScript frameworks are obvious and numerous. Frankly they aren't very good. Large numbers of people using them are going to think "I could do better myself" and some of them actually do.

A lot of people bill Haskell or OCAML as ideal languages.

But there's a hell of a lot of people, from kids to grandparents, who actually code in JS.

Re: Why are there so many JavaScript frameworks?

#18
Javascript language was originally written in ~10 days by Brendan Eich[0]. The limited time meant that it was a bare bones primitive language that did not include an opinionated and standard GUI library.

Compare that to how Java and C# gestated internally for years at Sun and Microsoft before the v1.0 of the respective languages were released. With more development time, they included a bigger standard library. Java has AWT (and then Swing), and C# had WinForms (and then WPF).

Yes, one could argue that Java and C# also have "UI frameworks" on top of their base GUI technology but it's nowhere near the same chaotic degree as Javascript's landscape.

Javascript is so barebones that people made frameworks for:

- manipulating DOM elements (e.g. JQuery, etc)

- simulating classes & objects

- calculating dates (e.g. Momentjs)

- UI and state flow (Vue, React, Angular, etc)

In Java/C#, you can subtract 2 dates in using their standard library of datetime functions. Javascript can't do that easily[1] and programmers end up rummaging through github repos and/or npm for libraries that multiple people reinvent. Another famous example of Javascript's small standard library is not having a builtin leftpad().

[0] https://www.google.com/search?q=javascript+Brendan+Eich+10+d...

[1] picture those variations in Stackoverflow answers leading to different not-invented-here Javascript datetime libraries: https://stackoverflow.com/questions/3224834/get-difference-b...

Post reply on HN