r/programming • • Sep 15 '16

Angular 2.0.0 officially released

https://www.npmjs.com/~angular
1.3k Upvotes

535 comments sorted by

View all comments

Show parent comments

64

u/p7r Sep 15 '16

React is as mature as it can get.

In Javascript framework terms, yes.

In programming terms, it's shiny shiny hipster candy.

5

u/choikwa Sep 15 '16

how do I know it wont be replaced by framework y tmrw?

7

u/reflectiveSingleton Sep 15 '16

Oh you mean Angular 3?

55

u/choikwa Sep 15 '16

I think it will be called Tri-Angular

16

u/calnamu Sep 15 '16

I will be disappointed if it won't be.

8

u/choikwa Sep 15 '16

well. they better grab the name in npm. oh wait, it deletes apps like garbage collector

8

u/llainebdx33600 Sep 15 '16

Angular-Merkel

1

u/weirdoaish Sep 16 '16

Meh I think Google should make DAMP instead as a full front end solution. Would totally take off imo.

PS - DAMP = Dart Angular Material Polymer. PPS - I'm not a front end dev. I make do with HTML, CSS & JQuery.

6

u/[deleted] Sep 15 '16 edited Sep 15 '16

Oh, it will be replaced. Probably sooner than you think. And the thing that replaces it (could be vue.js, could be something else) will be the best ever until something better comes around.

How should you handle that? Better choose technology that, even if they get replaced, they teach you something that you can bring to the future. For instance : had you been using browserify two years ago, but now wants to use webpack, it's easy since both use commonjs modules. But going from angular 1 to webpack is harder, because they had their own module system noone else is using.

I think Es6 is a safer language bet then typescript, which may or may not die like coffescript did. The future will tell.

So, with this mindset, is react good or bad? I think react is good, since you only use javascript and html. You don't have to learn a template language that you might not use in the future. But you will most probably use javascript and html with the next cool library as well, so the learning curve for that one will be easier. You can use both es6 modules and commonjs modules with react, which is also good.

So I totally believe that going with react is a wise choice.

1

u/vinnl Sep 15 '16

I think Es6 is a safer language bet then typescript, which may or may not die like coffescript did.

https://vincenttunru.com/TypeScript-is-just-Javascript/

1

u/[deleted] Sep 15 '16

I haven't worked with typescript, so I don't quite understand the "typescript is just javascript and all javascript is valid typescript" Is it true that all js is valid typescript? According to https://kangax.github.io/compat-table/es6/ there's a lot that isn't supported in typescript. It's that site not correct?

Like default parameters for instance, what happens if you add that to a typescript file does it compile?

4

u/Xevantus Sep 15 '16

Typescript 2.0.2 is es6, and mostly es7 complete (at least the parts if es7 that are official at this point). Anything that you would expect Chrome or FF to run would also be valid Typescript. The biggest difference is that Typescript contains the type annotations and has type checking on the transpiler. The biggest thing reason for Typescript is easing devs coming from type safe back ends into the JavaScript world. I've also found it can make intra team contracts easier. When we agree on an API contract, we make a typing file, and everyone can start (same way we used to do WSDLs for SOAP services).

3

u/vinnl Sep 15 '16

Well, yes, that's sort-of correct - like pretty much all Javascript engines, TypeScript is still working on implementing the latest features. However, you can e.g. instruct the TypeScript compiler to compile to ES6, and then either have Babel transpile down to ES5, or just trust the browser to support it.

Thus, it should never set you back in terms of compatibility, and it's not as risky as CoffeeScript - worst case, you strip the TypeScript additions and end up with the same as you would have had you never used TypeScript. (At least theoretically - I haven't put it under that much stress personally.)

However, it actually does support a lot - such as default parameters. I don't quite know what happened - when I loaded the kangax site, it said it didn't support a lot either. Only when it was fully loaded, did it correctly note TS support.

Btw, you can easily check what happens here.

1

u/theonlylawislove Sep 15 '16

