I can now appreciate some design decisions behind react-redux after witnessing some angular OOP clusterfuck.

I am sure there is some clean/correct way to code in angular, but everyone is treating angular as java.

Some angular application (the one I have to work with) is littered with network calls. It's difficult to spot duplicates. People usually resolve promises everywhere. In services, in a top-level component, or in for loops. In react, people use apollo/redux-query or redux-saga to handle network calls. Since these libraries prevent duplicate network calls internally and reassigning apollo network call function or redux action function is always useless, it's easy to spot all network calls in a component tree.

In angular, it's difficult to trace data mutations when data can be updated everywhere. In react, you can easily find UI state updates by tracing state hooks/dispatch/apollo usages.

In angular, it's difficult to trace data pipeline. Since everything is imperative by default, people need to add update functions in data subscriptions. With all the littered mutations. Soon you will lose track of what the fuck is going on.

I hope angular get the agonizing death it deserves and fuck everyone who codes JS OOP clusterfuck UI.

  • 1
    Did somebody say ngrx?
  • 0
    @nibor only if I am in a position to convince the entire team to switch to store architecture... I am already the noob who complaints about everything
  • 6
    I'm sorry but your team being inept at software architecture has nothing to do with Angular.
  • 1
    @Marl3x I'm sorry but tools are supposed to encourage and enforce clear architecture.
  • 1
    @ostream It does, Redux is a library that exists for Angular the same way it does for React, if you use it and it helps your code, good for you, but you can do the same shit in any other Framework.
    Also: Angular actually has an opinionated architecture that you are supposed to follow, React does not. There are patterns and libraries that evolved over time, but Angular actually tells you what to do, if you are unable to use it then I'm sorry for you. I am actually teaching Angular at my company and I know what bullshit code you are able to write with Angular, but most of the time it's people not understanding how to use the tools they give you, and I know you can do the same with React.
    Stop blaming the tools.
  • 0
    I used to think that UI is the perfect use case for OOP.
    That changed after I started using and loving declarative and reactive UI frameworks. Seeing UI as the function of the model state eliminates a whole bunch of problems.
  • 0
    @Marl3x Maybe because Angular forces you to write load of boilerplating to do the simplest thing? I used rxjs and *hated* it compared to redux. It adds another layer of complexity to an already complex "framework".

    Angular architecture may seem very organised. But it's not clear, nor is it ergonomics, respectful of cognitive limitation, or resource-efficient. Simple proof, I used to just do my shit in vim+tmux. In a well-organised react project, I don't feel the need for an IDE. In Angular, it's just impossible to do without, there's too much files.
  • 0
    @ostream Redux has nothing to do with RxJs. I agree that it's complex that's why i discourage beginners from using it at all, but it's also poweful as fuck. There are front- and backend frameworks that are based solely on RxJs.
    The separation of template and business logic is probably just an objective opinion. Personally i like it, but there are drawbacks to both approaches.
  • 0
    @Marl3x Sorry I meant ngrx. Same principle than redux with yet another layer of complexity with rxjs and a whole new way of doing things. Reactive programming can be powerful but it's not in the language design at all. It's just cognitive clutter
  • 1
    @ostream ah ok, i don't like ngrx either, i prefer ngxs which fits nicely into the existing architecture, but most of my applications actually don't need it.
  • 2
    Every angular app I have worked on is a piece of shit, because people don't understand what mmvm even is let alone anything else.

    Latest I work on has ngrx... So they put everything in there including component state. So components do nothing but load forms and button state etc from ngrx... Including html. So now we have no M V VM... We have M. And everything shoved into one incomprehensible place of spaghetti
Add Comment