News for hackers. Stuff that matters.
Re:Ask HN: I'm away from the software industry since 2017; w... by muzani on Sunday February 23, 2020 @10:01AM (#22397096)
I think React is "winning" the framework competition, if we're judging from number of jobs. It seems like a business decision for many people - React can make websites and apps, and it's probably easier. I haven't had enough experience to say, but it seems like Java; not necessarily the best tool, but something easy to hire for.

Flutter is also coming in hard on mobile. Also not something I've had enough experience to comment on, but there's also little criticism, which suggests it's a good thing.

Re:Ask HN: I'm away from the software industry since 2017; w... by MarkMc on Sunday February 23, 2020 @12:08PM (#22397979)
This view is supported by looking at question counts on Stack Overflow over time: http://sotagtrends.com/?tags=react-native+flutter+ios+reactj...
Re:Ask HN: I'm away from the software industry since 2017; w... by andrei_says_ on Sunday February 23, 2020 @06:31PM (#22400327)
Could be that there’s also a correlation between the increased complexity of SPAs requiring more hours to accomplish less and thus requiring more jobs...
Re:Ask HN: I'm away from the software industry since 2017; w... by muzani on Sunday February 23, 2020 @07:19PM (#22400557)
I see it as like Java. It's an inefficient language, but it scales well. Inefficiency acts like bureaucracy; it adds stability at the cost of speed. But this applies to something like Angular as well, or even the PHP frameworks.
Re:Ask HN: I'm away from the software industry since 2017; w... by Izkata on Sunday February 23, 2020 @01:38PM (#22398607)
> React can make websites and apps, and it's probably easier.

It was order-of-magnitudes easier than what existed when it was first released. IMO once CSS modules became common (around 2017 IIRC, so OP may not have known about it), that was when React won - we got fully-styled and functional web components for free.

Re:Ask HN: I'm away from the software industry since 2017; w... by BossingAround on Sunday February 23, 2020 @02:08PM (#22398817)
React + TypeScript seems to be to frontend JS as JEE was to Java.
Re:Ask HN: I'm away from the software industry since 2017; w... by hassancf on Sunday February 23, 2020 @04:55PM (#22399801)
JEE to Java? In a positive way? Or as in: this is a humongous framework for what it’s doing (CRUD apps)...
Re:Ask HN: I'm away from the software industry since 2017; w... by BossingAround on Monday February 24, 2020 @02:51AM (#22402371)
It's a good question. As in: If a large enterprise, e.g. a bank or an insurance company, has decided to write an app in Java, they'd choose JEE/TS. That was my original thought.
Re:Ask HN: I'm away from the software industry since 2017; w... by riffraff on Monday February 24, 2020 @02:21AM (#22402252)
I'd think it means "the ubuquitous choice for certain things".

JEE was somewhat disliked by many even at his peak, while react+ts seems to be beloved by most users :)

Re:Ask HN: I'm away from the software industry since 2017; w... by d0mine on Monday February 24, 2020 @06:15AM (#22403131)
What is Ruby on Rails in this analogy?(the thing that replaced JEE monstrosity)
Re:Ask HN: I'm away from the software industry since 2017; w... by BossingAround on Monday February 24, 2020 @06:33AM (#22403213)
There is none. I'd consider Ruby on Rails not relevant nowadays for anything but small shops. You can find exceptions, and for example the whole Gitlab is written in Ruby on Rails, but you can find exceptions for Cobol too.

Personal biases are involved I'm sure. Ruby is fine, Rails is great, I just don't see it used very often.

On the other hand, I still see a ton of JEE being heavily utilized in a number of sectors. Ruby might have in the past taken over Java for small shops that basically create a frontend to a database, but I'd argue that was never true for the enterprise sector.

Re:Ask HN: I'm away from the software industry since 2017; w... by d0mine on Monday February 24, 2020 @07:27AM (#22403465)
I don't believe people would choose voluntarily JEE-way of web development over rubyonrails and the like (django, flask +zillions others) after 2004.
Re:Ask HN: I'm away from the software industry since 2017; w... by mrfusion on Sunday February 23, 2020 @05:03PM (#22399851)
Dumb question but how is react better than jquery? (Im from 2010 instead of 2017 like op)
Re:Ask HN: I'm away from the software industry since 2017; w... by gen220 on Sunday February 23, 2020 @06:14PM (#22400240)
I’d say they scratch different itches. jquery helps you write better js, the same JS you may have been writing for two decades.

