Live data from Hacker News

Angular 2 versus React

medium.com

91–100 of 249 posts

Re: Angular 2 versus React

#91
post #37

Earlier quoted context omitted.

> React and Angular2 do the same thing yet they are both bloated and force tons of tools and tech down your throat. For what? State control. The most important thing about a React app is that you can write your code to have every bit of application state inside a single variable. It gets you hot code loading, trivial testability, and session recording/replay. I can actually test the app without having to use selenium…

Note that mithril is much more lightweight than react, offers a similar vdom model, but has a completely different algorithm for deciding when to redraw. I actually think that mithril's redraw algorithm is less intuitive to use than react, but it is way simpler, which has its own advantages.

I love mitril so much. It would be soooo much better with a lisp syntax, though.

Re: Angular 2 versus React

#92
post #85

Earlier quoted context omitted.

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

This is what the Extensible Web Manifesto is -- an agreement from browser vendors to build in low-level primitives so that things can be implemented in user space: https://www.w3.org/community/nextweb/2013/06/11/the-extensib... (Of course, higher-level APIs still get added.)

Thanks for pointing this out. I (as I'm sure many others) was not even aware that such a thing existed.

Having said that...

- Is that the actual manifesto? I couldn't find any link to any more detailed document, but maybe it's a browser/adblock thing.

- If yes, then... I agree with nearly all of it (having just skimmed it), but it seems a bit... bland and fluffy (as opposed to concrete).

That's not exactly what I was imagining with my ever-so-specific "API/thing" nomenclature :) I was thinking more along the lines of a "universal bytecode for web", but a) not just for code, and b) one that actually works. Maybe Java 25 will get us there, who knows :)

Re: Angular 2 versus React

#93

React's learning curve is tiny compared to Angular. With React, you need to understand the component API, which consists of about 5 methods that one uses regularly, and the top level API, which consists of 2 (or just 1 if you use ES6 class syntax to create components). And as the article points out, it's just JavaScript.

Do you count time for learning all third-party libraries needed to create an app with React?

Re: Angular 2 versus React

#94
I prefer angular over react. 1) It is opinionated (wasting time for decisions is bad) 2) It is simpler to organize the code (it is MVC) 3) (click)="onSelect()" is simpler. You dont have to create an object with "bind" function like in react. 4) I dont want web designers mess with my code. So putting html on JS is bad decision.

Re: Angular 2 versus React

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

Meanwhile I am quite happy to have returned to native UIs....

Re: Angular 2 versus React

#97
post #20
post #8

> You spend your time writing plain ‘ol JavaScript. That’s the future I believe in. How about a future where you don't write any code at all? This is the beauty of Angular's markup-centric approach, it's declarative so that means less code, which means less opportunities for devs who enjoy typing to screw things up. Jeremy Keith made a good point in his An Event Apart talk [1], where he talks about HTML slowly subsum…

If you're writing loops, and especially if you write loops that have conditionals inside of them, you're writing code. "Declarative" is saying "I want a list of all users", "For every user, display their name like this" is just code. I've seen a lot of template languages that claim to be declarative, I'm yet to see a production template (that is to say, not an "example") that actually looks declarative and isn't just…

Agreed. In every single project I've worked on that used mustache/handlebars, haml, or some similar 'restricted logic' approach, the long-term result consisted of view templates that contained hacks, a lot of logic hidden in helpers that were often only used in one place, or just plain convoluted solutions.

Furthermore, the main argument I hear is that these logic-less template approaches benefit designers/front-enders, which doesn't make sense to me. If your project is complex enough to require Angular or React, a non-coder front-ender probably will have trouble working on it anyways. That's been my experience at least.

Re: Angular 2 versus React

#98

I prefer angular over react. 1) It is opinionated (wasting time for decisions is bad) 2) It is simpler to organize the code (it is MVC) 3) (click)="onSelect()" is simpler. You dont have to create an object with "bind" function like in react. 4) I dont want web designers mess with my code. So putting html on JS is bad decision.

But do you want web designers to mess with your markup? Many of the projects I work on still involve the 'old-fashioned' server-side rendering approach with bits of jQuery for interactive elements. If a non-coder webdesigner were to mess with my markup, everything would break anyways.

I guess what I'm saying is that I've worked on many types of projects in many kinds of environments, and whenever a front-end framework was necessary, the 'webdesigners' were not. I've just never run into the situation where it actually ended up being useful to create logic-less templates...

Re: Angular 2 versus React

#99
post #85

Earlier quoted context omitted.

This is what the Extensible Web Manifesto is -- an agreement from browser vendors to build in low-level primitives so that things can be implemented in user space: https://www.w3.org/community/nextweb/2013/06/11/the-extensib... (Of course, higher-level APIs still get added.)

Thanks for pointing this out. I (as I'm sure many others) was not even aware that such a thing existed. Having said that... - Is that the actual manifesto? I couldn't find any link to any more detailed document, but maybe it's a browser/adblock thing. - If yes, then... I agree with nearly all of it (having just skimmed it), but it seems a bit... bland and fluffy (as opposed to concrete). That's not exactly what I was…

> Is that the actual manifesto?

No. Actual manifesto:

https://extensiblewebmanifesto.org/

Re: Angular 2 versus React

#100
post #85

Earlier quoted context omitted.

This is what the Extensible Web Manifesto is -- an agreement from browser vendors to build in low-level primitives so that things can be implemented in user space: https://www.w3.org/community/nextweb/2013/06/11/the-extensib... (Of course, higher-level APIs still get added.)

Thanks for pointing this out. I (as I'm sure many others) was not even aware that such a thing existed. Having said that... - Is that the actual manifesto? I couldn't find any link to any more detailed document, but maybe it's a browser/adblock thing. - If yes, then... I agree with nearly all of it (having just skimmed it), but it seems a bit... bland and fluffy (as opposed to concrete). That's not exactly what I was…

I guess this is the real thing:

https://github.com/extensibleweb/manifesto/blob/master/READM...

Perhaps WebAssembly is close to what you think of as a "universal bytecode"?

Post reply on HN