I've been doing a broad survey of these JavaScript frameworks for a month or so now. I've looked primarily at Ember, Angular, React, and Knockout. One thing is for sure: React has the community that feels the most "enlightened." I've watched several videos and read several posts similar to this one that express this sentiment of "when I finally understood it, it just clicked , and now I realize it's the best thing in…
> "when I finally understood it, it just clicked, and now I realize it's the best thing in the world." There's very little to understand, it's really really simple. With React, I don't really see the point of Ember or Angular, they're basically zombie projects now. I wonder how their devs feel about React. React is an evolutionary leap enabled by their shadow DOM technology. Being able to rerender the whole page in a…
Why you might not need MVC with React.js
21–30 of 81 posts
Re: Why you might not need MVC with React.js
#22If you want a mostly pure DOM-based framework, take a look at Polymer, too ( http://www.polymer-project.org/ ). Web components seem to really embody what the article is driving at.
Isn't React a mostly pure DOM-based framework as well?
React can fully render out to a string of HTML without any dependencies on a DOM implementation (for instance, if you're on the server)
(http://facebook.github.io/react/docs/top-level-api.html#reac...)
Re: Why you might not need MVC with React.js
#23I think this is a misrepresentation of what makes React.js valuable. React is useful for optimizing your rendering (model state -> DOM state) because you don't have to think about re-rendering sub-views of things that haven't changed. This has nothing to do with defining a communication flow for your app. You're still propagating state up and down your tree whether it is a tree of Backbone views or React components.…
There are Backbone plugins that help but they dont solve the problem at the source,innerHTMLing views is a bad solution to a difficult problem.
What React doesnt solve is the relationship between the view and a model layer outside the view in an frontend application.
AngularJS does solve that problem but it has an expensive cost.
I think we live in an exciting time where problems like these are about to be solved.
Someone,somehow will figure out how to do things the right way. I wish I could,not smart enough,sorry ;)
Re: Why you might not need MVC with React.js
#24I've been doing a broad survey of these JavaScript frameworks for a month or so now. I've looked primarily at Ember, Angular, React, and Knockout. One thing is for sure: React has the community that feels the most "enlightened." I've watched several videos and read several posts similar to this one that express this sentiment of "when I finally understood it, it just clicked , and now I realize it's the best thing in…
That has less to do with React specifically, and more to do with how languages/tools/libraries generally gain adoption. React is at a point where there's still an emerging "early-adopter" community. Angular was like that a year ago (I distinctly recall the tone on HN to be similar to your impression of the current sentiment around React). Now Angular is starting to reach the mainstream (loosely defined), which means…
Re: Why you might not need MVC with React.js
#25I see parallels in the transition from c, to a Ruby/Python/C# development experience (where a lot of low level and error prone details are abstracted away, giving a developer a lot more expressive power in a higher level language)
Re: Why you might not need MVC with React.js
#26Earlier quoted context omitted.
> "when I finally understood it, it just clicked, and now I realize it's the best thing in the world." There's very little to understand, it's really really simple. With React, I don't really see the point of Ember or Angular, they're basically zombie projects now. I wonder how their devs feel about React. React is an evolutionary leap enabled by their shadow DOM technology. Being able to rerender the whole page in a…
ractive.js (which I've been using on a couple of projects) also uses a shadow DOM and learning it is shorter than this sentence.
Re: Why you might not need MVC with React.js
#27I've been doing a broad survey of these JavaScript frameworks for a month or so now. I've looked primarily at Ember, Angular, React, and Knockout. One thing is for sure: React has the community that feels the most "enlightened." I've watched several videos and read several posts similar to this one that express this sentiment of "when I finally understood it, it just clicked , and now I realize it's the best thing in…
That has less to do with React specifically, and more to do with how languages/tools/libraries generally gain adoption. React is at a point where there's still an emerging "early-adopter" community. Angular was like that a year ago (I distinctly recall the tone on HN to be similar to your impression of the current sentiment around React). Now Angular is starting to reach the mainstream (loosely defined), which means…
Re: Why you might not need MVC with React.js
#28I've been doing a broad survey of these JavaScript frameworks for a month or so now. I've looked primarily at Ember, Angular, React, and Knockout. One thing is for sure: React has the community that feels the most "enlightened." I've watched several videos and read several posts similar to this one that express this sentiment of "when I finally understood it, it just clicked , and now I realize it's the best thing in…
> "when I finally understood it, it just clicked, and now I realize it's the best thing in the world." There's very little to understand, it's really really simple. With React, I don't really see the point of Ember or Angular, they're basically zombie projects now. I wonder how their devs feel about React. React is an evolutionary leap enabled by their shadow DOM technology. Being able to rerender the whole page in a…
React only deals with the view. In AngularJS, third party objects have a seamless integration with the view.
Imagine you want to paginate datas.
You'd write a Paginator component in React.
In Angular you'd have a Paginator service holding pagination logic. Then you can have multiple representations of paginators,that would be logic less. It's better because it makes it easier to test the pagination logic in isolation,and you can then hide some complexity out of the view.
i did it with a simple notification queue in a project i'm working on :
.service('Notification', function($timeout, NOTIFICATION_TIME) {
/**
* manage notifications
*/
var onNotificationTimeEnd ;
this.type = {
'SUCCESS': 'text-success',
'ERROR': 'text-error',
'INFO': 'text-info'
};
this.timeout = null;
this.current = null;
this.notifications=[];
/**
* queue app notifications
* @param {Object} notif
*/
this.notify = function(notif) {
if(notif){
this.notifications.push(notif);
}
if(!this.current){
this.current = this.notifications.pop();
}
if(!this.timeout){
this.timeout=$timeout(onNotificationTimeEnd.bind(this), NOTIFICATION_TIME);
}
};
onNotificationTimeEnd = function(){
this.current=null;
this.timeout=null;
if(this.notifications.length>0){
this.notify();
}
};
});
So each time a new notification pops , the view is updated just by adding {{Notification.current}} somewhere in my templateI think React solve parts of the problem while Angular tries to solve the whole problem.
I think there is definetly a middle ground between AngularJS and React virtual DOM that can be found. Let's remember that Misko defines AngularJS as "a better browser",not a framework.
Re: Why you might not need MVC with React.js
#29- without its JSX templating
- with Coffeescript
...ever since I saw the idea here on HN a few months ago [2]. Here's the JSFiddle for that [3], I am a huge fan of the way you can pretty much write your DOM using (essentially) javascript functions.
[1] http://jsfiddle.net/3Vs3Q/light/
Re: Why you might not need MVC with React.js
#30Earlier quoted context omitted.
That has less to do with React specifically, and more to do with how languages/tools/libraries generally gain adoption. React is at a point where there's still an emerging "early-adopter" community. Angular was like that a year ago (I distinctly recall the tone on HN to be similar to your impression of the current sentiment around React). Now Angular is starting to reach the mainstream (loosely defined), which means…
I don't know, I think the excitement around angular was because it made things easy, while the excitement around react is based on its simplicity of its model. It's a deeper thing than just being a shiny new thing imo.