
I was wrong to be afraid of Angular.js - pistoriusp
http://daemon.co.za/2014/03/wrong-to-be-afraid-of-angular/
======
onion2k
I've learnt that it's far, _far_ better to try a library and find that it's
everything you feared than to fear it and not try using it. Occasionally it's
not as bad as you thought it was going to be, and very occasionally it's
actually rather good. Unless you're willing to endure the repeated feeling of
failure than you get from trying something and not getting anywhere with it
(which is ultimately what we're afraid of when we don't try things) you'll
never be able to use the tools that are the best fit for you.

~~~
logicallee
Confirmation bias? (Due to the experience you had every time you finally did
bite the bullet). I ask because by that argument every single person should
try every single technology.

For example, by your argument you should try AccDC, Ample SDK, AngularJS,
CupQ, DHTMLX, Dojo, Echo3, Enyo, Ext JS, Google Web Toolkit, jQuery, midori,
MochiKit, MooTools, PhoneJS, Prototype & script. aculo.us, Pyjamas, qooxdoo,
Rialto Toolkit, Rico, SmartClient and SmartGWT, Wakanda, YUI, ZK, Webix, and
Web Atoms JS. Why don't you start tomorrow?

While you're at it, don't forget

AccDC, Dojo Toolkit, Glow, jQuery, midori, MooTools, Prototype JavaScript
Framework, YUI Library, GUI-related (Widget libraries), Ample SDK, DHTMLX,
Dojo Widgets, Ext JS iX Framework, jQuery UI, Lively Kernel, qooxdoo,
Script.aculo.us, SmartClient, Graphical/Visualization (Canvas or SVG related),
, D3.js, JavaScript InfoVis Toolkit, Kinetic.js, Processing.js, Raphaël,
SWFObject, Three.js, EaselJS, part of CreateJS, Web-application related (MVC,
MVVM, or otherwise), , AngularJS, Backbone.js, Cappuccino, Chaplin.js, Echo,
Ember.js, Enyo, Google Web Toolkit, JavaScriptMVC, Knockout, Rialto Toolkit,
SproutCore, Web Atoms JS, Wakanda Framework, Pure Javascript/AJAX, , FuncJS,
Google Closure Library, Joose, jsPHP, Microsoft's Ajax library, MochiKit,
PDF.js, Rico, Socket.IO, Spry framework, Underscore.js, Wakanda Framework,
Template Systems, , Cascade Framework, Handlebars, jQuery Mobile, Mustache,
Twitter Bootstrap, ZURB Foundation, Unit Testing, , Jasmine, Unit.js, Other,
and Modernizr.

Well, see you in 2015!

------
mattmanser
Post is half finished, doesn't explain the interesting bit of why it's not
wrong to be afraid.

I also wonder if a small 2-week project is complicated enough to hit the usual
idiosyncrasies of auto-magical frameworks that suddenly cause your code to
contort into spaghetti.

Usually it's things like "I _have_ to get hold of the error, how do I do that?
[Googling]. Oh, I can't. Bugger." or "I need to step in before it does this
render to slightly tweak the data. How do I do that? [Googling]. Oh, I can't.
Bugger.".

~~~
coldtea
> _Usually it 's things like "I have to get hold of the error, how do I do
> that? [Googling]. Oh, I can't. Bugger." or "I need to step in before it does
> this render to slightly tweak the data. How do I do that? [Googling]. Oh, I
> can't. Bugger."._

Well, if tons of big apps have been written in the framework, including by
Google, then you shouldn't have problems, unless you're doing it wrong or your
app is "unique".

~~~
taeric
Agreed with the other poster on this. This is dangerously close to saying you
should just use the framework that worked from years ago.

I want to note that I actually agree with this mentality for a large portion
of what is getting written. Many shops should spend less time building their
apps than they do a framework to build all apps. Worse, many people should get
a few more apps under their belts before they build another framework.

It seems that the reason it is so easy to write todo lists in every framework
is that is about as far as people are able to get them before they start
hitting the dirty details.

