

How Angular Lets Us Iterate Like Crazy - yonasb
http://blog.chartbeat.com/2014/01/15/how-angular-lets-us-iterate/

======
steve_barham
There's a certain irony in the poster dismissing Java with one hand:

    
    
        "In effect, to the developer it 'feels like writing Java,' which as we all know, is a terrible feeling"
    

While professing the benefits of something which looks rather similar to Java
tag libraries.

    
    
        <graph class="visitor-graph"> 
            <axis position="left"></axis> 
            <axis position="bottom"></axis> 
            <line name="typical-week" line-data="model.series.typicalWeek"></line> 
            <line name="this-week" line-data="model.series.thisWeek"></line> 
            <line name="last-week" line-data="model.series.lastWeek"></line> 
        </graph>
    

"If you’re thinking, “that’s not HTML anymore! What are these graph, line, and
axis elements?”—well, that’s the point, Angular allows us to “extend HTML” to
create those elements!"

    
    
        <cewolf:chart id="line" title="Page View Statistics" type="line" xaxislabel="Page" yaxislabel="Views"> 
            <cewolf:data> 
                <cewolf:producer id="pageViews"/> 
            </cewolf:data> 
        </cewolf:chart>
    

That's from a tag library released in June, 2002.

Lest angry Java-haters accuse me of trying to extol the virtues of JSPs,
taglibs et al, this is not the point of my post. I'm indicating the
commonalities between two modes of development separated by more than a
decade, which in the churnful world of technology might as well be separate
geologic eras.

It's interesting to compare these two things (particularly when a prior effort
has fallen by the wayside) to determine if you are implementing the same
concept in a new guise, or if you are removing the issues that people had with
prior models which led to their lack of use.

~~~
taude
Don't forget the dependency injection pattern that Angular uses all over the
place. That smells like Java, too. :)

~~~
heavi5ide
Definitely! I've used Spring's DI container before and while I wasn't a huge
fan of the (at the time) XML config, I found the experience to be pretty nice.

------
BlindRubyCoder
"She" is becoming such a gimmick now.

~~~
marquis
Given the english language requires a gender-specific pronoun (I grew up
saying "They" to the chagrin of my teacher) it always makes me a little bit
happy to see She in texts. As a woman it makes you realise how much you don't
see it. So it stops being a gimmick once the powers that be let us use a non-
gendered pronoun ("they" is perfectly fine to me). Or we see a 50/50 split and
rewrite the history books accordingly?

Anyway, on topic: we also feel the same way about Angular. Having our APIs
abstracted from the beginning into services/factories means we just throw code
into a new directive or controller and boom: instant functionality that
doesn't cost us a million hours.

~~~
benpbenp
When I see "she" it makes me reflexively stop and look back to make sure I
haven't missed something, wondering, "who is this 'she', I must have skipped
the paragraph introducing the subject."

This is definitely bad for readability, the user, and all that. Please, anyone
reading this who complains about line-heights and font-sizes, pay attention to
grammar as well.

~~~
jiggy2011
From the article (the first time "she" is used):

"The developer refuses. She’s worked too hard on Feature X, and dammit, you’ll
have to pry it from her cold dead hands!!!"

With the exception of the unnecessary extra !! I don't see what is wrong with
the grammer, it's clear in this context that "she" is the developer.

~~~
coldtea
"Let's artificially use the statistically unlikely case that the developer is
a woman, in order to inspire more women to be programmers"...

What kind of BS magic thinking is that?

If you want to inspire women, teach them about the technology as girls and
encourage those who like to work with it.

Pronouns ain't where it's at.

~~~
girvo
I disagree with you. Although I stick to "they" as I think it's perfectly fine
grammar wise, you getting upset because of your own bias and thinking it's an
issue because the author wrote "she" instead of "he" is a bit silly, in my
opinion.

Edit: Oh, and language has a massive effect on our thinking patterns, so yeah,
you actual could possibly make the case that pronouns matter. They don't to
me, at all, and if they "don't" to you, why express frustration or call it
"BS"?

------
pjmlp
I have been looking into Angular, however I am yet to find it any productive
gain as being told here.

