YUI 3 & Node.js for JavaScript View Rendering on Client or Server
The premise of this idea is to enable data to be translated into HTML either on the browser or the server. The only way to do this on the browser is with JavaScript, so we must have JavaScript on the server as well. Good thing we have NodeJS. Most web application frameworks have some type of templating engine that accepts two things: (1) data, (2) template, and returns HTML to be assembled into an HTTPResponse. But what if we could take the browser-side JavaScript function that handles the XHR response data and run it on the server? With the nodejs-yui3 module, we can!

Twitter
Facebook
RSS Feed
Comments: