4 ms·
BarleyDB: An alternative approach to Java ORM
- ccleve 11y agoYou might also consider my project: https://github.com/dieselpoint/norm https://github.com/dieselpoint/norm Not exactly the same thing, but serves a similar purpose.
- mrcsparker 11y agoThis looks really nice. Thanks for the link.
- mmatants 11y agoGlad to see folks critique traditional ORM tropes and putting forward some innovation in the area. On that note, as a highly subjective opinion, I have really soured on the philosophy that guides many popular ORMs. Relational data does not map to OOP well, and I think the point is not to actually force that. Instead, I think there are ways to embrace the relational model, because it is actually quite apt for many business cases. For those further interested in the general topic of alternate ORM approaches, here is a link to a proof of concept from a while back, when I was exploring how to express column-driven data in Java code: https://github.com/fxrm/fxrm-store-java https://github.com/fxrm/fxrm-store-java This is not to hijack attention from the OP idea, of course; just noting that this is still a fruitful area of improvement in software.
- scottysinclair 11y agoYes, I agree with you about relational data, BarleyDB holds the relational data in memory and then provides Pojo proxies to it. Combining an active record approach with a domain model Pojo approach if you like. This is why it is fully possible to use BarleyDB without compiling any classes, you can just use the in memory model instead.
- help_bro_2016 11y agoAny advantage compare to JOOQ[0](Apache license 2). One main diff is this lib license under (LGPL) which might prohibited to use in certain app. I think JOOQ is quite powerful and more mature. [0]: http://www.jooq.org/ http://www.jooq.org/
- scottysinclair 11y agoWell JOOQ certainly influnced the query DSL API which we use. JOOQ is certainly very mature and can express much more complex SQL statements. JOOQs API is more database centric and I was looking for a framework with a similar query DSL but which produced more Pojo like objects. One of the most interesting things about BarleyDB is that it can be used (if so desired) without any compilation. You can import a schema from an XML file and the use the meta model to query and to save data. BarleyDB also provides: optimistic locking, query batching, access-control checks - via plugin, auditing - via plugin, insert / update statement reordering for increased batch sizes. Scott
- lukaseder 11y ago> You can import a schema from an XML file and the use the meta model to query and to save data. You can do the same with jOOQ, just in case. > optimistic locking, query batching, Also supported in jOOQ > access-control checks - via plugin, auditing - via plugin Also possible in jOOQ, although, perhaps not out of the box. How does this work in BarleyDB? > insert / update statement reordering for increased batch sizes. A quick win that appears to be a very bad idea in general, e.g. in the presence of triggers.