One of the nicest things about React.js is not having to deal with such a layered architecture, you work at the right level of abstraction ("components"), and those components are composable. Some people freak out with JSX but it pays off to finally have a proper GUI pipeline for web apps instead of manipulating the DOM directly, or being limited to directives embedded in HTML.
Used backbone a few times, always turns into a train wreck.
I know what you mean by Backbone, and all I can say is that often wiring up the views is the culprit. Models and routers work nicely and that's all I used from Backbone in this project.
i find React's implementation more clever, by giving you a single environment (JS) to declare your view's template and logic.
Forcing a clear separation leads Junior developers towards a better design, which is one of the reasons I like Angular - I can put a junior dev on a project and have them productive within about 10 minutes while feeling fairly confident they will do things the right way. It's a very easy framework to get started with, leads you towards a good overall architecture, and is deep/powerful enough that it doesn't fall over when things get hairy 85,000 lines of code later.
Obviously good React code will keep proper separation of concerns (whether using standalone templates or not), but I do worry a lot of developers will cheat and start emitting snippets of HTML in areas of the codebase that shouldn't be doing that.
Mind you React.js is a great framework, I just personally prefer Angular based on experience working with both.
> (...) but I do worry a lot of developers will cheat and start emitting snippets of HTML in areas of the codebase that shouldn't be doing that.
This does not make sense. React.js whole point is writing components that do emit HTML and re-render themselves (and children). Now the only thing the developer has to do is react to events (implement callbacks) and change state (setState), the pipeline takes care of the rest. Not only it's impossible to "cheat" by changing the DOM directly from outside the component (a re-render would remove the changes), it's also more work, so it's not cheating at all.
In reality, the clever thing about React is that you start treating data (markup) as code (React.DOM), instead of introducing crutches to work directly with HTML.
Angular does not mix Presentation and Business logic. React doesn't inherently mix the two, but it doesn't dissuade it either.
> This does not make sense. React.js whole point is writing components that do emit HTML and re-render themselves (and children).
Yes, but it's writing code in Javascript that emits snippets of HTML or DOM. I'm generally not a fan of this approach. Even just just iteration requires jumping between the two, and often breaks up the page into multiple smaller segments in cases where it really doesn't need to me.
I dont care about this but let's just not pretend Angular solves the HTML template in code issue . It's far from inobstrusive.
Yes, angular templates are templates, not pure HTML. That's the idea. I'm not sure what your point is there.
In Angular people can write
app.directive('myDirective', function () {
template: "<strong>oh no</strong>"
});
which is what I think they were getting at.