I just finished creating several models and a had to separately write all of their attributes in 1) a Rails ActiveRecord 2) a Rails database migration, and 3) a Backbone.js model. I'm not feeling very DRY. I assume the first step in DRYing up this problem would be to switch to node.js where I can use CoffeeScript on the back and front end (ideally reusing that same Backbone.js model), but what about the database schema? I realize I can create a framework that generates SQL from model attributes, but before I embark on that endeavor I was wondering if something like this already exists or is in development.
[Derby] runs the same code in servers and browsers, and it syncs data automatically. Derby takes care of template rendering, packaging, and model-view bindings out of the box. Since all features are designed to work together, no code duplication and glue code are needed.
I'm building a small hobby app with Derby and so far it's been fun and mind-challenging. A unified new world has its own physics..
One thing to note is Derby is built on top of Racer, a "realtime model synchronization engine"; you may find it 'heavy' if you were expecting something like a light glue code that stitches together Backbone.js, express and some database layer.
Edit: other frameworks I haven't yet looked into closely:
This recipe can be found in it's original form on Stack Over Flow.