Live data from Hacker News

Opinionated Comparison of React, Angular2, and Aurelia

github.com

141–150 of 169 posts

Re: Opinionated Comparison of React, Angular2, and Aurelia

#141
post #89

It just shows how fast the web moves (or how old I am) that someone can write "Then the Web happened...pages were giant jumbled messes of template and jQuery." There were plenty of new paradigms and new headaches before the JQuery era!

OP here. My first draft of the intro was a long-winded history that went all the way back to Win16 thunking. It was too long and detracted from the point of the article, so I cut it down.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#142

I really like Aurelia so far. It offers me a lot of tools as a developer to develop projects my own way. It feels like working with raw ES6 with a small but powerful library on top. Anyone good Javascript developer can pick it up in a matter of a few hours which makes onboarding very easy. It is still young and small when comparing it to its big brothers but you should try it anyway. It's really a joy to work with. I…

That's the basic tutorial on their website.

No it isn't. The basic tutorial raises a dialog with a close button that the user clicks.

Try raising the dialog, advancing a progress bar, and closing the dialog - all without user interaction. Eg, you're showing progress for an activity that should block out all interaction. It just doesn't work.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#143
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…

> The beauty of React is that it forces you to think in a slightly different way. Vue seemed more accessible for a spaghetti code writer This has been my experience too with React and Vuejs. React requires thorough planning beforehand to write good code. You need to plan the parent-children structure before you jump in. It's easy to write shitty code in react too if you jump in headfirst; resulting in the kind of "en…

I haven't tried React but I felt the complete opposite with Vue. I've never written more beautiful front-end code than what I've done in Vue. Did you use .vue files? Did you use a proper state tree like Vuex?

Re: Opinionated Comparison of React, Angular2, and Aurelia

#144
post #33

Earlier quoted context omitted.

Please please go read the article before making this type of statement.

I did, no worries :)

OP here. Perhaps you overlooked my comment in the intro that my spike solution was the first few screens of my real-world app? The code samples in the article are distilled/simplified from the spike solutions.

My React spike became my real app, and structurally looks pretty much the same (even 2 months of dev later). If you think there are some important concerns that I left out (and I'm sure there are), please be specific so that I/we can learn.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#145
post #89

It just shows how fast the web moves (or how old I am) that someone can write "Then the Web happened...pages were giant jumbled messes of template and jQuery." There were plenty of new paradigms and new headaches before the JQuery era!

OP here. My first draft of the intro was a long-winded history that went all the way back to Win16 thunking. It was too long and detracted from the point of the article, so I cut it down.

I figured ;) Good article.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#146

I really like Aurelia so far. It offers me a lot of tools as a developer to develop projects my own way. It feels like working with raw ES6 with a small but powerful library on top. Anyone good Javascript developer can pick it up in a matter of a few hours which makes onboarding very easy. It is still young and small when comparing it to its big brothers but you should try it anyway. It's really a joy to work with. I…

That's the basic tutorial on their website. No it isn't. The basic tutorial raises a dialog with a close button that the user clicks. Try raising the dialog, advancing a progress bar, and closing the dialog - all without user interaction. Eg, you're showing progress for an activity that should block out all interaction. It just doesn't work.

The search grid that I have built using Aurelia does that.

It's been a while so I don't have the exact code in my head. I simply modified the progress bar of the tutorial so that I can pass a parameters that make it so nothing can be clicked if it is set to "true" and also binds the "disabled" parameter of the buttons in the dialog.

I don't want to be "that guy" but how is any of this hard? Everything is open source, you can modify everything to your requirements and build the parts that don't exist.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#147
post #110
post #97

Earlier quoted context omitted.

The common solution seems to be using redux-thunk to shoehorn all of this business logic into the action creators. I think that's an absolutely terrible idea. IMO redux-thunk muddies up the terms "dispatch" and "action creator" and essentially creates a huge noob trap where new programmers don't even know what an action creator is anymore and they use the wrong terminology for everything. Having said that, I think th…

Thanks for the input. This reflects what my problem is as a beginner with all this stuff: Where do I actually put everything? There's no universal answer of course, but this is why I (and certainly many others) feel intimidated by the JS ecosystem as a whole.

The Redux FAQ has a related entry: http://redux.js.org/docs/faq/CodeStructure.html#structure-bu... .

Out of curiosity, could you give me some examples of what you view as "business logic", and what troubles you're having placing that into a React+Redux app?

(Also worth noting that BigJono and I debated the merits of redux-thunk in another recent thread: https://news.ycombinator.com/item?id=13987613 ).

Re: Opinionated Comparison of React, Angular2, and Aurelia

#148
post #74

My key to success with react-router was to use context and redux to get props to the routed components. Sub-components from there can accept props directly. After a while it feels natural - any necessary information is stored in the store.

This is an anti-pattern unless you actually have shared state between pages. Otherwise it's functionally no different to just having local state on each page and all you have is lots of unnecessary boilerplate. This is way more common than I realised before I started working in teams. Each page does it's own API calls to the server (either directly, or more commonly through some sort of horrible misuse of redux-thunk…

In general, you only need react-router if you have multiple pages with some kind of shared state (ie: a dashboard).

I do know exactly what you are talking about. We do have some single pages that implement the boiler plate just so that they are consistent with the others.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#149
post #89

It just shows how fast the web moves (or how old I am) that someone can write "Then the Web happened...pages were giant jumbled messes of template and jQuery." There were plenty of new paradigms and new headaches before the JQuery era!

OP here. My first draft of the intro was a long-winded history that went all the way back to Win16 thunking. It was too long and detracted from the point of the article, so I cut it down.

I'd actually like to see that history as another post, then :) Last fall I did a presentation called "The (R)Evolution of Web Dev", which covered a brief history of web dev technologies and gave an overview of modern web dev tech and trends: http://blog.isquaredsoftware.com/2016/10/presentation-modern... . I also ran across a couple similar presentations recently: http://www.bcssouthwest.org.uk/presentations/MikeEvans2016.p... and https://hackernoon.com/modern-web-development-bf0b2ef0e22e .

Anyway, excellent post. I'm actually a Redux maintainer, and spend a lot of time answering questions about use of React and Redux. I'd be happy to chat with you sometime about any React+Redux-related topics or questions you might have. I'm @acemarke on Twitter, and also in the Reactiflux chat channels at https://www.reactiflux.com .

Re: Opinionated Comparison of React, Angular2, and Aurelia

#150
post #61

Earlier quoted context omitted.

See the section in the article with the heading "Dependency Injection". It talks about a specific scenario where there is one component that needs to show the state of the entire system (an activity light turned on, for example), where any component can trigger this, but the last component to become inactive turns the light off.

isn't that Facebook's example for why they made react? the light is the number of notifications/chat messages you have available,and they could never get it to stay consistent?

That was related to the "Flux architecture", I believe - having a "single source of truth" for the data.
Post reply on HN