4 ms·
Not sure what in react would replace all the other angularjs part not related to directives. How does react deal with routing, web service querying, unit testin
by bsaul 12y ago
Not sure what in react would replace all the other angularjs part not related to directives. How does react deal with routing, web service querying, unit testing, etc...
It seems to me that the integrated approach of angular isn't answered by react.
- tracker1 12y agoSee: Flux .. I'm partial to the Yahoo implementation myself, which has a really good client-server story behind it. React would be the "View" system in the Flux workflow. You are correct that React alone won't replace Angular, but with other tools (Ampersand, Flux, etc) you can use the pieces that you want and put them together. It's the difference between a library and a framework.
- bsaul 12y agoJust looked at the flux presentation from facebook, and it seems to me that it's basically a set of best practice on how to wire your view actions to your controller's model and refresh. Having a single unidirectionnal "loop" model=>view=>action=>model... is something that i have been doing inside my angular controllers for a while... Now react may help with the performances of refreshing the dom in that scenario, but so far i didn't encounter that issue myself.
- tracker1 12y agoI think the performance issues tend to come when you have a lot of controls and associated bindings via angular on a page. The use of jQuery (improperly) tends to exacerbate the issue. Most people won't come across the issue, to be honest. Facebook has a lot of points of display and interaction on their pages, so it quickly becomes an issue. Not to mention the simpler flow is easier to track. I do find that the flux model makes more sense to me. Flux is a set of best practices, they use React for the rendering/view portion, and since their talks there have been several implementations of the workflow. Some using Ampersand or Backbone, others implementing their own pieces. Now Facebook has been releasing their own implementation... It's all pretty interesting.
- purpletoned 12y agoThere are tons of javascript libraries that are out there that offer the things you want. In most cases, they are more featureful and more stable than Angular's implementations. Router - Backbone's router, page.js etc Web service querying - simple jquery ajax calls or you could use breeze.js, pouchdb etc Unit testing - React has one built in, but you could use others too.
- rantanplan 12y ago> There are tons of javascript libraries that are out there And there you have your answer :) What the JS people don't seem to grasp is that I don't care how many libraries are out there. I care even less about the incompatibilities and the different release cycles of all those libraries. By now, I hope you understand that my interest in maintaining and integrating all those into a coherent system approaches zero. I am a software engineer and not a JS technologist. The front-end is just 1-10% of any serious system and yet, in the JS world, it takes 90% of the time building it and maintaining it. It just doesn't add up. Imagine 10-15 years ago if we had to build GUI apps by mixing and matching 100 incoherent libraries, that in 1-5 months some of them will be obsolete, abandoned or whatnot. This is what JS has accomplished today and people just take it for granted. Now I am sad and I will return to my crying corner.
- purpletoned 12y agoIf you're using something like Angular, Ember or React, it's safe to assume that you'll be building a Single Page Application with the majority of code in Javascript. So evaluating libraries for stability, functionality etc is time well-spent, not wasted. While it is true that there are far too many frameworks that come and go in JS land, you can find very stable, well-maintained and clean libraries too. For anything that's essential to your stack(DOM interaction, routing, UI elements etc), typically you'll find multiple well tested and stable libraries. Atleast, that has been my experience. With well designed libraries, integration is rarely a problem. They are designed to be interoperable and don't make too many assumptions about things they aren't good at. It takes a little bit of work upfront, but I find it's far better than relying on monolithic frameworks that tries to do everything under the sun(and usually fail). Switch to React, I guarantee you that your front-end dev time(and overall) dev time will drop drastically to 20% :)
- kuni-toko-tachi 12y agoReactJS just focuses on creating DOM nodes, routing etc are up to you. This is a good thing! Because then you can choose whatever other frameworks you want for routing, rest, etc. AngularJS does too much, and nearly all of that too much poorly.