Live data from Hacker News

Facebook’s New React JavaScript Library Tutorial Rewritten in AngularJS

medium.com

1–10 of 56 posts

Re: Facebook’s New React JavaScript Library Tutorial Rewritten in AngularJS

#7

Earlier quoted context omitted.

Why?

Separation of concerns

The controller is in fact separated. The "ngController" you see referenced in the markup is the link between the view and the separate controller. Any MVC framework you could hold up as an example of proper "separation of concerns" will necessarily have the same link, even if it's implicit. Sometimes it's defined in the controller, sometimes the link is defined in the view, and sometimes you don't see it defined, but it's still there. (of course, we all know explicit is better than implicit)

Re: Facebook’s New React JavaScript Library Tutorial Rewritten in AngularJS

#8

Earlier quoted context omitted.

Separation of concerns

The controller is in fact separated. The "ngController" you see referenced in the markup is the link between the view and the separate controller. Any MVC framework you could hold up as an example of proper "separation of concerns" will necessarily have the same link, even if it's implicit. Sometimes it's defined in the controller, sometimes the link is defined in the view, and sometimes you don't see it defined, but…

Right, but doing it this way means both the view and the controller know too much. Why should a view know about how it is going to be used? Also, I'm guessing if you give this to a designer his/her eyes are going to glaze over.

Re: Facebook’s New React JavaScript Library Tutorial Rewritten in AngularJS

#10

Seeing the word "controller" in markup makes me want to gag myself.

The controller directive is necessary to determine the scope of the variables/functions embedded in the view.

But I do agree on the point that designers would certainly gag when seeing this... A developer would need to go though the deign and insert all the hooks. This step is unavoidable with any web application framework.

That being said, I think a designer would puke if they were required to write React components.

Post reply on HN