Live data from Hacker News

Opinionated Comparison of React, Angular2, and Aurelia

github.com

51–60 of 169 posts

Re: Opinionated Comparison of React, Angular2, and Aurelia

#51
post #32

Earlier quoted context omitted.

I found it interesting and he specifically pulled in react-router to get the balance needed for the comparison to be valid.

When your application is just some views plus some routing - then that would be a fair comparison. But in most real world situations (SPA) it's much more: Form validation, Data Fetching, Unit Testing, Component styling, Translations, Modularization, ...

Obviously therefore nobody writes real world SPAs with React.

/s

Re: Opinionated Comparison of React, Angular2, and Aurelia

#53
post #29

I've spend a lot of time evaluating Angular + Ionic, Vue and React. My goal is to rewrite my webapp as a SPA with complimentary mobile apps. Maximum code sharing would be nice. I'd like to add to the discussion what I learned and also add Vue for comparison. Vue felt less intimidating at first, whereas React seemed to be overly complicated. Truth is, both are actually quite similar. The problem is that every single t…

Isnt Redux about using components to dispatch actions, and all the logic happens in the reducers for the store? So, the Model part is not inside the react view components which are just used for display. If you have uncontrolled components(React terminology for forms with extra data not handled by props), then form validation might require some processing in the components.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#54
post #19

> Save the global components off as global variables and just use them ... When my ActivityIndicator component mounts, it saves itself off to a global. Any code can import busy and run busy.start() and busy.stop(). What is the story that FP folks need to tell here, so that people don't do things like this?

The big bugbear is global, mutable state. Global immutable state is not nearly as much of a big deal. Local mutable state, likewise.

Once that global immutable state turns out to be less than immutable (e.g you introduce the ability to change program configuration at runtime), you should look for an efficient way of do DI, which in functional programming just means "how do I pass the same first argument to a lot of functions at the same time". The Reader monad is probably the most archetypally FP approach to the problem.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#55
post #30

I'm working on my first Angular2 app (inside Ionic 2) and have not been overly impressed. Most (all) of these will be first-project-pain but I'll list them anyway: * The massive coupling in app.module.ts and app.component.ts * Coming as a backend dev, the coupling of services to the view layer * Terminology of service/provider, and the general standard of documentation (3rd parties are far better than the official do…

"* Having a definite 'Angular way' of doing things, but not documenting it explicitly"

Here you go https://angular.io/docs/ts/latest/guide/style-guide.html

Re: Opinionated Comparison of React, Angular2, and Aurelia

#56

> There are a few more frameworks I would have loved to try, including Polymer and Vue.js. There just wasn't enough time to do a deep dive with all of them. I hope he gives Vuejs a try. As a javascript beginner, who tried Angular, Angular2, A bit of React and VueJS, I just loved the flexibility and approach of VueJS. I was instantly productive thanks to the amazing documentation and vue-cli that just worked out of th…

Agreed.

I've used Angular 2, React+Redux, and now Vuejs on different projects (and on personal projects, stuff like om, elm, etc).

Vuejs feels like they cheated somehow.

For people in Redux-land: they took the reactivity of MobX and gave it Redux' level of debuggability. One important way, I think, is that Vuex formalizes the 'actions-dispatching-actions' use case of Redux middlewares (which redux says 'is not a part of the architecture, but is important enough to be in core'); in Vuex, all action creators can dispatch other actions, and it throws an error in dev mode if you try to mutate state in a non-safe way.

I've used redux for a couple of years, and felt the pain of juggling different libraries (especially the struggles to manage router state) -- Vue is a delightful experience. Its chrome plugin is ridiculously useful; its documentation always seems clear and helpful; things work together.

I can't wait to see what Alibaba does with Weex -- essentially React Native for Vuejs. I did a test spike with it a month ago, and am trying to keeping tabs on it ...

Re: Opinionated Comparison of React, Angular2, and Aurelia

#57

> There are a few more frameworks I would have loved to try, including Polymer and Vue.js. There just wasn't enough time to do a deep dive with all of them. I hope he gives Vuejs a try. As a javascript beginner, who tried Angular, Angular2, A bit of React and VueJS, I just loved the flexibility and approach of VueJS. I was instantly productive thanks to the amazing documentation and vue-cli that just worked out of th…

The vue looks good.

Yeah, Vue.js is for people who make things. React is for enterprises who don't seem to mind being 3 months late shipping basic stuff.

In react everything is done in the template language. It's a sort of reverse template language, that doesn't even really use proper html for things. So weird.

Vue is just all together, and is based on web standards. Not a weird thing by facebook enterprise developers who think that documents are dead and everything should be a slow loading monster single page thingo. Vue does components properly.

React components aren't. They tell you to move state from the child to the parents. That's not a component, and probably one of the biggest reasons many of the react projects are giant messes.

React is sort of like the old enterprise thing that doesn't solve any of the real issues with Angular style frameworks.

React does have a pretty good marketing budget though. Lots of evangelists paid to talk it up. Plus lots of developers who have invested so much time learning useless non-standard framework stuff. Also, there's plenty of freelance gigs cleaning up failed messy react projects.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#58
post #32

Earlier quoted context omitted.

I found it interesting and he specifically pulled in react-router to get the balance needed for the comparison to be valid.

When your application is just some views plus some routing - then that would be a fair comparison. But in most real world situations (SPA) it's much more: Form validation, Data Fetching, Unit Testing, Component styling, Translations, Modularization, ...

All of which is easily done using plain old Javascript (with the exception of unit testing).

Re: Opinionated Comparison of React, Angular2, and Aurelia

#59
post #50

Earlier quoted context omitted.

I wish the author had tried Polymer because it's the most underrated one. I just love the way Polymer components declare/consume dependencies (as tags in the component file) and connect all sub-components in the template markup via attributes - It makes data binding relationships between components and their children very clear. Polymer is basically an inverted version of React (and it achieves a similar outcome). In…

In React there are no templates, just component trees.

Everything in react is done in the template language.

This react below is not JavaScript... it's a reverse template language with a mix of not-quite-html and not-quite-JavaScript. jQuery style code is nicer than that! I hate the enterprise boilerplate in react projects. No wonder they're all failing!

  class Square extends React.Component {
    constructor() {
      super();
      this.state = {
        value: null,
      };
    }
    render() {
      return (
         this.setState({value: 'X'})}>
          {this.state.value}
        
      );
    }
  }
It's like facebook is a php shop or something... Oh wait. Not for me thanks.
Post reply on HN