Live data from Hacker News

React vs. Angular 2

docs.google.com

41–50 of 87 posts

Re: React vs. Angular 2

#41
post #20
post #5

Earlier quoted context omitted.

Honestly? I would start with React. The way Angular 2 has been going, they are adopting a lot of new ideas from React.

The team I'm apart of started a project 2 months ago. We chose React and Redux over Ember, Angular, et al. A main decision factor was that we needed the server to render our initial HTML, neither Angular nor Ember can achieve this easily, we'd most likely have to lean on a third-party service. Angular looked particularly unattractive with Angular 1 being as good as dead and we didn't feel confident starting with Angu…

Ember has a solution for server-rendered HTML, called 'Fast Boot'. It can be used both for speedup (quite obvious, given the name) and for e.g. SEO-purposes (though I think Google is pretty good at crawling JS these days).

It's still at a very early stage though (alpha), but I think it has great promise. More details in the recent 2.3 beta changelog:

http://emberjs.com/blog/2015/11/16/ember-2-2-released.html#t...

(Not saying you made the wrong choice, it sounds very reasonable -- Ember's solution isn't ready for use just yet. But thought I'd note this here in case others have the same thought)

Re: React vs. Angular 2

#42
post #32

Earlier quoted context omitted.

> Google (who is backing Angular) doesn't have nearly as much skin in the game as Facebook (who is backing React). Excellent point. Here's another "smell" with angular: http://angularjs.org versus https://angular.io/ . The former is AngularJS 2.0 and the latter is AngularJS 1.0... they maintain two websites for two versions of the same framework. It boggles my mind. Who thought it would be a good idea to separate ver…

The reason is because Angular 2 merges Angular Dart and AngularJS into one framework. Can't say I have first hand knowledge, but I have heard that Angular dominates internally at Google. UI Bootstrap is also separate from Angular (if that is what is meant by quick-and-dirty bootstrap site) - I am currently the lead developer of the project, and not once in my tenure have I deleted any comments, and I know of no insta…

I think the jab at the "quick-and-dirty bootstrap site" was about the Angular docs (which seem to use bootstrap or at least look that way), not the UI Bootstrap project.

Re: React vs. Angular 2

#43
post #33
post #20

Earlier quoted context omitted.

The team I'm apart of started a project 2 months ago. We chose React and Redux over Ember, Angular, et al. A main decision factor was that we needed the server to render our initial HTML, neither Angular nor Ember can achieve this easily, we'd most likely have to lean on a third-party service. Angular looked particularly unattractive with Angular 1 being as good as dead and we didn't feel confident starting with Angu…

The problem is that the surface of Angular is incredibly complex. With React, you have components, which are just things (classes or functions) that convert a set of properties to a subtree of more components (ideally mostly ones that directly represent DOM elements) and do so deterministically and reproducibly. With Redux you just have objects ("actions") representing changes to your application state and functions…

Great comparisons. What's good resources to start learning react + redux?

Re: React vs. Angular 2

#44

Isn't this like comparing apples to a fruit salad? Quoting from the React website, "Lots of people use React as the V in MVC," whereas Angular is the whole kit `n' kaboodle. I thought React was supposed to be used in tandem with a Flux-like component that stores the state of the application, thereby allowing the developer to adopt the functional reactive programming style. Anyways, I think React will be short lived,…

I don't know about that. You can write controllers and models in react, it is just an anti-pattern. The same is true of Angular. Angular is usually used as the V, and a little bit of the C with protected controller functionality server side, and APIs for public model interfaces and public controller api endpoints.

Re: React vs. Angular 2

#45
post #40
post #37

Earlier quoted context omitted.

IMO, if you need to generate a lot of boilerplate code for your React app, the app is likely incredibly boring and generic, or your code is unnecessarily bloated, or both.

It's not just boilerplate code. It's choosing your build system, your hot-reload plugin, whether you want to use jsx or something else, whether you want isomorphic rendering (so that the server will render the initial state of the page, instead of delivering a blank page with a tag), etc.

True, but normally for React that should boil down to an opinionated set of defaults (e.g. React+Redux and probably react-router using Babel and probably Webpack) plus a small number of files (e.g. Babel and Webpack config files, maybe an ESLint config file, the obligatory package.json file, and a few empty folders for components, actions and reducers to get started) but not much actual code.

Re: React vs. Angular 2

#46
- Dojo

- Prototype

- jQuery

- Ember

- ExtJS

- YUI

- Knockout

- Angular

- React

- place for the next cool framework in the upcoming two years

Re: React vs. Angular 2

#47
post #33

Earlier quoted context omitted.

The problem is that the surface of Angular is incredibly complex. With React, you have components, which are just things (classes or functions) that convert a set of properties to a subtree of more components (ideally mostly ones that directly represent DOM elements) and do so deterministically and reproducibly. With Redux you just have objects ("actions") representing changes to your application state and functions…

Great comparisons. What's good resources to start learning react + redux?

I'd suggest starting with the React docs:

https://facebook.github.io/react/docs/why-react.html

And once you understand React you can dive straight into the Redux docs:

http://redux.js.org/index.html

I found it useful to actually read the Redux docs page-by-page (at least the introduction and basics) but it also links to some tutorials.

I actually had to read the basics and advanced sections several times before it fully clicked. It helps if you don't expect Redux to be super complex -- like React it does just one thing: manage your state by responding to actions. If React is the V in your MVC, Redux is the M.

Re: React vs. Angular 2

#48
post #32

Earlier quoted context omitted.

> Google (who is backing Angular) doesn't have nearly as much skin in the game as Facebook (who is backing React). Excellent point. Here's another "smell" with angular: http://angularjs.org versus https://angular.io/ . The former is AngularJS 2.0 and the latter is AngularJS 1.0... they maintain two websites for two versions of the same framework. It boggles my mind. Who thought it would be a good idea to separate ver…

The reason is because Angular 2 merges Angular Dart and AngularJS into one framework. Can't say I have first hand knowledge, but I have heard that Angular dominates internally at Google. UI Bootstrap is also separate from Angular (if that is what is meant by quick-and-dirty bootstrap site) - I am currently the lead developer of the project, and not once in my tenure have I deleted any comments, and I know of no insta…

I'll engage because I'd like to get to the bottom of this.

> The reason is because Angular 2 merges Angular Dart and AngularJS into one framework.

One technical reason for a seismic marketing change does not inspire confidence. Is Angular, Angular JS 2.0? Is AngularJS, AngularJS 1.0? Incoherency at the starting gate will not win new converts.

> Can't say I have first hand knowledge, but I have heard that Angular dominates internally at Google.

Company wide usage is fine; the real test is in production outside of the company. Unfair, but if the framework wants to dominate the front-end, then that is its lot in life. FB probably realized how fast that moving goal post would be and resolved limit their scope with React.

> UI Bootstrap is also separate from Angular

It's not the Bootstrap that is bad, but how they use it. At the time in 2013 (and even now) the presentation of the Angular website is pretty ugly. Yes, there are coders who don't care for little UI flourishes. Yes, a pretty framework with bad code is still a bad framework. Yet, when comparing AngularJS's website with competitors like React or Ember or even Backbone, it seems their developers care more for making their software look good. Design as a lagging indicator of quality, perhaps.

> I am currently the lead developer of the project, and not once in my tenure have I deleted any comments

You probably joined after this debacle. Strange that you don't know about it:

http://angularjs.blogspot.com/2013/11/farewell-disqus.html

The reason for removing all the comment threads was ostensibly for easing concerns of moderation. Yet, interestingly, the documentation was not updated for several months after the comments removal. This means that, for several months, all the fixes, suggestions, and the like were no longer viewable for the current version of AngularJS. The solution put forward by the developers for this long interim was to... use Stackoverflow.

Needless to say, Angular users were less than enthused. That the devs didn't seem to engage with the community before or after regarding the sudden change, made me question a number of things about the project.

Re: React vs. Angular 2

#49
post #32

Earlier quoted context omitted.

> Google (who is backing Angular) doesn't have nearly as much skin in the game as Facebook (who is backing React). Excellent point. Here's another "smell" with angular: http://angularjs.org versus https://angular.io/ . The former is AngularJS 2.0 and the latter is AngularJS 1.0... they maintain two websites for two versions of the same framework. It boggles my mind. Who thought it would be a good idea to separate ver…

The reason is because Angular 2 merges Angular Dart and AngularJS into one framework. Can't say I have first hand knowledge, but I have heard that Angular dominates internally at Google. UI Bootstrap is also separate from Angular (if that is what is meant by quick-and-dirty bootstrap site) - I am currently the lead developer of the project, and not once in my tenure have I deleted any comments, and I know of no insta…

> Can't say I have first hand knowledge, but I have heard that Angular dominates internally at Google.

Yes, Angular is better than Closure, the politically acceptable alternative for Google-internal.

Re: React vs. Angular 2

#50
post #45
post #40

Earlier quoted context omitted.

It's not just boilerplate code. It's choosing your build system, your hot-reload plugin, whether you want to use jsx or something else, whether you want isomorphic rendering (so that the server will render the initial state of the page, instead of delivering a blank page with a tag), etc.

True, but normally for React that should boil down to an opinionated set of defaults (e.g. React+Redux and probably react-router using Babel and probably Webpack) plus a small number of files (e.g. Babel and Webpack config files, maybe an ESLint config file, the obligatory package.json file, and a few empty folders for components, actions and reducers to get started) but not much actual code.

>an opinionated set of defaults (e.g. React+Redux and probably react-router using Babel and probably Webpack) plus a small number of files (e.g. Babel and Webpack config files, maybe an ESLint config file, the obligatory package.json file, and a few empty folders for components, actions and reducers to get started)

See, but all of that is highly non-trivial and everyone has different opinions.

Post reply on HN