Comments (5)
@davidbanham , @nwinch any opinion on this one? i built projects in both, and i feel like thinky
is a bit more humane option
from dendritic.
I can't answer specifically why the choice was made for this project, but I can give an opinion on ORM's and our experience with them thus far. The rest of the team may give a different one!
We've been bitten a couple of times on projects by ORM's that didn't scale well - I'm looking at you Mongoose - and imposed limitations that we could've exceeded if they weren't already deeply dug in to the code**. Often the abstraction between your code and the native driver is a gulf too wide, and your left battling with performance issues and odd syntax choices set by the ORM. Getting as up close and personal to the original syntax as possible is advantageous.
That said I did have a pleasant experience with nano when working with CouchDB.
So I think there is some hesitancy when it comes to using some ORM's because we've experienced real world pains with them before.
Thinky looks good though. I definitely don't want to tar and feather it based on other ORM's failings.
As an aside, I do think we need to address some structuring issues we have with the current implementation anyway. Feels like we have a lot of repetitive code, and as a reasonable newcomer to RethinkDB, it can feel a little overwhelming to learn the ins and outs of the syntax to do some of the basics. Some well trodden paths could be welcome in this regard.
** This is not so much a problem with ORM, but a negative side effect of it's usage. It's all too easy to start peppering it everywhere and then it's a real smack upside the head if you need to stop the spread or switch DB's at any point.
from dendritic.
so, basically "i've been burned before on this". ok, i can hear that.
thinky can have a few quirks of its own, but it is fairly transparent in this regard, it falls back to the rethinkdb interface in some cases. and it also gives you access to the lower level driver at any time (it uses rethinkdbhash
btw)
what thinky gives you on top of it though is this:
- promises based API
- automatic relationships handling
- automatic indexes sync
- simplified syntax for CRUD operations
it was a bit of a pain to do aggregation calls with thinky as it throws you to the lower level driver for that, but you're doing it anyways, so i figured that won't be an issue
from dendritic.
Wot Nath Said, with a couple extra bits:
I think ORMs in dynamic languages are usually a silly idea. The great thing about an ORM is that it maps your database structures into your type system for you. That's ace!
The crappy thing about ORMs is that they take the query language your database vendor worked really hard on and replaces it with some half-baked DSL. That's lame.
It's often worth trading the latter for the former. In a dynamic language, though, the former isn't a thing. So why would you bother with the latter?
REQL is a really, really nice API to use in Javascript. If we were using a different language that made it awkward to use the native language I'd be on board, but we aren't, so I'm not.
from dendritic.
resolved in the thinky
branch
from dendritic.
Related Issues (20)
- "utils" vs "lib" HOT 3
- Route paths using filenames as relative base HOT 7
- Build analytics HOT 5
- Revision id is not checked when updating HOT 1
- "definitions" schema returned via /schema HOT 4
- /schemas folder location HOT 3
- Add the soft-delete option for models HOT 3
- Last build time + commit HOT 3
- Validation errors do not show fieldname HOT 2
- Validation errors difficult to match to form inputs HOT 6
- Docker automation package
- Move the redbeard specific code from boilerplate into dependencies
- v5 Validations
- thinky.dbReady is borked in docker
- Tests are flaky due to random project/resource names
- app-module-path must go
- Update deps
- createdAt/updatedAt as default schema/model fields HOT 7
- Base Controller .update uses this.find which can be overwritten. HOT 4
- Interview partners for research about communication in GitHub projects wanted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dendritic.