top | item 7107970

(no title)

steve_barham | 12 years ago

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.

discuss

order

heavi5ide|12 years ago

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

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

heavi5ide|12 years ago

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.