~~~
taeric
I realize I have some typos up there. Apologies if that messed up any
understanding.

------
nikon
Having used AngularJS since July 2013, I can't really say a bad word about it.
It's a truly brilliant framework.

Tips:

\- UI-Router will make your life easier when your app gets larger

\- Don't ignore directives

\- Try and use TDD early with Jasmine

If you want good code examples, the AngularUI projects look very well written.
The UI Router code is pretty good.

One word of warning: public sites = headache for SEO.

~~~
PhilipA
You can try to use something like prerender.io.

------
pothibo
Because framework that big takes months to understand and discover, a 2 week
project is the same as a 'hello world' when it comes to gauging a framework.

You're in the enlightenment phase. You start to understand some critical part
of the framework and you feel giddy about it.

However good angular.js is, your feeling right now is due to you wrapping your
head around angular, not angular being awesome.

I strongly think it's a dumb idea to jump around framework that does the same
thing (1 project rails, another nodejs, another sinatra, etc.)

Choose angular, or backbone, or ember and stick with it, you'll learn a lot
more.

~~~
craigching
> Choose angular, or backbone, or ember and stick with it, you'll learn a lot
> more.

I agree that there is a problem of depth of learning of a framework (or any
third party library that you use), but to suggest that you only learn one is
not the best way to go about it either. As always in life, balance is a good
thing. Sometimes learning another library/framework/whatever is a good way to
learn about your current "one" library/framework/whatever.

~~~
pothibo
It was meant as a general statement. I'm not advocating to stay with the same
framework for your whole career.

I'm advocating for having a deep understanding of a framework of your chosing
before changing so you actually understand why you are changing.

I believe we think the same thing.

------
matt_s
I looked at Angular a while ago in comparison to Knockout.

Angular strikes me as one of those frameworks that requires you to get to a
certain mental state in order for you to use it. Maybe it just requires an
extensive project being built to really appreciate it.

For someone doing web development on a casual basis there is too much meta and
magic under the hood with Angular. When you have to quickly get up to speed on
something you (or someone else) wrote but haven't touched in days or weeks
then I'd prefer not have to do mental gymnastics before getting stuff done.

I'd prefer KISS and obvious solutions.

~~~
mcv
It's important to realize that Angular is not simply a library, it's a
framework. It starts up your app for you based of stuff you declared
somewhere, and then it calls your code when your code is needed.

It's actually quite comparable to frameworks like Spring, Wicket, Grails,
Rails etc. The magic under the hood is not significantly different from the
magic of those frameworks. It presents you with an environment to work in,
rather than only doing what you tell it to. That environment can be limiting
in some ways, but it also handles a lot of boring stuff for you. You need to
learn how to work in that framework, but once you do, you're up to speed much
faster.

------
joelhooks
In my experience with Angular, both in the capacity of using it and teaching
it, is that there is this huge amount of rote facts that need to be absorbed.
THAT is the "steep learning curve" that people talk about. Directives, for
instance, require understanding of what "@", "=", and "&" mean in relation to
your isolated scope...

The analogy that I present that it is like multiplication tables and algebra.
If you don't have the FACTS by rote, it is a way harder to do useful work.

A nice set of ng-flashcards would probably be very useful :>

------
adyus
This post is interesting because I can't remember the last time I read a
programmer's blog dealing with emotions and how it _feels_ to program.

We're not cold, calculating automatons. We get scared, frustrated, angry, but
also elated, excited and encouraged. Yet these kinds of words don't find their
way into blog posts very often.

Kudos for stopping the post there and splitting the intellectual half for
later.

------
iopq
I was right to be afraid of Angular.js

I had some kind of a header caching bug where changing the headers on log-in
didn't work properly... but only once out of ten times. Really annoying thing
to track down and ultimately something I never fixed because I didn't know
where to start. This is why people use Angular once you logged in, not for
their entire site.

------
pistoriusp
I think Adriaan's description of having it "feel" almost emotional rather than
strictly intellectual is a good example of his intuition and experience
playing a role rather than a pure academic understanding.

I think this was described in Malcom Gladwell's Blink.

