by hassanzaheer_ · 12y ago · 0 comments
I'm currently working on a comparatively large webapp built in Angular and it was after about 7 months into the project that we started realising it's pitfalls, and it was very difficult to abandon it then.
So we worked it around by: 1) using one-way binding (or bindonce to be exact) to reduce watches 2) avoiding un-necessary $apply() and using $digest() carefully if required 3) using ng-boilerplate for scaffolding 4) defining our own style guides/coding conventions/design patterns to overcome Angular's bad parts 5) frequent code-reviews that made sure new team members are upto speed with the above techniques
luckily we haven't ran into much issues after that :)
If by the time Angular 2.0 is launched then I'll definitely give it a shot, it seems promising and is based on ECMA6 utilizing the new features provided by it will be a plus.
IMO AngularJS can be scaled _IF_ used with caution, though I won't recommend it unless one has a good experience with its core.
It definitely is the V - since it renders the view.
But it is also the C - a component encapsulates the view and view logic together. From within the component, you have lifecycle events: when the component is mounted for the first time, whenever it receives new properties, when it is unmounted etc. In any of these events, you can receive data from the external world through AJAX calls. Or you can set up AJAX calls from outside the component, and in its callback, ask React to re-render the component. There are as many ways to update the data model inside the component as we can possibly do with Javascript and callbacks. This is exactly what a Controller in a traditional MVC does: orchestrate data flow between the external world and the view. React does it beautifully.
React can also be the M, or it can compose it into the component. You can have your own validation methods and business logic that mutates the state in the component (a component is simply a Javascript object with state); or you can compose your custom Javascript object or something like Backbone.model, and keep all your logic in there.
And you can use react-router for routing. What else do we need to compare React with Angular?
> React is just the V in MVC, Angular is / can be the rest.
that's why its more of a micro-framework, its pluggability with other frameworks makes it customisable according to the proj requirements
You've done the easy things after 7 months, and the hard things are always going to be hard.
It rather makes me worry it is going to be the Python 3000 release all over again in terms of how much is changing.
The underlying technology is changing so fast (ES6, web components, mobile web, etc.) that it's going to make upgrading an obvious choice even if it involves relearning a lot of stuff.
and also do you think they'll continue with the 1.x releases? since so many developers have already invested time and effort on their webapps and shifting it to an entirely new framework (read release) is a major cost to pay..
https://www.youtube.com/watch?v=LG9VkCDbte0&feature=youtu.be
They say the exact plans for how long they are going to support 1.x won't be finalized until after 2.0 gets released, so that they have some idea of how difficult it's going to be to migrate.
It looks like `master' is all Angular 2 and coming along well.
138 JS files v > 1000
Fingers crossed that isn't the level of Hello World required either in the world of 2.0 and AtScript.
1. It already has a much bigger and growing community than any of the new frameworks
2. It has backing/support of Google, when such a big company puts steam behind something than you can be sure it's not going to die out just like that, and will continue to grow and improve, no other framework other than ReactJS has such a portfolio
3. Third-party plugins/components, AngularJS already has some amazing libraries/plugins/directives built that one can easily plug into the project (this is by far greater than any other new frameworks coming out)
and one can go on...