
Learn AngularJS - tilt
http://www.codecademy.com/learn/learn-angularjs
======
hippich
If you don't know anything about client-side frameworks and consider Angular
as your first one, keep in mind following:

* This is Angular 1.x course. Angular 2, which is in the development right now, totally different.

* Knowledge you learn from using Angular is unlikely to be applicable to any other client-side framework, as original creators invented many new terminology as well as their approach to many things is unique (not necessarily in a good way)

* A lot of "magic" will prevent you from understanding what is really going on behind scene.

~~~
jhall1468
Your latter two points are odd since they are directed at Angular when they
can be used to describe literally every frontend framework ever created. The
third point, in particular, is fundamentally what a framework does... it does
some "magic" in the background to prevent you from HAVING to understand what's
going on in the background.

The second point is one of the tired pieces of non-sense that seems to never
go away. Their was NOTHING wrong with the Angular 1.x approach to web
development, because it started some time before the initial release in 2009.

A proper warning for anyone learning AngularJS should be a warning for any
frontend framework:

* Much of the code abstracts away the DOM and some Javscript nuances, so don't expect learning a front-end framework to be the same as learning JS (In the same way that learning Rails is not learning Ruby).

* All client-side frameworks take somewhat different approaches, and often use new terminology to explain that approach. This does not necessarily translate from one framework to another, but can.

* Angular 2, an in-development long-term replacement for Angular 1 uses a very different approach to development, and will not translate well from 1.x to 2.x. However, Angular 2 is a modern-browser only framework, and the 1.x will be developed for the foreseeable future.

~~~
lhorie
> Your latter two points are odd since they are directed at Angular when they
> can be used to describe literally every frontend framework ever created.

I disagree. There are abstractions whose knowledge is easily transferable
(e.g. promises, looping through a list of DOM elements), and abstractions that
are not (e.g. directives/transclusion/$compile/etc). Angular is notorious (and
has received a lot of flak) for having a lot of the latter, so I think the
non-portability/magic warnings are warranted.

~~~
debaserab2
When have you ever picked up code that was written as an integral part of an
application using a framework (not just a library) and dropped it into another
completely different one without a fair amount of re-work?

~~~
lhorie
Code and knowledge are two different things.

Unless you're using highly well-established APIs (such as promises), then of
course, you'll have to rewrite things to match the new expected syntax.

Portability of knowledge is a different beast. For example, the vast majority
of ng-repeat related concepts is completely non-portable (think `ng-repeat-
start`, `track by`, `(x, y) in foo`, `$index`, etc). You learn that `ng-
repeat="x in foo | filter: bar"` is equivalent to a for loop that displays
only some items, but you can't really apply that knowledge anywhere outside of
Angular.

You can't reuse your basic knowledge of for loops and if statements coming
into Angular, and you can't use your knowledge about the pipe syntax anywhere
else when you leave Angular.

In contrast, a framework that employs `.map` and `.filter` might teach you a
bit about FP, and this is something you can use in Angular, Ember, React, and
even vanilla js.

~~~
jhall1468
You are moving goal posts.

You are arguing that syntax equals mobility which is incorrect. .map and
.filter can have different syntax depending on the language, just as ng-repeat
(the equivalent to a for loop) has a different syntax than a for loop in Perl.

Knowledge and syntax are two different things as well.

~~~
lhorie
> You are arguing that syntax equals mobility which is incorrect

No, I'm saying that the knowledge of the concepts of map and filter (as an
example) is easily transferable even if syntax isn't. Once you understand
those concepts, you can go look up the Ruby/Haskell/whatever syntax and you
can reuse your new knowledge of higher order functions, and maybe learn about
transducers, or maybe you can go look into point-free style, and the
testability benefits of pure functions vs procedural style, etc, etc, etc. Not
to mention that by knowing `.map`, you already know a great deal about the
template languages for React, Mithril and Mercury.

In contrast, say I've learned about pipe operator precedence in ng-repeat
expression clauses. Now I know I can write `x in (foo = (bar | filter: baz))`
to memoize a filtered list for use later in that template. But only in Angular
template expressions. But not in Javascript. Or Ruby. Or Haskell. And it's a
terrible idiom to use in Angular anyways because [insert long rant about a
bunch of unrelated topics].

