by olalonde · 12y ago · 0 comments
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.
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.