React is, from my perspective, an attempt to abstract away a lot of DOM, with the objective of decreasing the size of the solution space to common problems.

The idea is that two engineers working in two different parts of a company would write more or less the same code in react, whereas the jquery solutions would have been very divergent. React enforces patterns and makes it harder to write bad code. That’s the dream, at least!

I wouldn’t compare the two directly, they’re solving totally different problems. Jquery makes writing vanilla JS less verbose. React is more like an engine that’s written in JS and programmable with JS, with the goal of making browser code more composable and opinionated (wrt data flow).

Re:Ask HN: I'm away from the software industry since 2017; w... by ajkjk on Sunday February 23, 2020 @05:12PM (#22399900)
They solve totally different problems. Jquery is a toolkit, react is a framework for how you build an entire app (reusable components that are specified by their props).
Re:Ask HN: I'm away from the software industry since 2017; w... by tootie on Sunday February 23, 2020 @08:01PM (#22400744)
Short answer: yes.

Long answer is that they don't do the same thing. I think jQuery was an incredibly clever and durable library and became so ubiquitous that most of it's most valuable features got folded into the JavaScript and CSS standards and no longer require dependency on a library. React is a modern way of structuring components. It's a fresh learning curve, but it's actually pretty intuitive and very useful.

Re:Ask HN: I'm away from the software industry since 2017; w... by deckiedan on Sunday February 23, 2020 @05:55PM (#22400132)
JQuery is a great set of tools to make websites more interactive with JS.

react is a compiles-to-plain-js framework for building data heavy complex applications in the web browser.

React has its own template language built into your functions, quite opinionated data flow paradigms, and tries to abstract all of the direct attacking the DOM away into passing pure data around.

JQuery gives you better tools for hitting the DOM, but still is just a set of tools, not a development methodology.

This is simplified, obviously, but trying. :-)

Re:Ask HN: I'm away from the software industry since 2017; w... by 80386 on Monday February 24, 2020 @12:21AM (#22401867)
As other people have said, they're different sorts of thing; but the sort of thing React is wasn't as big a deal in 2010. Backbone and AngularJS, two frameworks that are practically Precambrian at this point, both had their first release in late 2010.

In 2010 terms: let's say you want to write a web app. jQuery : your library of useful PHP functions :: React : Ruby on Rails. That analogy breaks down in many obvious ways (React isn't MVC and [modulo JSX transpilation and whatnot] uses the same language as jQuery, Rails is not easy to reason about especially if you're in 2010 and method_missing isn't considered harmful yet), but hopefully the basic idea comes through - library of functions vs. very opinionated framework that facilitates rapid development.

Re:Ask HN: I'm away from the software industry since 2017; w... by jf- on Sunday February 23, 2020 @05:15PM (#22399928)
The main benefit is handling binding and state, and allowing you to easily break your application into a component hierarchy of reusable components. It also has an ecosystem that will let you find packages for most anything you want to do, probably in five different ways.
Re:Ask HN: I'm away from the software industry since 2017; w... by girishso on Sunday February 23, 2020 @08:25PM (#22400857)
They solve two different problems.

jQuery: Add some javascript features like ajax/animation/some DOM manipulation to a (dynamic/static) HTML page.

React: Create the dynamic HTML from scratch, that will still do ajax/animation etc.

Re:Ask HN: I'm away from the software industry since 2017; w... by city41 on Sunday February 23, 2020 @05:11PM (#22399896)
It's debatable if it really is for most sites, especially if you have a good way to generate/write your html. React is a better choice if you are truly building a web app rather than a website.
Re:Ask HN: I'm away from the software industry since 2017; w... by mr_toad on Sunday February 23, 2020 @06:48PM (#22400421)
> especially if you have a good way to generate/write your html.

Server-side React is a great way to generate HTML.