top | item 7107228

How Angular Lets Us Iterate Like Crazy

43 points| yonasb | 12 years ago |blog.chartbeat.com | reply

47 comments

order
[+] steve_barham|12 years ago|reply
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.

[+] heavi5ide|12 years ago|reply
Hi, article author here. This was more a comment on the verbosity of Google Closure's syntax. If you're not familiar with it, to get the most out of the closure compiler, you have to add type annotations in javascript comments for pretty much every function parameter, return value, constant, etc. Otherwise the compiler's static analysis doesn't really have much to work with. This makes it kind of a pain to javascript devs who are not used to this sort of thing.

Coming from Java, I probably found it a little less annoying than most javascript devs. Although in Java (as I mentioned in a footnote) you have really powerful and mature tooling like Eclipse, which--whatever else you think of it--does really help with Java's general verbosity. You're not going to find the same sort of tool help for dealing with Closure javascript.

[+] taude|12 years ago|reply
Don't forget the dependency injection pattern that Angular uses all over the place. That smells like Java, too. :)
[+] BlindRubyCoder|12 years ago|reply
"She" is becoming such a gimmick now.
[+] marquis|12 years ago|reply
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.

[+] pjmlp|12 years ago|reply
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|12 years ago|reply
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.

[+] redmattred|12 years ago|reply
Ionic is pretty good if you're looking for the whole flat iOS7 look
[+] adamors|12 years ago|reply
> UI Bootstrap, but is still seems work in progress.

If by work in progress you mean that it's not ready to be used, then you're mistaken. I use it in my current project a lot (started 6+ months ago).

[+] ChikkaChiChi|12 years ago|reply
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|12 years ago|reply
I'm not so sure iterating like crazy is a good thing.
[+] Duhck|12 years ago|reply
To be clear, our iterating like crazy is getting customer feedback and making new features or products to test new ideas as fast as possible.

A few weeks ago I was asked to make a dashboard for a client of ours on the last evening of our hack week. In two hours I had a proof of concept up, the client had a live URL and gave us feedback immediately. We are now devoting resources to making it real. We have angular to thank for that...

Source: I work at chartbeat.

Also you should checkout our product demos, our quality of product is never sacrificed. The newest dashboards really are quite useful and beautiful.

[+] Cthulhu_|12 years ago|reply
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.
[+] username223|12 years ago|reply
It works kind of like how chanting "are we there yet? Are we there yet?" makes long drives shorter.
[+] oafitupa|12 years ago|reply
Is this website the result of your crazy iterations?

http://i.imgur.com/jqy2kwo.png

[+] ehsanu1|12 years ago|reply
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.