Objection.js: Who uses objection.js in production?

Created on 11 Sep 2018  路  51Comments  路  Source: Vincit/objection.js

Hi there, I am currently evaluating a bunch of orm-a-like libraries for an upcoming project.

I almost gave up after digging deeper into sequelize and typeorm .

Having a PostgreSQL, java (hibernate) and ruby (ar/sequel) background, I was kinda disappointed by nodejs orm libraries. They are not bad, but feel very immature in comparison to java/ruby world.

Then, by accident, I found objectionjs while reading the knexjs README.

Objectionjs is exactly my way of thinking. Pragmatic but not to abstract. Sequelize/Typeorm might have more github stars/forks, but comparing them API- as well as Issue- and feature-wise, objectionjs feels like a way better fit to me (and probably others who also have a relational sql db background).

It deserves more traction and I am asking myself - why is objectionjs not more popular? And who is actually using it in production?

I know it sounds stupid, but is there some who-uses-it listing I can show to an IT decision maker?

Nevertheless, you did an awesome job and built a great library!

Most helpful comment

image

We use it for most of our node.js projects at Viv Labs (we're a Samsung company). We write the Bixby AI assistant found in many Samsung devices, like the Galaxy phones.

Objection.js is heavily used for https://bixbydevelopers.com, a place where you can learn how to build extensions to Bixby called "Capsules", (much like Alexa skills).

Since we use GraphQL, the most powerful feature that objection offers for this is the graphInsert / graphUpsert methods, which play extremely well into how GraphQL passes structured data and how we can use objection's graph methods to update our database.

I really like that it uses ajv as its validation backend, which makes sharing the models / schemas themselves cross-compatible with any of our other services that might want to do validation using our models (since ajv is json-schema spec compliant and objection also uses the spec to define the model), but do not require db access.

Another plus is how it's decoupled from the DBAL (database abstraction layer), where you use knex (or a knex-compatible API) to fill in that piece, which makes it very lightweight.

Overall, I recommend it to everyone who is looking for a lightweight ORM.

All 51 comments

Companies that I am aware of:
https://www.shift4.com/
https://www.bloomon.nl/

We adopted it as our de facto SQL ORM at Big Room Studios (you can probably even spot an objection model on the homepage!), and our development team has only been very happy with it, having used a variety of ORMs. The size of the community is actually very comfortable鈥攊t's large enough that you have active participation on issues, good community support in gitter, and regular contributions, but small enough that maintainers have been able to effectively handle issues without generating a massive backlog. It's also built upon knex (and there's overlap in contributors between objection and knex), which is _very_ widely used. Lastly, it's also the officially supported ORM of @hapipal.

Note that Objection.js is NOT an ORM in a sense you are used to in Hibernate world - it is far more lightweight, it would be more correct to think of it as a query builder that also takes care of relation/upsertion/validation logic for you. It doesn't have out-of-the-box locking. It doesn't have transparent lazy loading. It doesn't have DB schema generation from models. If you need all of these - TypeORM or Sequelize would be a better fit for you, but if you don't need them or are OK with doing them yourself - Objection.js is by far a better option. It is predictable and never gets into your way.

Objection has been used in various (10 -20) projects at Vincit even before it was released as open source. I can't give any names as I'm not sure which customers are public references for Vincit (I don't work there anymore). Maybe @elhigu can provide some kind of list?

Maybe @elhigu can provide some kind of list?

I鈥檓 trying to get at least current number of companies + sizes in case we cannot give the names.

@jzimmek you might also want to ask this on the node subreddit: reddit.com/r/node

There have been many mentions of objection on there that's how I first found out about it.

We're (company of ~30+) using it pretty heavily since about a year now.
Previously used bookshelf, and after being burned by it at some point we looked into alternatives.
TypeORM looked really promising, but after some digging we hit some dead ends.

objection.js is really pleasent to use and I believe that everyone on our team (~10+) feels very comfortable with it. Documentation is top-notch and the community, even though it might not be as big as others, is extremely helpful. Also, the codebase itself is pretty clear and relatively easy to understand in comparison to other libs.

(thank you - to the creators and maintainers of objection.js - you make our work a lot more fun)

Vincit (software contractor company of ~500 empoyees) is usually using objection.js for Node projects, which needs an ORM.

I'm still working on rough number of our clients who are using it (I haven't been at the office lately and I don't have access to check out client data myself).

We're a small startup in Asia - been using objection since we first developed our product.

Paul Jensen - London Node User Group
https://www.youtube.com/watch?v=RyQ1MTVjYK8

That would be nice link to add to readme or something :)

We do! We're a health tech company doing online doctor visits in the US: https://www.heydoctor.co/

looop-logo
We're a small remote startup(5 devs ATM) called Looop.
We rewrote our monolith app from Sequelize to objection.js and so far it has been a godsend. We have 76 tables in postgre so relation expressions are probably our most used feature. We still have like 15% of our API on sequelize, but every day we rip out more and more. BTW we expose our objection.js models to the consumers just by decorating them with decapi. Which is quite a unique way of doing that I'd say.

I recently rewrote a version of the board game Risk using objection. I can't even begin to describe how much simpler it was to use objection.js than the older java bean code. I probably have 70% less code.

And when comparing objection to sequelize -- why on earth would you subject yourself to the added complexity of that tool?

Seriously, sequelize is bloated. And don't even get me started about sails and typeorm. I was about to give up on using node.js as the backend for the game, and then I found objection.js.

Bookshelf is a step in the right direction, but objection seems like a refactored, simplified bookshelf.

The game is going to be released as a Steam Early Release here in the next week:

http://www.denizenseven.com/

https://store.steampowered.com/app/952090/Grand_Strategy/

https://play.google.com/store/apps/details?id=org.grandstrategy.client

We're a Portuguese tech company (company of ~30) that proudly uses objection.js in several projects that are currently running on production.

https://seegno.com

4e22b6b0c868e66b04d18f4985380254

screen shot 2018-10-16 at 10 36 54 am

Ethos Technologies, Inc. - We offer term life insurance for citizens and residents in the U.S.

When we migrated from MongoDB to Postgres, we tried several ORMs and Objection.js stood out to us the most - it is one of the most solid, well-architected packages in our stack - can't recommend it enough!

Ethos - Insure Your Life

I am ! Though you can only see the front-end right now, the back-end being not polished enough.
99% of the project being open source, a typical example being how json schemas are used to build an ajv validator for objection:
here some schema
here how objection/ajv is setup
here some front-end
It's a modern (well, though i'm not really the best programmer of the world, i can say the concepts are way on top of the cake) website editor i've been building upon objection and prosemirror and DOM.
Soon to be available for all !

We do at Social Native.

dporganizer-primary-logo-rgb

We, DPOrganizer, are a Swedish startup with about ~20 developers. We choose objection.js for a new service after evaluating a bunch of different Node.js ORMs about a year ago. We have not looked back since and will continue to invest in this great lib, both as consumers and contributors.

objection.js itself, the maintainers and the surrounding community has been great to work with. A big thanks to everyone involved and keep up the awesome work!

We've been using it at Cazana for 2+ years.

when i was at https://mycujoo.tv we started experimenting with objection in late 2016. it went to production in early 2017 (i no longer work there). it's used in one of the largest backend services (thousands of reqs/s)

As a personal experience in a side project when I searched what ORM should i use, I Find the most popular one which is sequelize, after about a month of working I suffered a lot, its documentation isn't clear, strange way of coding (at least for me).
I decided to switch to objection after a lot of searching and comparing.
Oh my god, I made a migration of weeks of work with sequelize in just a few days.
Objection is such a great ORM, easy and clear documentation, predictable way of coding. In my opinion it is like eloquent for php.

At cioplenu we also switched from bookshelf to objection.js in the very early stages of our product. We are still a fairly small company but we have been very happy with that choice. The clear and concise design with excellent support for ES6 or Typescript, the option to easily fall back to knex when needed, the great compatibility with PosgreSQL, the great community and documentation really sets it apart.

At Stylisted, Objection powers our entire API.

  • The way QueryBuilder is exposed for subclassing by models (or using HOCs) makes for many reusable patterns between models while allowing for idiosyncrasies among them
  • onBuild/onBuildKnex/onAfter2 (private API) operations provide low-level mechanisms to dynamically manipulate queries and results
  • Lifecycle methods make async side effects (transactional or not) very simple
  • Query context is great for authorization, filtering, and API request-specific behaviors that models should be aware of
  • Relation mappings are very flexible -- it's straightforward to create relations from a model to itself for complex self-joins, for example
  • Composite keys are handled correctly throughout the library
  • Model JSON schemas are a nice way of describing and validating inputs/outputs at many levels of abstraction (we use them in API resources now too), but you do need to get familiar with AJV's many options
  • Relation expressions with named filters, allowEager/eager/joinEager, and allowInsert/insertGraph make efficiently fetching/creating complex objects via single requests a snap

There's a lot more, but the point is this: the design of the library is elegant and intuitive. I've found it very easy to write code that I think will work based on the primitives provided and it just does. The source code is also easy to read, modify, and test. If you've come from Bookshelf, as we did, you'll know that none of those things hold true.

Objection gets lots of little things right by separating query building, data modeling, and validation, and doesn't encourage Rails-y patterns like polymorphism. This really reduces the O/R impedance mismatch that you experience from Bookshelf and many other ORMs.

image

We use it for most of our node.js projects at Viv Labs (we're a Samsung company). We write the Bixby AI assistant found in many Samsung devices, like the Galaxy phones.

Objection.js is heavily used for https://bixbydevelopers.com, a place where you can learn how to build extensions to Bixby called "Capsules", (much like Alexa skills).

Since we use GraphQL, the most powerful feature that objection offers for this is the graphInsert / graphUpsert methods, which play extremely well into how GraphQL passes structured data and how we can use objection's graph methods to update our database.

I really like that it uses ajv as its validation backend, which makes sharing the models / schemas themselves cross-compatible with any of our other services that might want to do validation using our models (since ajv is json-schema spec compliant and objection also uses the spec to define the model), but do not require db access.

Another plus is how it's decoupled from the DBAL (database abstraction layer), where you use knex (or a knex-compatible API) to fill in that piece, which makes it very lightweight.

Overall, I recommend it to everyone who is looking for a lightweight ORM.

I use Objection since version 1.4 on https://checklyhq.com, a monitoring SaaS. I use it for the reasons mentioned above. Feel free to use the logo or screenshot.

image

logo_script_racoon_horizontal_795

image

We use it in a crowd sourced mapping application called Map Our Borders, it's perfect for our needs.

mapourborders.com

BIG Thanks!

Hi,

The Dev Team of Surnet Telecom, which is an company that maintains and develop the payment gateway for the 90% of the Venezuelan Airlines, are actually using Objection.js in production environment with goods results.

Hi,

I am currently working on a project with a Fund in Asia.

We are using ObjectionJS in production.

I use it for NodeJS projects that require a connection to the supported SQLs.

It may be a little too much to ask If it could do Mongo DB as well :)

We (Flux Work) are using Objection.js in production in a Node/Express-powered API server. It has been pleasant to use. Thanks for sharing such a great library!

https://www.navistone.com/ , a company of ~25. We use Objection.js in production for our lightweight node.js APIs. Superb documentation and easy to use.

I think this should not remain as an issue, please create a page in the wiki for "production users" citing these references, so that it's easily findable and later on other users can link their organizations as a pull request if they want to.

I have created a wiki page for objection.js consolidating the information provided in this issue till now.
Companies using objection.js in production.

Upsolve has been using it with the graphql plugin and we love it! Custom query builders are a huge part of our API's design now. We migrated from Bookshelf.
https://upsolve.org
image

I used objection to build BitMidi, a free MIDI music database that gets millions of pageviews per month. I plan to use it on future projects. It's been a joy to work with.

bitmidi

@johannessjoberg -> Sorry to bother you at this time, but I would like to check if your view is still the same today.

@globsecure No problem, and yes, I still have the same view. I think that objection simplifies and minimizes the code concerning relationships without getting in the way and provides a very powerful query builder that I enjoy working with. This blog post https://www.jakso.me/blog/objection-to-orm-hatred by @koskimas resonates well with my view on ORMs and working with SQL.

Edit: Another thing that I highly value is the flexibility provided by that possibility to easily switch to raw SQL using knex.raw if needed.

I used objection to build the Voxia's API, and all the products of my work has been built used objection.

We've been with ObjectionJs since inquisitive.com was launched two years ago, very happy with it.

We at deedmob.com are in the process of migrating from Bookshelf.

Just moved from Sequelize to Objection for launchbot.app. So. Much. Better.

We at Novelship have been using and loving objection for more than 2.5 years now.
~We want to upgrade to v2 and but are stuck with v1 because we rely on objection-find which doesn't support v2 yet~

Update:

Objection-find got an upgrade, supports objection@2 now!

I deleted @ofeenee's comment because it wasn't relevant to this thread. Feel free to open a separate issue. Let's keep this issue purely as a list of companies/projects that use objection.

I'm currently working on one of Autodesk's project and they are using this amazing package. Since I used this tool is pretty easy to understand and use.

we're using Objection at substack!

We're using Objection at Pinkaloo 馃挀

We're using Objection at Remotehour with GraphQL.

We're using objection.js at Craftcloud

logo-screenshot

We're using Objection at Blush and a couple other private projects.

Proudly using it too at CitizenPlane! We're ~20+ company, 7 techs, Objection in production on all services that need to query our db.
Best SQL ORM for Node we've had so far :)

Using Objection at Pizza Cartel and eggwp!

Was this page helpful?
0 / 5 - 0 ratings