I have a similar methodology which I coined "dumb-ass software development."
The basic premise is that you're meant to build software that isn't too
clever.

------
yukichan
Angular.js is a JavaScript framework. It has an API that does stuff. You can
look at the source code to see how it does that stuff. It helps you add events
to elements and listen for state changes. Why would that be scary? You're
going to have to learn one of these all the time if you want to do frontend
development. They live shorter than fads these things, although maybe
Angular.js won and will stick around.

~~~
Wintamute
Angular has managed to do things in a remarkably different way to most of the
other JS frameworks out there. Opinionated app structure, enforced strict
separation of concerns, views are live DOM, strictly no DOM manipulation in
controllers, promises used liberally, testability right up front, etc. ... I
agree its just a framework and your heuristics for framework evaluation are
still valid, but it's at least understandable that your average
jQuery/Backbone dev could feel some trepidation before diving in ... it may
represent an enforced "level-up" in terms of their entire approach to building
web apps.

~~~
lerouxb
I agree with you except the "level up" word choice. That implies that it is
necessarily better, whereas I still think that's up for debate.

I think we've all been burnt by "magic" code before. A good "smell" for that
sort of thing is when newbies start asking questions on stack exchange like
"How do I do this in Angular?" when they should be asking "How do I do this in
JavaScript?" (or rather "How do I do this at all?").

~~~
altcognito
For example, lets just create a controller on the fly.

[http://stackoverflow.com/questions/15250644/angularjs-
loadin...](http://stackoverflow.com/questions/15250644/angularjs-loading-a-
controller-dynamically)

Lets do something even more basic, like use HTML5 push state:

[http://stackoverflow.com/questions/11095179/using-
html5-push...](http://stackoverflow.com/questions/11095179/using-
html5-pushstate-on-angular-js)

Oh, that's "easy", how could I have missed that in the API docs?

[http://docs.angularjs.org/api/ng/provider/$locationProvider](http://docs.angularjs.org/api/ng/provider/$locationProvider)

Oh.

------
tcopeland
Along the same lines, I just posted a list of things I deferred in order to
get my first Angular / Rails app out the door -
[http://thomasleecopeland.com/2014/03/12/doing-a-rails-
angula...](http://thomasleecopeland.com/2014/03/12/doing-a-rails-angular-
mvp.html)

------
AdrianRossouw
So it seems the right time to announce Werewolves.io -
[https://news.ycombinator.com/item?id=7385206](https://news.ycombinator.com/item?id=7385206)

It's a WebRTC based version of the famous party game Werewolves/Mafia.
Supports 7-16 players.

------
lmm
So was the project any good, or was it the kind of unmaintainable nightmare
you feared? I've learnt from bitter experience to trust my programming
instincts even when I can't justify them logically.

~~~
AdrianRossouw
it was some of the most fun ive had programming in a while.

daemon.co.za/2014/03/mirror-tumblr-picture-blogs-browsr/

------
calgaryeng
What exactly does "full-stack javascript developer" mean? You can write NodeJS
on the backend and jQuery on the frontend?

~~~
gaoshan
I expect it means that the developer can handle both backend and frontend
related javascript (like, they are comfortable working with nodejs, expressjs,
Angularjs, Emberjs, etc.)

------
platinumdragon
Post doesn't even touch on the subject of the title, and you have a typo where
you ask for new challenges.

------
shidhincr
Well thought and said. I guess the post is incomplete; waiting for the second
part

------
applecore

        o·ver·blown, ˌōvərˈblōn/
        1. excessively inflated or pretentious.
           "overblown dreams of glory and success"
        2. (of a flower) past its prime.
           "an overblown rose"
    

These JavaScript frameworks are _overblown._

~~~
swalsh
Just curious, have you tried Angular? I had a similar thought until I started
using it... than I realized, it kind of changed things in a very big way. In
some ways, that was bad, but in even more ways it was a really big relief.

~~~
applecore
Yeah. Backbone.js is better.

------
insertnickname
Loading content via JavaScript is a terrible idea.

