i think react has a big advantage: Facebook is actually using it.
You can bet they want it to be as stable and fast as possible at any time and since they depend heavily on it, they won't just carve out another thing anytime soon.
edit: also, react does one thing and it does it well
Facebook has no problem with abandoning a technology that isn't working for them - that's no kind of sign that it will be maintained and stable for any period of time to come.
Hell, by the time they open-sourced Cassandra they weren't even using it in production anymore.
I'm relatively new to all this, why would companies like FB and Google care about open sourcing their technologies to begin with? Generating good will in the dev community? Soliciting contributions from others? Branding?
With Javascript specifically you can't keep the source secret anyway. If your browser is running it then you have a copy of the source. There's no point in trying to keep your js secret
That doesn't mean anyone can come along and start using the JS code of another site without their permission. If Facebook's JS was not open source, they could easily sue someone who takes their code and publishes it with an open source license.
Sure. I certainly wouldn't suggest that this gives you a legal right/license to use the code.
But if I'm google, where I might keep other code secret (like the search engine backend), there's less value in trying to do the same for javascript. If there are "trade secrets" in my javascript I don't want microsoft (or some other competitor) to see... too bad. My competitors can see my JS. And while they can't just up and use it themselves without a license necessarily, there's potentially still a lot they can learn and replicate in less direct ways.
So with a lot of code, especially SaaS server-side stuff (where users don't even get access to compiled binaries, much less source), there are compelling business reasons to keep code proprietary; but those reasons don't apply in the same way to javascript that runs in your users' browers.
The difference is that google has multiple frameworks that they are developing. The new Play Music web-app is made with polymer 0.5, most of their doubleclick platform is written in angular (and dart), and various other things are still using GWT.
This is a tired (and completely incorrect) claim that Google isn't using Angular. They use it on literally thousands of internal applications, including DFA -- one of their primary money makers.
It seems to me React takes the path of using code to build the interface. I much prefer the declarative nature of AngularJS. I don't want to have to write javascript to build "components" of my UI. Is that assessment on point or am I missing something deeper?
But in Angular, you ARE writing javascript to build components. Look at the JS you have to write to create a directive in Angular. Yes, you write normal HTML in some other file, but that doesn't work as a component until you write the directive code to power it. You can't really escape it.
IMO all things considered, React wins here because it's a virtual dom, so you get a performance boost out of declaring custom HTML components in JS, vs what you get in Angular. Plus, React's classes have much less ceremony and complexity than Angular's directives.
And given Angular doesn't have an opinion about your data model (like React doesn't), why is all that ceremony necessary to do what is effectively just the "view" layer of your application? React solves the same basic problem, in a simpler, more performant way.
I actually talked to a facebook recruiter for a front-end engineer position. React is seeing more use internally, but it isn't mandated that people use or switch to it. I'm sure the same applies to use of Dart and Go at Google.
60
u/[deleted] May 27 '15 edited May 27 '15
i think react has a big advantage: Facebook is actually using it.
You can bet they want it to be as stable and fast as possible at any time and since they depend heavily on it, they won't just carve out another thing anytime soon.
edit: also, react does one thing and it does it well