-
Notifications
You must be signed in to change notification settings - Fork 0
Should I stick with Angular 1.x for now?
David Jones edited this page Sep 26, 2015
·
1 revision
- Angular 1.x has a huge base of knowledge, library code, documentation and knowledgable practitioners today.
- Angular 2.x is still very much in a state of change. If you write an Angular 2 app today, it may work, but if you encounter a bug that has been fixed in a new commit, you may have to tweak or rewrite whole parts of your app (for instance the routing API is still changing, and that could have far-reaching effects in a large app).
- 1.x isn't going away the instant 2.x is released. There are far too many people using it today and the upgrade will be a long, hard road for those with particularly large apps or ones with dependent on angular-specific plugins and modules.
- The dramatic shift for 2.0 will simply be too much for many teams. Angular 2.x isn't so much a new version, as it is a whole new framework born as a reimagining of what Angular 1 is that is inspired by what is happening in React and other WebComponent-based frameworks.
- Angular 1.5.0-beta.0 framework size minified: 147kb vs Angular 2 minified: 564kb
- Maybe not so much of a problem for web/mobile apps or browser plugins, where a first-time hit is acceptable, but could be a dealbreaker on sites that must load quickly to new visitors
- You don't necessarily need to upgrade to get the benefits of a component-based architecture (or one-way data flow).
- In fact, going with a component-based architecture in Angular 1 vastly reduces the things you need to learn/use/debug. Learn to to use directives, binding, routing, and services and you should know enough to be productive.
- It has been stated that there will be a reliable upgrade path (allowing for you too load both Angular 1 and 2 in the same app, and port things over little by little). This should land in 1.5 final, which could be any day now, or may be delayed to the same time as Angular 2.
Why should I write a new app or port my existing app to Angular 2 today instead of sticking with Angular 1.x?
- Angular 1.x in general is a pretty confusing framework, at least in comparison to 2.x.
- As someone that tries to pick up and learn new technologies frequently, there is an awful lot to learn in Angular 1 to be fully productive with it. It's Google parentage and enterprise popularity, means that all kinds of Java-isms (not JavaScript) are in the framework, which kind of feel out of place (IMO).
- TypeScript (or ES6/ES2015/ESNext). This isn't a requirement to write Angular 2 applications (and you can write 1.x apps in them, too), but why do things the hard way and go against the grain of the framework? It'll be harder to find help and support if you are writing your Angular 2 apps in ES5, and you'll have a lot of extra boilerplate code to do things like annotations. Take advantage of the fact that the compiler can output ES5 (or ES3) compatible JavaScript and use all the cool new stuff today like classes, multiline strings, interpolation, type checking, native promises, etc...
- Angular 2.x is very close to release (estimated late 2015...maybe Christmas??), it seems at this point that things are settling and that it will be much less effort to upgrade to the final when it is released, than to start and Angular 1.x app and attempt to upgrade, especially if you don't depend on a lot of 3rd-party modules that haven't yet been ported or replaced with A2 equivalents.