Using Ent ORM in bud #182
Replies: 2 comments 5 replies
-
Hey, thanks for your message! I really like how https://ent.io allows for a GraphQL like graph traversal experience within your ORM. It's also an extraction of an internal FB framework with the same name that FB uses everywhere. Does ent.io support introspection? Last I checked, you can't tie your database structure to your Ent models. If not, this is my main issue with ent, gorm, etc. The programmer is responsible for keeping the database schema in sync with the models. I'm more interested in the approaches that https://github.com/xo/xo and https://sqlc.dev/ take where they understand the structure of your DB and generate code that matches that structure. Then when you migrate your DB, the model code is regenerated and type-checking kicks in. I also think you can generate code that provides a lot of the wins that Ent.io provides with it's awesome traversal experience. You're right though, this comes at the expense of dev and maintenance burden that comes from creating something from scratch. I think the M is going to be important enough for applications that it's going to be worth a tight integration into Bud though. That being said, https://github.com/vito/bass-loop has demonstrated you can bring your own M, so using ent with Bud would probably not be out of the question if you prefer that over what Bud provides. |
Beta Was this translation helpful? Give feedback.
-
Big vote for sqlc.dev for me! |
Beta Was this translation helpful? Give feedback.
-
Hi, what are your thoughts on using Ent ORM in bud for the M in MVC?
It has a large user base and active contributors, supports multiple DB drivers, uses code generation for static typing, and handles migrations. It also has fantastic documentation.
Using Ent would reduce the dev and maintenance burden over creating something from scratch.
I'm sure you all have thought about this a lot and have looked into Ent. I'm curious what you think about using it in the context of bud.
Beta Was this translation helpful? Give feedback.
All reactions