Re:Removing User Interface Complexity, or Why React is Awesome
by chc on Tuesday May 13, 2014 @06:40PM
(#7741083)
As the famous quote goes, there are two hard things in computer science: cache invalidation and naming things. When I first heard it, I thought it was a joke; nowadays I feel like it's barely a simplification.
Re:Removing User Interface Complexity, or Why React is Awesome
by possibilistic on Tuesday May 13, 2014 @11:44PM
(#7742076)
"And off by one errors".
Re:Removing User Interface Complexity, or Why React is Awesome
by JonnieCache on Wednesday May 14, 2014 @05:41AM
(#7742920)
I think coming to see that "joke" as deadly serious is a coming-of-age moment for all programmers.
Re:Removing User Interface Complexity, or Why React is Awesome
by bmillipede on Tuesday May 13, 2014 @06:39PM
(#7741075)
I agree. It takes a while to get one's head wrap around AngularJS. But once you get it, it's awesome. Anyways, this is the tutorial that finally helped me get it:
Re:Removing User Interface Complexity, or Why React is Awesome
by benatkin on Tuesday May 13, 2014 @03:55PM
(#7740306)
Great explanation.
Angular attribute directives would map well to React Mixins. They take more work to set up, but with mixins code can at least be reused outside of the inheritance tree.
AngularJS has a serious "naming" problem.
Most these concept are easily understood when explained the right away,what AngularJS doc doesnt do. The only complicated thing to grasp is the digest cycle. But anything else is trivials.It's nowhere near the complexity of Java EE.
Scopes are easy,like any composite structure you have nodes with children and parents ,what make scopes special is that they can inherit properties from their parent scopes.
Directives are just custom html elements/attributes where you should do dom manipulation,all other angularjs components should be free from any DOM manipulation,Directives are the closest thing to react components.
Controllers represent the state of the view,when the data in a controller changes, a view that exposes that data changes and vice et versa.
Services are dumb objects that can be shared between controllers and dependency injection is the way one share these services. Controllers can references services ,and services can reference other services. Services are singletons
So there is nothing really complicated with all these concepts,just that the doc sucks for some reason.