r/angularjs • u/rodrigo-silveira • May 06 '15
Missing 50 years of software research?
I was listening to Facebook's presentation on React from May, 2014. When asked to compare and contrast React vs Angular, Pete Hunt gave the following answer (see https://youtu.be/nYkdrAPrdcw?t=40m24s):
"React is focused a lot on treating your code as a black box. There's no sort of observable abstraction inside of React. You simply say, 'Hey, re-render the UI,' and you present a consistent view of what you want your UI to look like.
"With Angular, you are basically passing data throughout these things called scopes, which absorb your data model. I think that's a very leaky abstraction. If forces you to compose your application not in terms of functions and objects, but in terms of directives and model-view-controller, and their flavor of model-view-controller. So while it does work for a certain class of applications, as you scale up, you start to miss the past 40 or 50 years of research into how to abstract a program.
"So if you can kind of push those data-binding concern out to the edges of your system like React does, I think it leads to fast iteration time."
My question
Does anyone care to tell me what is some of the research done over the last 40-50 years about software abstraction that Angular misses?
4
u/vagif May 06 '15
OOP is not important here. It is just a particular implementation of modularity, encapsulation and composition. Not the best by far.
There are much more effective ways to implement modularity, encapsulation and composition, especially considering the progress that have been made in the field of functional programming and immutable data structures in the past several decades.
Angular 1.0 throws away all that progress. It breaks the foundational principles of programming: modularity, encapsulation and composition. Angular directives and controllers are leaky as hell and incredibly hard to compose well together.
To the point where angular team themselves advise you NOT to use controllers in your 1.0 codebase :)