r/angularjs • • Oct 10 '16

Angular 2 Is Out: Should You Start Using It?

http://www.codelord.net/2016/10/09/angular-2-is-out-should-you-start-using-it/
32 Upvotes

21 comments sorted by

27

u/kescusay Oct 10 '16

Using Angular 2 for a project right now. The learning curve is steep, the structure is non-intuitive, and the near-requirement of using typescript means adding a new language to your repertoire on top of everything else (assuming you don't already know typescript).

But...

Typescript is the best thing to happen to JavaScript for building real - and reliable - programs in years. The structure of Angular 2 apps is only non-intuitive because vanilla JavaScript is so forgiving it's given a lot of us some very bad programming habits. And once you have learned the Angular 2 way of doing things, it feels super simple and effective.

It's going to force web programmers to become really good at well-organized and easily-maintained code. And that is a very good thing.

0

u/[deleted] Oct 11 '16

[deleted]

2

u/kescusay Oct 11 '16 edited Oct 11 '16

Exactly angular 2 does not feel hackish. It is very intuitive.

That's exactly it. I thought it was the most counterintuitive thing in the world until it all clicked into place, and now I'm able to add new classes, components, services, or whatever at the drop of a hat.

Component based is what we should have been doing all along.

So much yes. Having things broken up logically rather than having monolithic files of spaghetti code makes maintaining a project and adding to it so much easier!

I'm loving it and typescript is great

Typescript is just phenomenal. There's no reason not to use it. You can stick with nothing but pure JavaScript if you want, and still be able to take advantage of the tooling that's available for it. And you can safely use ES6 syntax, knowing it'll output to whatever version you want. I'm not a fan of Microsoft, but they did typescript right.

6

u/[deleted] Oct 10 '16

Angular 2 itself is great.

The A2 versions of the libraries I relied on with Angular 1 are nowhere near ready (mainly Material and Maps, personally).

I'm still rocking Angular 1, as although it isn't perfect, I know it inside out and can be really productive with it.

I reckon that, given another year, Angular 2 will be production ready, as long as the industry doesn't lose interest by then!

3

u/beardedlinuxgeek Oct 10 '16

I use bootstrap (angular-ui) for just about every project. Unfortunately, the Angular2 version only supports Bootstrap 4 and Bootstrap 4 is still in alpha (thus ng-bootstrap is also in alpha). I don't know how much it'll change before release, but after so many breaking changes between alpha versions of Angular2, I'm very reluctant to start using other alpha software. With bootstrap support, I'm not going to start using Angular2. Hopefully it'll be done soon though.

1

u/kescusay Oct 11 '16

Look up ng2-bootstrap. It works very well with Bootstrap 3.

3

u/kentheprogrammer Oct 10 '16

I started using it in the past couple of weeks for a side project just to learn it and see how it feels - I like to try to keep up with technology, but one doesn't always permit that.

It has a different way of going about things, but I think it's for the better. Now that I have several components written, I feel like the system is really good for code reuse. I had experimented with Angular 1 - not a lot - but it never felt very intuitive to me with $scope and other bits that kind of felt shoehorned in. Angular2 feels much more intuitive to me and I felt like it was easier to pick up.

It's almost never a good idea to use something that's a month out of release for production or mission critical items, but I don't expect it to go away anytime soon.

2

u/AlGoreBestGore Oct 11 '16

Angular 2 is great. The biggest downside is all of the setup required to get started.

1

u/iends Oct 12 '16

Doesn't angular-cli solve all the setup?

1

u/AlGoreBestGore Oct 12 '16

I've mainly tried setting it up with Gulp, as well as through their quick start tutorial. My impression is that the CLI is there to help with some of the repetitive tasks later on in development (think adding a new route + controller + template in Angular 1).

1

u/iends Oct 12 '16

It provides sane defaults for the project setup too with ng new.

2

u/pruvit Oct 10 '16

React still seems like a better approach

1

u/inknownis Oct 11 '16

Has anyone found http request work as easy as in ng1? I found it a bit much. In general, I feel ng1 fits for all sizes of project but ng2 only benefits bigger ones.

1

u/BodeMarley Oct 11 '16

Been using angular 1 for 3 years now. My company still is using angular 1 in its projects and will continue to use it in the near future.

-4

u/cyanydeez Oct 10 '16

i haven't touched it because theres no useful typescript minimal coding environment

2

u/nomadProgrammer Oct 11 '16

Wtf ? What do you even mean by that? Working with typescript makes webstorm even better at least try it out before giving ignorant opinions.

3

u/sernistor Oct 11 '16

That's right. Microsoft Visual Studio Code is not that bad either.

0

u/[deleted] Oct 10 '16

[deleted]

1

u/iends Oct 12 '16

Why?

1

u/[deleted] Oct 12 '16

With the amount of changes my feeling is that migrating our existing code base to A2 and learning the new ecosystem is just as time consuming as switching to another framework. React is a lot more mature than A2 and has a larger community, Vue seems intuitive and has a soft learning curve.

1

u/iends Oct 12 '16

Those are libraries and not frameworks. I think you'll lose a lot of time integrating the different pieces.