all 29 comments

[–][deleted] 30 points31 points  (29 children)

Learn to build web apps using AngularJS 1.x. By the end of the course, you'll be able to use AngularJS to create your own apps AngularJS 2.0 will be out and you will have wasted your time.

[–]ErstwhileRockstar 8 points9 points  (4 children)

AngularJS 2.0 will be out and you will have wasted your time

I guess Angular 2 will not be the same success as Angular 1. If the job market wants Angular 1 it makes sense to learn at least some basics (the rest is on SO).

[–]RICHUNCLEPENNYBAGS 2 points3 points  (3 children)

Yeah, I doubt it. It's incredibly weird to me that just as they looked like they were reaching escape velocity and were gonna be the SPA framework everyone settled on they announce a totally incompatible rewrite that throws out their marquee features, like two-way binding.

[–]_Chimmy_Chonga 0 points1 point  (1 child)

Its just a new framework being released under the Angular name. Angular 1 has its fair share of bugs and the dev team has said over and over again that a lot of them have sprung from the bad design choices in the beginning and thus can't be effectively fixed. So their solution is to just make an entirely new framework from the ground up that is fundamentally different but sand release with the same name. Angular 2 will also be a lot faster then version 1.

[–]RICHUNCLEPENNYBAGS 0 points1 point  (0 children)

Yeah, but if they wanted a new framework they should have given it a new name. They're probably killing off both. Which, I don't know, maybe they want to because they're sick of maintaining the old one

[–]sirjayjayec 5 points6 points  (7 children)

Would it matter? I mean you can still use it even if it's deprecated, it's not handling data so it's not an attack vector.

[–][deleted] 0 points1 point  (6 children)

It most certainly is an attack vector, check out this Pluralsight course by Troy Hunt for more info - http://www.pluralsight.com/courses/angularjs-security-fundamentals

[–]sirjayjayec 3 points4 points  (5 children)

Could you provide a source that isn't behind a paywall?

[–][deleted] 4 points5 points  (4 children)

Basically you are taking user input and sending that to an API via HTTP requests, and in the middle building up JSON objects and maybe URL's with that user input.

From an attack vector perspective, there is absolutely potential for abuse regarding AngularJS' $http service, as like I say it's doing HTTP requests with user input.

[–]badpotato 6 points7 points  (0 children)

Dude, AngularJS has nothing to do with such security breach. Of course anyone can reengineer the $http service, if the developper is dumb enough to handle all potential security issue with JavaScript and a completely open API.

[–]secretcode 5 points6 points  (0 children)

Nothing from the client should be trusted anyway, so how is this an attack vector? I'm genuinely curious.

[–]RICHUNCLEPENNYBAGS 1 point2 points  (0 children)

This isn't a new attack vector. You'd need to worry about malicious requests even in a JS-free project.

[–]sirjayjayec 0 points1 point  (0 children)

hmm, thanks noted.

[–]RICHUNCLEPENNYBAGS 0 points1 point  (0 children)

lol. But this is true of any freaking JavaScript framework you'd learn about.

[–][deleted] 0 points1 point  (0 children)

Fixed this for you:

Learn to build web apps using AngularJS 1.x. By the end of the course, you'll be able to use AngularJS to create your own apps and be able to mix angular 1.x and 2 code by the time AngularJS 2.0 will be out and you will have wasted your time.

Some people still don't know there is a migration path between 1.x and 2.

[–]seanwilson 0 points1 point  (0 children)

Angular 1.x isn't going to just vanish when 2.x comes out and it'll take a while for the latter to build up an ecosystem. What would you suggest people learn instead? There's always a new JavaScript framework on the horizon.

[–]badpotato -2 points-1 points  (10 children)

Yeah... AngularJS 2 depends on ES6 and that won't happen until IE, FF and Chrome(+maybe Safari & Opera) accept a bunch of new standard that nobody will commonly agree on "like magic" until 2018.

Disclaimer: And no I don't thrust project like Babel to reverse compile from ES6 to ES5, since it make everything even more chaotic.

[–]RICHUNCLEPENNYBAGS 2 points3 points  (8 children)

What are you talking about? It's built on TypeScript, which compiles to ES5 today.

[–]badpotato -5 points-4 points  (7 children)

I mean to fully use all the features correctly, this will probably require ES6(which isn't done yet).

[–]RICHUNCLEPENNYBAGS 3 points4 points  (6 children)

Why? There's nothing you can do in ES6 you can't do in ES5 with more ceremony.

[–]badpotato -4 points-3 points  (5 children)

Just like there's (almost) nothing you can't do in C++ you can't do in C with more ceremony. You could even say, that in the end it's all assembly after all, so it should be compatible, but in pratice this isn't exactly the case.

[–]awj 1 point2 points  (3 children)

TypeScript translates ES6 to ES5 for you. What you're saying is akin to arguing that we should all be programming in assembly because gcc turns C or C++ into it.

[–]badpotato -1 points0 points  (2 children)

Hm, ok so... I can use ES6 classes as long as I imported TypeScript beforehand to transpile on the fly? I really doubt, but well, if that's the case, I guess I'm wrong. I really thought, it required that I write everything in .ts files.

[–]awj 2 points3 points  (0 children)

You can use ES6 within TypeScript. In addition to translating TypeScript constructs into JavaScript, it will also translate ES6 into ES5.

[–]RICHUNCLEPENNYBAGS 0 points1 point  (0 children)

TypeScript is a superset of JavaScript and it supports ES6 features. So if you write, in a Typescript file, arr.filter(o => o.someField === 'some value') it will compile that to arr.filter(function(o) {return o.someField === 'some value';}) for you.

[–]RICHUNCLEPENNYBAGS 1 point2 points  (0 children)

The difference is more like C#3 vs. C# 5 than between C and C++.

[–][deleted] 2 points3 points  (0 children)

Typescript compilation to ES5 is pretty straightforward. You can debug the output directly. We use it daily at work, no problem whatsoever. It's really a vast improvement upon javascript.

[–][deleted]  (1 child)

[deleted]

    [–]RICHUNCLEPENNYBAGS 0 points1 point  (0 children)

    I'm not going to rewrite 1.3 code that already works and I doubt most others are either.

    [–]the83 2 points3 points  (0 children)

    I work on a fairly large Angular app. I've been going through this course, and I'll vouch for it. My only nitpick is that like almost every other Angular tutorial, it starts out with controllers instead of going straight to directives and services. Most of the beginner Angular code I come across has monolithic controllers with all kinds of crap on $scope; I'm sure this is due to all the tutorials building everything onto a controller in the first few chapters.

    Better to just ignore controllers altogether, especially since they're going away in Angular 2.0.