News for hackers. Stuff that matters.
Re:What's TypeScript compiling? Use a treemap to find out by noud on Monday August 01, 2022 @12:32PM (#32308571)
The more I work with advanced JS frameworks, the more I think I could also have done it with just vanilla javascript (with some jquery). Webapps I made 10 years ago where no less responsive than the webapps I make now. Nor do they take more time to create. The only difference is the size of the applications. They significantly increase with all overhead of frameworks. I wouldn't be surprised when webapp development will return partly to what it was a decade ago, where small (stand-alone) libraries are preferred to these huge, batteries-included, frameworks.

edit: With some exceptions. Some webapps are huge. They are near impossible to program without a solid framework. But this is no more than 5% of all the webapps I create.

Re:What's TypeScript compiling? Use a treemap to find out by lukevp on Monday August 01, 2022 @01:00PM (#32308976)
React and react-dom are < 100kb compressed, which is pretty much how big jquery is. Preact is even smaller. Which framework are you talking about that’s huge and batteries-included? if you want to drop react in a script tag and write JS that’s compatible with all browsers, you can do that too.
Re:What's TypeScript compiling? Use a treemap to find out by fwip on Monday August 01, 2022 @01:33PM (#32309394)
I got curious and looked it up, looks like Jquery is about 30kb compressed & minified nowadays: https://mathiasbynens.be/demo/jquery-size
Re:What's TypeScript compiling? Use a treemap to find out by helloguillecl on Monday August 01, 2022 @02:52PM (#32310520)
If you are running a client side app generally you’ll need many other libraries as well. Just to name a few: GraphQL, i18n, Google Firebase, Date parser/formatter, Numbers, etc.
Re:What's TypeScript compiling? Use a treemap to find out by nawgz on Monday August 01, 2022 @03:17PM (#32310822)
> GraphQL

What libraries does this require? I'm just issuing fetch requests and getting back JSON. Apollo is absolutely NOT EVEN CLOSE TO required to do GQL...

Honestly, both GraphQL and everything else listed seems pretty orthogonal to the original discussion of frameworks... Whether you used VanillaJS or React or a server-rendering platform, your choices of internationalization & datastores & auth & functionality require code...

Re:What's TypeScript compiling? Use a treemap to find out by helloguillecl on Monday August 01, 2022 @03:25PM (#32310910)
If you bring HTML rendering to the client you will need a ton of other libraries as well.

There are several GraphQL libraries supporting different features, of different sizes.

Re:What's TypeScript compiling? Use a treemap to find out by ptx on Monday August 01, 2022 @04:42PM (#32311776)
> If you bring HTML rendering to the client

The client being the browser? Isn't HTML rendering what it does? What kind of HTML rendering are you talking about?

Re:What's TypeScript compiling? Use a treemap to find out by helloguillecl on Monday August 01, 2022 @05:35PM (#32312335)
You render HTML with React or PHP.

The browser renders a webpage using the rendered HTML, CSS and sometimes Javascript.

Re:What's TypeScript compiling? Use a treemap to find out by ptx on Monday August 01, 2022 @05:44PM (#32312432)
Ah, I see. I don't see why you need tons of libraries, or any libraries at all, for that though. (And you don't even need to render any intermediary HTML if you use the DOM API.)
Re:What's TypeScript compiling? Use a treemap to find out by nawgz on Monday August 01, 2022 @04:09PM (#32311427)
I don't really follow your overall point. The discussion was around how "frameworks are huge", and now you're saying... You need other libraries than the framework for HTML rendering?

> There are several GraphQL libraries

And some of them are tiny, which is antithetical to your previous point...

Re:What's TypeScript compiling? Use a treemap to find out by helloguillecl on Wednesday August 03, 2022 @08:31AM (#32330818)
No discussion is about the architectural model, not only frameworks.

Do client side rendering of HTML and you’ll need libraries, just like you do on the backend.

Re:What's TypeScript compiling? Use a treemap to find out by nawgz on Wednesday August 03, 2022 @02:54PM (#32335470)
The frameworks ARE the HTML rendering. We're really running in circles about nothing in particular here, I think it's ok to leave.
Re:What's TypeScript compiling? Use a treemap to find out by stevenally on Monday August 01, 2022 @01:37PM (#32309435)
I agree. Every time I try out a framework, it always turns out to be easier to create vanilla Js for the few functions that I actually need. The one exception being JQuery. That was useful.
Re:What's TypeScript compiling? Use a treemap to find out by nawgz on Monday August 01, 2022 @03:19PM (#32310836)
I feel comments like this must come from an individual who should actually be using SSR (Server Side Rendering) and just spitting out HTML. There is no world that composition of components - the #1 reason to use frameworks - can be solved by a "few functions", and anyone who is building serious UIs will tell you you're pretty boned without composition.
Re:What's TypeScript compiling? Use a treemap to find out by stevenally on Friday August 12, 2022 @12:40PM (#32440965)
My UI is almost certainly more “serious” than yours. But it was started in 2004, long before frameworks were invented….. Just saying vanilla is not nearly as difficult as people think.