Live data from Hacker News

Angular 2 versus React

medium.com

131–140 of 249 posts

Re: Angular 2 versus React

#131
post #113

Earlier quoted context omitted.

This is beautiful.

It's the circle of life. I've been programming since I was a kid in the 80's, after a while you learn to stand back sometimes and let the bandwagon roll on past or as I've joked in the past "these days I simply get on every third bandwagon".

Yes, it would seem as a developer there is a certain amount of bandwagon jumping going on in the last few years.

You're very right, you really have to pick your battles. It's interesting since I'm doing more contract work and finding out that one shop uses Angular and another Backbone and a third React. Which one should I really learn and focus on, when nearly every shop has a totally different philosophy??

Even trying to pick the winners in these framework battles is getting exhaustive.

Re: Angular 2 versus React

#132

Earlier quoted context omitted.

I should say, my post was more about web components and less about Polymer. Polymer is just one way to do it right now, and you're right, it is opinionated. You don't need a library at all if that's what you prefer. The polyfills are there now and they are solid. Webcomponents.js is small and effective. The simple click-and-select-stuff(...) that you are referencing about are probably specific to some bloated Paper e…

> The polyfills are there now and they are solid. Webcomponents.js is small and effective. This leads to a tangential point which I find somewhat interesting to ponder: If the polyfills are good enough... then why does this actually need to be a browser standard? I'd really like to get to a place where we (collectively) find some sort of minimal API-type "thing" that browsers need to support such that everything else…

> but it's really disconcerting that all the state[1] passed down to sub-components gets represented using attributes-but-not-really-because-they're-not-primitive-types-any-more.

React, Angular 2, and probably most other frameworks with templates do the same thing.

If it makes you feel any better, the key point for me is that these are not HTML, they're templates embedded in HTML via a DSL. This DSL is valid HTML, but it's necessarily interpreted and modified by the template system.

Also, it's great that these values are not primitives. One of the persistent detractions (made by a core React dev I think) against Polymer is that "everything is a string because attributes", which is just wrong. As you note, Polymer uses attributes in template to declare binding to properties in the resultant DOM, which can be of any type. I think it's great that you understand this distinction, even if you don't like it :)

Re: Angular 2 versus React

#133
post #9

To me it really feels like Polymer is taking all of the pros from both of these "libraries" or "frameworks" or whatever you want to call it and none of the cons. Why aren't we talking more about that? Polymer is a fraction of the size. It's one of several ways right now to write custom components. React and Angular2 do the same thing yet they are both bloated and force tons of tools and tech down your throat. For wha…

You can write TypeScript without a big framework around it.

Re: Angular 2 versus React

#134

Earlier quoted context omitted.

Are you under the impression these things aren't possible (or even easier?) with web components or vanilla JS? You don't need a big framework for any of that.

I'm building an app with Ember, and I like how it abstracts away the more tedious aspects of web development without preventing me from moving to a lower level of abstraction when I need to. I've built a small app in vanilla JS, so I know what the alternative to using a framework is like. Doing XHR by hand is not easier than using Ember-Data. Writing custom JS components is not easier than extending Ember's Component…

What do you think about Ember's mobile performance problems?

Re: Angular 2 versus React

#135
post #9

To me it really feels like Polymer is taking all of the pros from both of these "libraries" or "frameworks" or whatever you want to call it and none of the cons. Why aren't we talking more about that? Polymer is a fraction of the size. It's one of several ways right now to write custom components. React and Angular2 do the same thing yet they are both bloated and force tons of tools and tech down your throat. For wha…

I think you're gonna like Aurelia[1]. It's badass compared to Angular 2, React & Polymer. You get this really, really nice feeling of writing pure Javascript. It's smaller than Angular, strictly follows Javascript standards which is soooo nice. No {{bindingVariable}} but instead: ${bindingVariable} // Just like in Javascript template strings! Binding? Sure: Two-way? Of course: One time? Yep: The templating is so simp…

On a fast i7 and a 50 megabit connection I get:

* A flash of unstyled content

* No text on first load for 5 seconds

* A one second delay switching between pages on the docs page.

Bring back text/plain.

Re: Angular 2 versus React

#136
post #105
post #57

> Sigh. Yes, Angular is a framework, React is a library. Some say this difference makes comparing them illogical. Not at all! Agree. This BS "oh, it's like comparing apples to oranges" knee jerk reaction should stop. For one, even if Angular is a superset, we can always compare the parts that both have: component model, templating, etc. Second, when we say React we almost ALWAYS mean React + Router + some Flux lib, e…

> Second, when we say React we almost ALWAYS mean React + Router + some Flux lib, etc. -- so all the same things you get with Angular, just cherry picked. This premise is quite silly. Not every programmer is looking to create or adopt a framework in the beginning of a project. Some people just pick and choose libraries as they see fit and as the code evolves. I've worked on more than a few React projects and none of…

Hence: "cherry picked". You don't have to pick ALL the parts if you don't want. You can still compare a full framework and the 2-3 items you cherry picked though as methods of getting web apps done.

Re: Angular 2 versus React

#137

I went "all in" on React a few weeks ago, but one probelm I had is the complexity of the various samples/starter kits. If anyone knows basic React and uses Typescript, and want to start using Redux/ReduxSimpleRouter, you'll find this interesting: https://news.ycombinator.com/item?id=10837377

One of the biggest problems I have is the number of things I need to install at $EMPLOYER to make it all work. Typescript I can get approved because it's "Microsoft", but Node/NPM and Ruby? (for SASS) Not a chance - even if it could make it out of the NTLM-auth proxy.

Re: Angular 2 versus React

#138
post #52

Earlier quoted context omitted.

Polymer is a polyfill for web components, which is an imperative way to sandbox JS/CSS/DOM. It's a very useful tool. Poylmer doesn't simplify UI development like React does, the components have to be statefully managed, and always will be because creating/destroying polymer/web components is expensive. The beauty of virtualdom is the previous state doesn't matter in deciding what the new UI should look like, or if a…

To clarify, Polymer relies on web components polyfills. The polyfills are separate and usable by any other project. Also, components don't have to be stateful. An element can be viewed as a function invocation which accepts attributes, properties and children and returns DOM. An element which deterministically renders some DOM based only on those inputs is very much like a pure function.

But still creating domnodes on each invocation. React is shielding the dom

Re: Angular 2 versus React

#139

Earlier quoted context omitted.

Are there any examples using this in the wild? I couldn't find any 'Sites powered by Aurelia' page on the site. Would be interesting to see some full fledged sites (besides the project site).

Well the docs[1] are built using Aurelia, and it's really cool as it fetches the framework API directly from their GitHub repos via GitHub API and caches it on clients computers. I am currently in the process of re-building our company website with Aurelia (previously Angular 1.X). [1] - http://aurelia.io/docs.html

Unfortunately it's not so cool now that their GitHub API limit has been reached. That docs page is completely blank for me.

Re: Angular 2 versus React

#140
post #9

To me it really feels like Polymer is taking all of the pros from both of these "libraries" or "frameworks" or whatever you want to call it and none of the cons. Why aren't we talking more about that? Polymer is a fraction of the size. It's one of several ways right now to write custom components. React and Angular2 do the same thing yet they are both bloated and force tons of tools and tech down your throat. For wha…

> This is the year of framework fatigue. This is the year of the framework fatigue meme. Next year is the year everyone realises why we had frameworks and tries to salvage the mess they made last year, when they wrote an app 'without a framework' and ended up with an under-specified, incomplete, undocumented, informal framework.

Nah, that's a few years in the future. Typically it takes about 5-10 years for programming trends to reverse themselves.
Post reply on HN