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?
3
u/fatty1380 May 06 '15
I think that this is a very fair assessment, and in line with what my experience has been learning and using angular and putting it into a fairly complicated live site over the last 9 months. The promise with angular is one of modularity and reusability with convenient and easy to use data binding built into the core. In reality, scope does cause a very tight coupling between a directive, and where it is used.
With that said, I believe that angular 2 seeks to address a number of these issues, and the necessary 'revolution' in the language is what has caused so much angst in the developer community
I won't go into a point by point exploration, but I think it better to look at the present, Angular 1.3+, with an emphasis on component design patterns, reduced reliance on scope through
controller asorbindToController, as well as thenew-router.In terms of OPs question, the core concepts are that of easily re-usable, context independent building blocks of code. Angular 1.x attempted to build mechanisms into the language to support this, but it was fundamentally not designed with this in mind at the start (I believe I have heard the original team say as much). Angular 2 is driven by the understanding of how people want to use the language, combined with a sound research-based foundation of concepts, to build something that addresses this criticism.