Webpack killed browserify, but trust me, React is here to stay. You can take that to the bank.

→ More replies (1)

5

u/drainX Sep 15 '16

In programming terms, it's shiny shiny hipster candy.

A year ago that might have been true. I don't think so today though.

7

u/p7r Sep 15 '16

It's mature at 7-10 years, and after lessons learned about long-term refactoring have been learned and put back into the patterns of the framework.

This is not a controversial view outside of JS frameworks.

1

u/spacejack2114 Sep 15 '16

So what do people use for the first 7-10 years of other application platforms?

2

u/WimLeers Sep 15 '16

Lots of curse words and moderate use of alcohol to suffer through that phase. Programmers usually don't decide these things, managers do.

1

u/p7r Sep 15 '16

Do you understand adoption curves and how they affect technology choice in technology firms?

Most firms choose where to take stuff off the shelf and install (linux, apache, nginx), be an early adopter (say, a programming framework), or late adopter (inter-service messaging, perhaps) or perhaps even an innovator (e.g. netflix and chaos monkey, etc.).

I'm prepared to use mature frameworks for something, shiny hipster candy for other things.

People seem to be extremely angry because I'm saying React is still at early adopter territory: it's not mature, and saying it is, is silly.

It might be production ready. It might be stable. It might be awesome. It might revolutionise front-end and full-stack development for the next 10-20 years.

Fine! But it's not yet mature. And that will put people off in some companies for some cases. The only thing that fixes that is early majority to grow into late majority and eventually pick up laggards.

It perhaps has a better chance of getting there than its competitors, but that does not mean it's mature.

1

u/drainX Sep 15 '16

If there were alternatives that were as good and gave the same functionality that had been out for 7-10 years, then it should indeed be considered shiny hipster candy. You can't really say that when there aren't any real alternatives though. If there was a more stable, mature framework that offered the same things that React did, then all the big projects at big companies would be using that instead.

→ More replies (3)

1

u/MUDrummer Sep 15 '16

Yeah those crazy hipster in all these small little shops like all of Walmarts ecommerce and eBay, and the NFL, and Netflix, and PayPal, and SalesForce, And Yahoo. What a bunch of hipsters am I right?

4

u/p7r Sep 15 '16

Compare it to FORTRAN, C, Perl, Lisp, etc.

It's new.

That's OK. New things are good. They are what we do, after all.

But pretending it is "mature" when it's had a couple of years of greenfield development and nobody has really had to go back and fix up legacy monolithic applications with it, is a category error the non-JS devs in the field shake their heads at.

Given I've had loaves of bread last longer than some JS frameworks I can understand why 3 years and some high-profile use cases might trick you into thinking it is mature, but we're only just getting to the point where we're realising 10+ year old Ruby/Rails is actually mature and 5.x beats out a lot of the bad patterns we had earlier.

See the point I'm making?

2

u/MUDrummer Sep 15 '16

You didn't call it immature, you called it "shinny hipster candy". Those are not the same concept. One of those implies that it's something that just needs to grow in stability a bit more. The other implies that it's a fad and only used by people because it's trendy.

You're also comparing a client side UI framework to server side languages.

You refer to "non-JS devs" like they are a group of wise old sages that are looking at people who happen to use JavaScript as if they are a bunch of young monks just starting their training. Something is mature when you can convince the entire senior IT dev group of a Fortune 500 company that it is.

The things you listed have a specific role and place. They are mature in that space only. Modern languages and frames works have the benefit of learning from past mistakes to allow them to grow into maturity far far faster then languages that were written in the 50s and 60s. Perl 5 is a perfect example of how something can be mature and be horrible at the same time.

TL;DR: Just because something is old doesn't mean it is good. Just because something is new and popular doesn't make it "shinny hipster candy".

→ More replies (1)

1

u/dantheman999 Sep 15 '16

FORTRAN, C, Perl, Lisp

None of which are frameworks, they're languages.

1

u/p7r Sep 15 '16

You're missing the point entirely. Go have fun, whatever.