Out of React, Angular and Aurelia which one excels at Code Organization?







97 votes ยท Closed

In terms of code organization and structure, which one is the best?

Anirudh Sylendranath's photo

I seriously want to know why people are voting for React when it forces you to write HTML inside your JS and encourages dumping CSS there also. A simple React app seems like a mess to me (Angular is also a culprit with their directives but otherwise works well). Aurelia seems to be the best in terms of code organisation where you only define the classes with the models in JS, write templates in HTML with only the bindings and CSS does what it's supposed to do.

Hopefully it's not just because they like the framework.

Show +4 replies
Thomas Roch's photo

@aniforprez yes, sure. React doesn't force you to write HTML in JS, because there is no HTML in React (see my answer here: https://hashnode.com/post/does-react-really-violate-separation-of-concern-by-putting-html-and-js-in-a-single-file-cil3bn5hj0011a65347rsdut0). I think you are confusing JSX with HTML, if you don't like JSX, it is not mandatory in React. React doesn't encorage dumpin CSS in JS, there is a vast number of techniques people use to bind a component and its stylesheet together, but not many of them result in writing CSS in JavaScript. As for Angular, I don't see how directives can negatively impact code organisation.

Thomas Roch's photo

The only one which can excel at code organisation is the developer. That said some frameworks / libraries make a good job of restricting choices. I have not used Aurelia beyond playground for commenting on it, but you can achieve good code organization with React or Angular.

Claudio Mezzasalma's photo

I would love to see some explanation of the answers, sinche both of the three are component oriented frameworks. It just looks like people are voting because they love React...

Anirudh Sylendranath's photo

Seriously. Has anyone who's voted even heard of separation of technologies? Writing HTML in JS is the reason I don't want to touch it right now until there's a robust solution for HTML templates.