From what I was able to find out, there isn't any UI component framework
available for Angular with the same set of components offering as jQuery has.

For developer teams that haven't a clue about CSS dark magic as guys with
designer background have, this is a big impediment to use Angular.

I have looked into UI Bootstrap, but is still seems work in progress.

Is there any UI component framework for Angular?

~~~
sgt
Look at angular-ui.

A lot of people just invoke jQuery from directives. Sometimes I catch myself
doing it from the controller, although that is definitely bad practice.

~~~
pjmlp
Thanks for the reply. Angula-UI seems a bit too simple in terms of available
set of components.

I got the idea that although you can use jQuery, it is an anti-pattern and not
guaranteed to always work. At least from what I could find in SO and blogs.

My main problem is that I and many others in our teams, don't have any problem
doing native UIs, but always get lost in the HTML/CSS/JavaScript jungle
without designer help. Regardless of the experience level in web projects.

~~~
camus2
> I got the idea that although you can use jQuery, it is an anti-pattern and
> not guaranteed to always work. At least from what I could find in SO and
> blogs.

Only jQuery haters say that. jQuery is totally compatible with Angular,and
Angular ships with its own jQuery lite, replaced by jQuery when available. The
only thing you need to do is wrap jQuery calls into a directive. I use jQuery
and plugins all the time with Angular, never had a problem ,as long i dont
call jQuery from a controller , only in directives.

~~~
pjmlp
Thanks for the info.

------
ChikkaChiChi
AngularJS is the best tool for building views that I have come across thus far
in javascript.

When I write a view (most of my web apps consume JSON and display it to our
end users) Angular leaves me with the cleanest markup I've been able to write
to date.

It does seem to get slightly unwieldy if I want to start using additional
libraries outside the scope of Angular (such as when I needed to add Google
Charts), but for iterating it's the slickest thing since the invention of the
ice cube.

------
largehotcoffee
I'm not so sure iterating like crazy is a good thing.

~~~
Cthulhu_
Well, the alternative is working for days / weeks on a feature that the end-
user may not even use (is the message I'm getting from this article). Being
able to create and alter a feature quickly is important in an agile
environment.

~~~
onion2k
There are better ways to discover whether a feature is wanted than hacking up
a test version and seeing if the users use it. The idea is to test whether
people want it _before_ that stage. You can ask them, but often they'll say
yes regardless because things often _sound_ great. On the most basic level,
adding a UI element that responds with nothing more than a "Coming soon!"
message and measuring if anyone clicks it works brilliantly.

~~~
jiggy2011
That has to be one of the most frustrating UI patterns out there, clicking a
button and not knowing whether it will do what it says or say "haha, nope!".
It's bad enough when apps do this to try and persuade you to upgrade to the
pro version.

What you want to know is not just whether people click the button , but
whether having a certain feature available changes the way that people
actually use your application.

------
oafitupa
Is this website the result of your crazy iterations?

[http://i.imgur.com/jqy2kwo.png](http://i.imgur.com/jqy2kwo.png)

~~~
ehsanu1
No, that's due to Ghostery. Recognized it as soon as I saw your image.
Ghostery breaks lots of sites, even those it isn't explicitly blocking.

~~~
possibilistic
Ghostery doesn't break "lots of sites". This is one of possibly two or three
pages I've noticed in the last year that have been broken by Ghostery. That's
hardly an epidemic. (But perhaps this is an issue of sampling.)

Given Ghostery's popularity, I would almost venture to blame the website for
this unintended behavior, not the plugin--even if they're keeping to standards
and good behavior.

~~~
CatMtKing
Is this due to JavaScript blocking? I mean, the whole premise of using
AngularJS is that the client is executing JS..

~~~
ehsanu1
It's blocking tracking scripts/pixels/etc. If a site's JS happens to rely on
some external tracker having been loaded, it can break the site. I think
that's what's usually happening here. Moral of the story: don't rely on
external scripts people.

~~~
rhizome
I think the moral is more that if you're not going to let them track you
however they want and using whoever they want, they'd rather not have you as a
visitor.

