On Jul 24, 5:02 pm, Mark Rathwell <mark.rathw...@gmail.com> wrote:
> Wasn't it just a couple weeks ago that you were arguing that everything
> should be more like Java?  Now you're arguing that Google Closure is bad
> because it has some similarities to Java development (mainly verbosity and
> documentation).  I'm honestly not sure if you are just trying to be
> controversial, or to appear smart, but I'll bite (time for a break anyways).
>
> Closure is not idomatic javascript:
> ---
>
> Do you have an actual argument from experience here, or are you
> regurgitating what you've read in articles like [1].  Is CoffeeScript
> idiomatic javascript?  How about Dojo?  SproutCore?  jQuery?  What exactly
> is idiomatic javascript?
>
> vs. jQuery:
> ---
>
> jQuery is awesome for adding dynamicity and ajaxy stuff to page based web
> apps, I don't think anyone argues that.  And it is extrememly simple, not
> even requiring the user to know any javascript to use it.  This is why it is
> so (deservedly) popular.
>
> Large scale, single page applications are a different thing than page based
> sites, however.  Writing these types of apps with only jQuery quickly turns
> to spaghetti.  There are some nice libraries/frameworks out there, like
> Backbone and Underscore, that do a very nice job of making it cleaner and
> scalable.  These are all still fairly young though, to be fair.
>
> In the realm of proven environments for large scale, client side javascript
> development, you have Dojo and Google Closure, and to some degree SproutCore
> and Cappuccino.  If you can point me to larger scale apps than GMail, Google
> Docs, etc., written using jQuery, I will gladly have a look.
>
> Once you get to that scale, you really needing a way to organize code, to
> package and load modules, etc.  Dojo and Closure offer a pretty nice, and
> proven, system for this.
>
> So, yes, I would have preferred Dojo, because I am more familiar.  But to be
> fair, Closure is very similar, is a very complete library, and has very good
> documentation and examples for the most part.
>

On Jul 24, 5:02 pm, Mark Rathwell <mark.rathw...@gmail.com> wrote:
> Wasn't it just a couple weeks ago that you were arguing that everything
> should be more like Java?  Now you're arguing that Google Closure is bad
> because it has some similarities to Java development (mainly verbosity and
> documentation).  I'm honestly not sure if you are just trying to be
> controversial, or to appear smart, but I'll bite (time for a break anyways).
>
> Closure is not idomatic javascript:
> ---

I'm not "arguing that everything should be more like Java", but
rather, if you're targetting the JVM then Java, if you're targetting
javascript then javascript.

I'm aware of the article you pointed out, but no, that article is
mostly about the implementation details within closure, which is a
lesser concern to me. I think a good book about idiomatic javascript
would probably be Douglass Crockford's Javascript: the Good Parts, and
just as good if not even better is JavaScript Patterns by Stoyan
Stefanov; emphasis on a functional programming small subset of
javascript, using closures and prototypes, et cetera. I had been aware
of the Google Closure library through its book, which I read when it
first came out; I invite you to read this book. It's too Java-esque;
java-inspired annotations, java-inspired OOP, too much complexity and
ceremony, and the author pointedly dismisses much of the javascript
community idioms: http://bolinfest.com/javascript/inheritance.php

I think it's a bit absurd, folks, to criticize Java's OOP as
incidental complexity, too much ceremony, and even suggest in the Joy
of Clojure that a Steve Yegge's Universal Design Pattern and prototype
pattern a la Javascript could be married to clojure's in the chapter
that discuss namespaces, multimethods, protocols and datatypes, and
then turn around and implicitly declare to the world with the release
of clojurescript "oh noes! if we're gonna do anything substantial then
this doesn't scale! we need a Java like solution!"


> [1]http://www.sitepoint.com/google-closure-how-not-to-write-javascript/
>
>  - Mark
>
> On Sun, Jul 24, 2011 at 11:19 AM, James Keats <james.w.ke...@gmail.com>wrote:
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to