Sign up FAST! Login

Server-side dijit widgets in node.js

thomasj
Wrote a "connect" plugin for NodeJS to automatically render dijit widgets server-side https://github.com/jthomas/server_side_dijit Demo: http://jamesthom.as:4000/ @dojo
9:23 AM Jun 26 2012

Stashed in: JavaScript, Code

To save this post, select a stash from drop-down menu or type in a new one:

I've been excited about the progress that people are making with using Dojo server-side.

It feels like the Dojo is also serious about eventually working well on the server, perhaps moreso than most of the other client-side js libs.

To me, the real appeal of ssjs is not the much-touted "advantage" of having a GRAND UNIFIED CODEBASE ALL IN ONE LANGUAGE (though I was excited about Unified Codebases with Dojo, node, and RequireJS). Rather, the main advantage is simply being able to do DOM manipulations server-side with the same ease you'd do it client-side.

Server-side DOM manipulation is currently a pile of crap in every language other than js; but when you're using a js engine to render and serve your markup, this becomes much easier to do.

It also creates the possibility of doing server-side templating that also makes sense, rather than just implementing a shitty templating system for the sake of doing templated development (e.g., Django et al.).

Your templating engine sucks and everything you have ever written is spaghetti code (yes, you)

You May Also Like: