r/angularjs • • Apr 30 '15

Angular 2.0 developer preview

Angular 2.0 developer preview is finally out. Elegant and fun. http://angular.io

59 Upvotes

28 comments sorted by

View all comments

14

u/martijn_nl Apr 30 '15

I'm really having a lot of doubts about Angular 2. So far the examples I've seen are really complicated and complex.

Also, with Angular 1, I felt like we had the complete package to build rich apps. Angular 2 is going to be a ReactJS-like framework for building components, so doesn't that leave a gap there? Between full frameworks and components?

I get that the future is going to be more components instead of complete frameworks, but then still, why would I use Angular 2.0 over ReactJS, which looks way less complicated.

Someone please enlighten me.

30

u/dawar_r Apr 30 '15 edited Apr 30 '15

I felt exactly like you at first, that the Angular I learned and loved using so much was being replaced by a weird new, complicated version. But having spent a couple weeks learning typescript and more about ES6, it's actually really grown on me.

I'm very much looking forward to this release now because of the very same reason I hated it at first: it's very flexible and standards based. Angular 1 was very opinionated and there was a specific way to use it, which I actually loved or thought I loved. But sooner or later in your development career you begin to realize how that's not a good thing, how you need that flexibility and support for standards. Take third party libraries for example. If I wanted to use the facebook javascript sdk I'd either have to write my own angular wrapper for it or download one that someone else wrote. That's all fine and dandy for popular or simple libraries, they almost always angular counterparts or you can write one yourself. But when you start dealing with obscure/complicated libraries or developing angular/node apps it becomes way to complicated for them to play nice.

That's why I really like this, because it's based on standards. With angular 2.0, any future javascript libraries will almost always be compatible because they follow the same standards. Not to mention how amazing it'll be to work with intellisense since Angular 2 is based on Typescript. Seriously, just intellisense alone is enough to win me over.

As far as the React vs. Angular debate goes, it really comes down to personal opinion. I've tried out react, didn't really like it all that much but some people swear by it and that's fine. It does look like they're going in similar directions, so it comes down to what coding style you prefer. If you're thinking of switching over, ti's not like all your angular 1.0 knowledge will be obsolete in this new verison either. A lot of stuff like directives, data binding, dependency injection, etc. are being carried over.

So although at first it looks like a bad thing, trust the same developers that brought you the kickass framework you know and love to do it even better with Angular 2. They wouldn't be working so hard if they didn't truly believe it could make a difference. And if you're still not convinced, spend some time with Typescript and the dev. preview for 2.0. I'm certain you'll come around :D

EDIT: ...yea this turned out to be way longer I thought it would LOL . Here's a TL;DR:

Standards and flexibility > Opinionated Angular 1.0 Typescript and Intellisense are awesome as f*ck Trust the same developers that brought you the kickass framework you know and love to do it even better with Angular 2.

1

u/martijn_nl May 01 '15

Thanks for the write-up. And you're absolutely right, perhaps if I get in to it more, ill start to love it like I did 1.0

1

u/Rockytriton May 01 '15

Excuse my ignorance, but what are the standards that angular 2 will be based on, and are they current standards or is Google trying to define the new standards?

1

u/dawar_r May 01 '15

It's more like "extending" the standards already create by ES6. Kind of like how Angular 1.0 extended HTML by introducing directives, Angular 2 (in my opinion atleast) focuses on extending Javascript itself in a similar way. Rather than just creating a framework built with Javascript (like Angular 1) the Angular 2 philosophy seems to be more about extending the capabilities of basic JavaScript interactions with HTML so you can code in whatever style you want, rather than following a specific set of "Angular guidelines"

Hope that makes sense lol

1

u/Rockytriton May 03 '15

I see where you are coming from, but when you say that they are extending standards then they aren't actually following the standards. Unless they developed those extensions and got them approved by the standards body that developed the standards and implemented them as new standards.

Google has a history of trying to push things through as standards that don't get adopted.

1

u/dmackerman May 03 '15

Like what?

-5

u/KyleG May 01 '15

I'll believe "standards compliant" when I see it from a web product co-developed by Microsoft. They still can't get their damn browser right and it's been, what, 20 years? 30 years?

1

u/william_fontaine May 01 '15

Well, angular 2 does use typescript, which is maintained by Microsoft.

0

u/KyleG May 01 '15

That was my point. I pulled up a brief rundown of Angular 2, and first thing I see is "joint work with Microsoft" and I threw my laptop out the window.

2

u/ggoodman Apr 30 '15

Very interesting thought. I think I've had the same reaction myself.

Angular 2.x provides a set of components that can be composed to build powerful applications in similar ways to Angular 1.x. The mechanics and boilerplate for gluing these components is probably still a work in progress from a UX perspective.

That being said, having a more low-level set of primitives like Angular 2.x will open the door for powerful higher-level frameworks on top of Angular 2.x.

As to your first comment, perhaps complex is not the right word. Unfamiliar might better represent my feeling. Although unfamiliar, it is easier to understand the 'how' in Angular 2.x than trying to dispel the magic of Angular 1.x.

1

u/dvidsilva May 01 '15

I didn't think of this, thanks for sharing. Perhaps we will see more cool things like ionic coming up soon.

1

u/Streamweaver66 May 17 '15

It this a good thing? Why are frameworks on top of frameworks a good thing for the community?

-5

u/[deleted] Apr 30 '15

do you always judge a book by its cover