Live data from Hacker News

Facebook’s New React JavaScript Library Tutorial Rewritten in AngularJS

medium.com

31–40 of 56 posts

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

#31
post #2

Neat, although I'm more interested in when you plan on having this book out... Angular is incredibly powerful but it really could use with some more resources for those who are picking it up.

O'Reily has a book out on AngularJS that's a succinct read: http://shop.oreilly.com/product/0636920028055.do

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

#32
post #27

Earlier quoted context omitted.

Theoretically yes, but ngResource is kind of the achilles' heel of AngularJS right now. You're often better off using a different library or making your own class with $http requests.

Could you elaborate why it's the achilles' heel? I'm exploring AngularJS right now, and am interested in its pitfalls

Then you may be interested in checking out Restangular: https://github.com/mgonto/restangular

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

#33

Glad to see people implementing similar projects in both frameworks so everyone can evaluate their needs. Though, comparing code snippets to a lengthy tutorial kind of misrepresents the verbosity of React. I think we forgot to put the completed tutorial on GitHub, so here it is for an easier comparison: https://github.com/petehunt/react-tutorial/blob/master/scrip... Outside of standard HTML boilerplate our entire app…

>Our entire application is pretty small I think

Well, I think most would agree that AngularJS has better readability and is more concise but a disclaimer would be that I've been looking at Angular's syntax for quite some time and reactjs is a new framework...Instagram's website is nice by the way, simple, clean UI.

The "Load More" Button on the site is probably powered by reactjs? @peterhunt

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

#34
post #27

Earlier quoted context omitted.

I am relatively new to Angular, but wouldn't you want to have the comments be a Factory using ngResource? If the comments are restful then it seems much easier.

Theoretically yes, but ngResource is kind of the achilles' heel of AngularJS right now. You're often better off using a different library or making your own class with $http requests.

I'm using AngularJS 1.1.5 and ngResource in my project and it works quite nice. I wouldn't discourage people from learning the hard way. However, +1 for Restangular.

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

#35
post #33

Glad to see people implementing similar projects in both frameworks so everyone can evaluate their needs. Though, comparing code snippets to a lengthy tutorial kind of misrepresents the verbosity of React. I think we forgot to put the completed tutorial on GitHub, so here it is for an easier comparison: https://github.com/petehunt/react-tutorial/blob/master/scrip... Outside of standard HTML boilerplate our entire app…

> Our entire application is pretty small I think Well, I think most would agree that AngularJS has better readability and is more concise but a disclaimer would be that I've been looking at Angular's syntax for quite some time and reactjs is a new framework...Instagram's website is nice by the way, simple, clean UI. The "Load More" Button on the site is probably powered by reactjs? @peterhunt

There's a decent amount in there. We have client-side URL routing/transitions (thanks, Backbone) and the entire profile and feed pages are just big React components. There are also photo modals, login modals, and a full layer/tooltip system which is non-trivial to get right.

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

#36
post #29
post #28

Just had try doing a KnockoutJS version of this also : http://anexiledderryman.com/post/51714264769/facebooks-new-r...

Here's my EmberJS version. It's line for line equivalent to the angular one: http://jsfiddle.net/VNN4B/1/

Plunker can now import fiddles: http://plnkr.co/edit/fiddle:VNN4B@1?p=preview

Some people prefer the more traditional editor interface.

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

#38
post #18

Glad to see people implementing similar projects in both frameworks so everyone can evaluate their needs. Though, comparing code snippets to a lengthy tutorial kind of misrepresents the verbosity of React. I think we forgot to put the completed tutorial on GitHub, so here it is for an easier comparison: https://github.com/petehunt/react-tutorial/blob/master/scrip... Outside of standard HTML boilerplate our entire app…

This is the entire point of TodoMVC[1], which is to create a standard project across multiple languages/frameworks. [1] http://todomvc.com/

The difficulty is when the Todo MVC does not represent a framework's advantages. In the main react thread, peter's comments suggest that React shines in an environment with many, complex interacting UI components.

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

#40
post #31
post #2

Neat, although I'm more interested in when you plan on having this book out... Angular is incredibly powerful but it really could use with some more resources for those who are picking it up.

O'Reily has a book out on AngularJS that's a succinct read: http://shop.oreilly.com/product/0636920028055.do

I'm in the middle of reading this book and I'm really enjoying it, I recommend it
Post reply on HN