Aside from the knowledge that operators can be recursively composed into god-
awful expressions, what part of all that is useful if I migrate to Ember?

Or, say I learn about directives, and transclusion and the ngModel attribute
micro language, and $compile and priority and the ngModelController API and
...

These are most certainly not syntax-related concepts. What does learning
_that_ get me?

------
davexunit
Don't bother. Spend time with a JavaScript framework that will actually reward
your time spent. AngularJS 1.x has a steep learning curve due to over-
engineering, a terrible templating system, and is completely incompatible with
the upcoming AngularJS 2.x series.

If you're looking for your very first single-page application library, try
MithrilJS. It's small and easy to pick up quickly:
[https://lhorie.github.io/mithril/](https://lhorie.github.io/mithril/)

~~~
debaserab2
That's an odd conclusion to reach: what drew me into Angular in the first
place was it's extremely shallow learning curve. Going from nothing to
prototype is extremely fast, and if you mock your data correctly, can be
leveraged into production code.

What eventually pushed me away from Angular is the performance of the scope
digest cycle (which you won't even notice until you've built a large enough
app to have a problem) and the odd state management issues that arise as a
result of two way data binding.

~~~
woah
What's your background? Did you do a lot of 'classic OOP' before picking up
JS?

~~~
debaserab2
No, I've been programming javascript just as long as any server side language
I've used that was OOP oriented.

------
waitingkuo
The platform to teach angular.js is built with Reactjs[1]. That's interesting.

[1][http://www.infoq.com/articles/reactjs-
codecademy](http://www.infoq.com/articles/reactjs-codecademy)

~~~
artursapek
I did a write-up recently about how and why we're using React. You can read it
here. [http://artur.co/articles/moving-codecademy-to-es6-webpack-
an...](http://artur.co/articles/moving-codecademy-to-es6-webpack-and-react/)

------
PopsiclePete
Is there an _actual_ reason to use AngularJS that's not just hype? It seems
incredibly over-engineered to me, compared to something like React. I realize
it's the newest, coolest thing, but...why?

~~~
enrmarc
From the official website of both technologies: React: "A JavaScript library
for building user interfaces" AngularJS: "AngularJS is a structural framework
for dynamic web apps".

So, aren't they two different things? (Honest question since I haven't play
with React yet).

~~~
dntrkv
Yes, they are. React deals with more of the templating side of things (many
people use it as the V in MVC, or in some cases as the V & C). But along with
React, Facebook also released their Flux architecture which isn't a framework
but a new approach to the MV* pattern which many people are using with React.
Part of the Flux architecture is a concept called "Dispatcher" which handles
the flow of data throughout the app. Facebook did release their code for their
implementation of a Dispatcher but not much else. So React + Flux can act as a
complete framework, but React alone does not.

------
ebbv
Yeah learning Angular 1.x right now is pretty much a waste of time. I learned
it last year and feel like a sucker due to the drastic changes in 2.

~~~
ExpiredLink
But demand for Angular 1 is still high. Who knows if 2 will be such a great
success.

~~~
brandall10
I spent the majority of last year working on an Angular project, and I have 3+
years as a Rails dev.

One thing that's surprised me is I get nearly as much attention from
recruiters for Angular work as for Rails. I think this is mostly due to the
.NET world embracing it, they tend to be enterprisey gigs.

Give it a few years, and Angular 1.x is going to be like COBOL in the early
90s. Lotsa code out there to maintain...

~~~
wwweston
And everyone loves enterprise maintenance gigs!

~~~
ExpiredLink
... if they pay handsomely.

------
andrewrice
For those interested in learning Angular, here's a compilation of resources
you might find useful: [https://github.com/timjacobi/angular-
education](https://github.com/timjacobi/angular-education)

------
borgia
To those saying don't learn angular, which frameworks would you suggest
instead?

~~~
UUMMUU
As many people are echoing in the comments, I'd go with React just because
it's so easy to get started with. Once you get into it, the Flux pattern is
pretty sweet although it's being morphed to use Relay/Graphql which are pretty
creative.

Also, React Native is the new way they're proposing to build native mobile
apps; definitely new but worth it to learn React in case this works out.

I would definitely push people towards learning Meteor. I know it's a full
stack framework instead of just a front end framework but for rapid
prototyping, it's fantastic. The community for Meteor is a bit hit or miss
because it's so "magical" but it's worth a look too.

Disclaimer: I've only ever done about a week of Angular so I cannot compare
features.

~~~
megaman821
Angular vs React isn't a great comparison. For all but the most trivial of
apps you will need to use a lot of ancillary libraries.

It is more like:

* React

* React-Router

* JQuery (for the AJAX functionality)

* A library for or to help build Observables like EventEmitter, RxJS, or BaconJS

* Immutable.js is useful in many projects

There are also many patterns that have cropped up with React like Flux or
Container-Component.

For a newbie, getting started with Angular is much easier.

~~~
hajile
Angular really needs ui-router, lodash/ramda, and jquery (for more than just
AJAX).

React doesn't need a router for many uses (extending existing sites), but does
need lodash/ramda and an AJAX library. ImmutableJS is useful for both angular
and react (as is rxjs/baconjs). For a beginner, I would simply say React,
Reflux, Ramda, and jQuery will do 90% of the things. Learning all four of
these libraries (they probably already know jQuery) will take less time than
Angular and be more flexible if they want to swap one out later.

Finally, adding these is much easier with commonJS than the angular dependency
injection (often on top of commonJS).

~~~
megaman821
I like all the libraries that you end up having to use with React (and I end
up using Lodash with everything anyway). I also think React is a better
solution most of the time, but it requires knowledge of the JavaScript
ecosystem to grab all the libraries you need whereas Angular does not. As a
newbie it can be hard to identify not only what libraries you need but also
what is the best of breed.

------
Sharma
Every time a new framework appears, it feels like this is it. But as time
passes you start seeing people's feedback and experiences. I see same pattern
for AngularJS, Backbone.js and the recent one React.

So, the point is, don't believe the hype, try yourself and then decide if it
is for you or not.

------
charlysisto
Right now on HN "Learn AngularJS" is standing right above "Don't React" :-)

~~~
EugeneOZ
Actually this thread is full of comments "don't use AngularJS, use my favorite
SomeJS".

------
waitingkuo
Is it Angular 1.x or 2.0?

~~~
sehr
1.x

~~~
bshimmin
It ought to mention this somewhere, no? Otherwise I suspect some people might
feel they'd wasted 5 hours learning a possibly-soon-to-be-outdated technology.
(This would be less important for Rails, say, where the changes between 4 and
the next major release - or even between 3 and 4 - would be less drastic.)

~~~
cbee17
You're right, we probably ought to mention that in the description, regardless
of how long the Angular team will be supporting 1.x. Sending that feedback to
the content team.

ETA: [http://www.codecademy.com/learn/learn-
angularjs](http://www.codecademy.com/learn/learn-angularjs) "Learn how to
build web apps using AngularJS 1.x. By the end of the course, you'll be able
to use AngularJS to create powerful apps of your own."

~~~
bshimmin
Great! Well done.

------
ph4
So what should we be learning if we want to be exposed to high-level, highly-
transferrable concepts related to front-end frameworks?

------
esseti
when will the angular 2 release? i just (10 minutes ago) complete the first
course on codeschool. but since there's this big change i'll wait before
taking the next one.

~~~
eanplatter
I believe it's to be released later this year. If you're learning front end
frameworks thought 1.x still isn't a bad bet. Angular2 is going to be
dramatically different, and because of that, they are going to maintain 1.x
for quite some time after 2 is released.

Also, the job market for Angular developers is high, and a lot of those
companies wont be migrating instantly. If you're looking to get into the field
1.x isn't a bad bet.

You'll have to learn Angular2 someday, but then again, the life of a front end
developer is constantly learning new frameworks / technologies.

------
SFjulie1
Learn angular, we need moare minions to overcome the world with insanity.

Anarchy!

Angular has been created by the illuminatis to drive people crazy, help them,
help the chaos spread the world.

Mouhahahahah

(Yes I can do angular, and yes it is insanely complex and shitty with a lot of
Java desgin patterns like IoC from the GoF that are very suitable for java,
but totally useless in javascript... Someone still must think we are in the
90's and that the java in javascript means they are related)

