Using Google Closure Templates with jQuery

We are starting to create an application using JavaScript and HTML5 that will use the API to access server resources, taking advantage of jQuery simplicity and ease with which our development team is already convenient. This app will be multilingual. Later, we decided that we would write our DOM using JavaScript, which would allow us to use our bits of the user interface to integrate with our other applications and create our own widgets using the jQuery widget. Then, simply by adding a script tag that refers to a JavaScript file on the corresponding page of our other application, we get most of our integration for this particular function.

Since creating a DOM using JavaScript requires a lot of code to create a DOM, we started looking at tools that would help us easily convert HTML to JavaScript to create a user interface, and, therefore, Google Closure patterns appeared.

At that time, I was thinking about using Google to close the UI DOM bit for writing, since it can quickly give me JavaScript for my DOM, and then for other JavaScript (that is, for server-side communication and for other user interface logic, for example, to change the user interface received a response from the server, and x should change to y by clicking z in the form of things), which should be written by hand, I should use jQuery, which is easy to write.

But, looking at this question , I see that both of them are compared with each other, and this left me wondering about a few things.

  • If I go along with what I was thinking of doing this, can I call the functions created by Google Closure in my jQuery widgets to display the user interface?

  • If I leave jQuery and just use Google Closure, will that be enough for my requirements?

  • When I started reading the Google Closure documentation, I found that she has a whole new world and uses a learning curve. How much it? If this is not enough, our team of 5 developers will be ready to study it.

On 2 and 3 it would be great if someone who has already used this can give some idea.

. - , - , Microsoft.NET .

+5
1

, , , Closure Templates jQuery, Closure Closure. jQuery, Closure Template ( "Soy" ) SoyToJsSrcCompiler.jar . JavaScript Soy, JavaScript , Soy.

JavaScript, soyutils.js, , . , JavaScript, / :

  • soyutils.js
  • JavaScript, Soy
  • jQuery
  • , jQuery, .

Closure Templates , , , . , - , , , .

, Closure jQuery - , soyutils_usegoog.js soyutils.js. , , Closure jQuery , , , , ! , Google Closure, JavaScript , , , , .

+8

All Articles