Skip to content

Yet Another ORM Beginning

Compare
Choose a tag to compare
@mdwheele mdwheele released this 15 Sep 22:02
· 31 commits to master since this release
52620c1

Hello! 🎉

Thanks for checking out YORM (Yet Another ORM)!

I know, I know... you're asking "Did the world really need yet... another... ORM?"

Well, I think so. I've been working with Node.js for quite a while now on several code bases ranging from "legacy" (_ewwww!_🐷) to "modern" and I've tried several of the popular ORM and... I have to say... it feels like a Node.js developer wrote every single one.

Regarding convention over configuration, I've waffled both sides throughout my career. Once a huge fan of Ruby on Rails and Laravel, I was annoyed at times with all the "magic". The code was expressive but almost terse to the point of not being able to understand. So I swung the other way towards configuration and I found myself spending more time writing JSON, XML, and YAML than actually solving problems.

The neat thing is, that everyone has taste. So when it comes to Sequelize, Objection.js, TypeORM, Bookshelf, and the 1,000 other JavaScript ORM libraries... I say use what you want. For me, none of these packages really tasted "good". Or maybe another way of putting it is that the initial taste was great; I felt really productive. But then I started to get the after-taste and simple things became tedious and I didn't fully understand what the tooling was doing.

So that brings us back to YORM. My goal with YORM was to write an Active Record implementation that stayed out of the way and allowed me to write more-or-less Plain ol' JavaScript Objects (POJO). I wanted vanilla ES6 classes with just a touch of magic helpers to facilitate basic CRUD operations and relationships between models. Also, I didn't want to have to write a book every time I set up a model. It should be quick and simple to put together a new model.

Anywho, checkout the README.md and let me know what you think in the Issues. I'm very open to feature ideas and help as long as we maintain a healthy developer experience without a bunch of boilerplate! Writing code should be fun; not a tedious endeavor.