If I understand correctly, both GWT and Google Closure are JS API’s for building web applications. What is the difference between them?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Closure is a JavaScript library (really more like a collection of libraries, but that are all packaged as a single library and that can be imported using
goog.requirefrom the base library). Closure simplifies a bunch of common JavaScript tasks in a way that is compatible with multiple browsers. Closure is also a JavaScript compiler that can both minify and optimize JavaScript code.GWT is a Java toolkit (and associated libraries) that can take code written purely in Java, and convert it into HTML, CSS, and JavaScript, allowing a web application to be written purely in Java (but served as a real, HTML5 website, rather than as an annoying, slow-to-load Java applet).
A project written in GWT can make use of the Closure library and can include JavaScript code. However, Closure is really targeted toward developers writing JavaScript, while GWT is for Java developers.
To summarize…
Use Closure when:
Use GWT when: