Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I would like to investigate whether ClojureScript, with the associated Google Closure library is a reasonable tool to build modern, in-browser, Javascript applications.

My current Javascript stack consists of jQuery, Backbone and RequireJS with the possible additions of some widgets libraries like jQueryUI or KendoUI. So it will be quite a big leap (I already know how to work in Clojure, although I have little experience).

What is a good roadmap to do so? Should I learn the Google Closure library first, or can I grasp it together with ClojureScript?

One thing I am concerned about is the overall application structure. Backbone is rather opinionated on how to organize your application. I am not sure whether Google Closure also includes some components to help with the design of the application. And, if this is the case, I do not know how to tell whether this structure will port to ClojureScript or a ClojureScript application will require a different organization anyway, and only use - say - the widgets and DOM manipulation features of Closure.

share|improve this question
1  
What is the relationship between ClojureScript and Google Closure? –  Garrett Hall Mar 14 '12 at 18:44
2  
@GarrettHall: ClojureScript is a compiler for Clojure that emits JavaScript. Closure is a Javascript to better Javascript compiler. ClojureScript is designed to emit JavaScript code which is compatible with the advanced compilation mode of the Google Closure optimizing compiler. –  Robert Harvey Mar 14 '12 at 20:40
    
Moreover, Google Closure also features a library, and that one is the suggested library in ClojureScript wiki. As they put it, it seems it is also used in the core. –  Andrea Mar 15 '12 at 7:37
    
1  
What specifically do you have a question about? –  Robert Harvey Mar 15 '12 at 19:55

2 Answers 2

up vote 3 down vote accepted

I say you have to sharpen your Clojure experience first, Google Closure after all is a JavaScript library and some other tools.

However, you need you check ClojureScript One:

ClojureScript One will show you how ClojureScript reduces the complexity of web development by allowing you to write applications using one language to unify development across the client and the server

share|improve this answer

To add to the above comments, but Rich Hickey goes into the relationship between ClojureScript and Google Closure tools in his intro of ClojureScript. http://blip.tv/clojure/rich-hickey-unveils-clojurescript-5399498

Basic gist is in the comments:

ClojureScript is a compiler for Clojure that emits JavaScript ... and is design to emit ... code [that] is compatible with the advanced compilation mode of the Google Closure optimizing compiler.

share|improve this answer
    
Yes, I know that. This is why I asked the question in the first place. What I would like to know is if it makes sense to dive into ClojureScript directly and pick Closure along the way or if I should learn the library in JS first –  Andrea Mar 21 '12 at 21:18
    
That's a very judgement call. From my perspective, I'd go to ClosureScript and just pickup the Google Closure Tools usage that was relevant as needed. I don't see how the rest of the Google Closure Library is required to be part of it. –  jeffreypriebe Mar 22 '12 at 21:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.