3 ms·
I was all set to start a new project on node.js a couple of months ago, but ended up back on Rails. Not because node.js itself seemed flaky, but because librari
by gmac 16y ago
I was all set to start a new project on node.js a couple of months ago, but ended up back on Rails. Not because node.js itself seemed flaky, but because libraries were scarce (e.g. anyone know of a credible ORM?) and, where available, often in alpha.
This isn't a criticism: it's inevitable in a young platform, and I'd happily help develop the libraries. But it didn't seem a feasible option for a project that (a) had deadlines and (b) needed features beyond the (impressive) node.js core.
- davej 16y ago> anyone know of a credible ORM? Node devs tend to take a different approach to Rails/Django in this regard, there's no single ORM with lots of database backends (ala ActiveRecord). This is probably related to the fact that Node devs tend to use tools like Redis, Mongo and Couch rather than traditional relational databases like MySQL and Postgres which all have similar SQL interfaces. There are some really nice libraries and modeling tools available but they're not database agnostic SQL ORMs, for example recently I've been using Mongoose: http://mongoosejs.com/ http://mongoosejs.com/ I've come from the Django world so I empathise with the "How do I do [insert Django/Rails feature here]?" mindset, but a lot of the time the Django/Rails just doesn't work well Node. Node.js is a single-threaded, event-based, non-blocking server; it really is a totally different paradigm so you have to be prepared to rethink the modus operandi for developing web applications.
- gmac 16y agoOf course, I did think about Redis/Mongo/etc. But the project (a) had deadlines, so I thought I'd go experimental on only half the software stack, (b) seemed very nicely suited to relational data modelling, and (c) allowed me to indulge my infinite love and respect for Postgres (stable! solid! powerful! frugal! fast! free!). Also, I didn't find a lot of help online with how to do this modus operandi rethink. (Again, no whining implied).