Never heard of this before as I mainly use MS stack.<p>However, my first impression is very positive.<p>1. Database First<p>Great way to distinguish your product from traditional ORMs. I am personally not a fan of code first approach especially as a LOB applications developer. I have been writing code for 15 years and the database/schema has outlived each and every application that I wrote. (I am in full agreement with lukaseder's comment: <a href="https://news.ycombinator.com/item?id=10880942" rel="nofollow">https://news.ycombinator.com/item?id=10880942</a>) As an experienced developer, they immediately made their value proposition clear to me and I wanted to learn more.<p>2. Examples<p>Side by side example comparing jOOQ to SQL. A great way for me to quickly see if I like their DSL design.<p>3. Convince your manager page.<p>I absolutely loved this: <a href="http://www.jooq.org/why-jOOQ.pdf" rel="nofollow">http://www.jooq.org/why-jOOQ.pdf</a><p>We all have worked with 'a technical manager' who isn't really technical. When you need to purchase a tool, you need to convince your manager and this page is as good as I have seen. All commercial software development tool product websites should feature a 'Convince your manager' page.
I have been using jOOQ for quite some time. Indeed, it's the <i>only</i> mechanism (definitely not an ORM) to access the database that we use in my company.<p>From my own experience, and this is general consensus, it's a big win to use it. Its SQL inspired fluent syntax brings you back the power of SQL, including really advanced stuff. But at the same time, in a Java native manner, type safe, by the way.<p>If you haven't tried it yet, you definitely should.
> type safe SQL queries<p>Really? So the compiler will catch this error?<p><pre><code> create.select().from(AUTHOR).where(BOOK.LANGUAGE.eq("DE"))
</code></pre>
No it won't, because `where` has this type:<p><pre><code> SelectConditionStep<R> where(Field<Boolean> field)
</code></pre>
If it was type safe, `Field<Boolean>` would have to mention the type of the records that can be queried.<p>Type safety is what is being sold on the front page as the main value proposition.<p>Needless to say, I'm not sold on it.
Sorry if I did too much TL;DR but this reads very much like Apache Torque, which has been around for a very loooooooong time.<p><a href="https://db.apache.org/torque/torque-4.0/index.html" rel="nofollow">https://db.apache.org/torque/torque-4.0/index.html</a><p>Apache Torque is an object-relational mapper for java. In other words, Torque lets you access and manipulate data in a relational database using java objects. Unlike most other object-relational mappers, Torque does not use reflection to access user-provided classes, but it generates the necessary classes (including the Data Objects) from an XML schema describing the database layout. The XML file can either be written by hand or a starting point can be generated from an existing database. The XML schema can also be used to generate and execute a SQL script which creates all the tables in the database.<p>As Torque hides database-specific implementation details, Torque makes an application independent of a specific database if no exotic features of the database are used.<p>Usage of code generation eases the customization of the database layer, as you can override the generated methods and thus easily change their behavior. A modularized template structure allows inclusion of your own code generation templates during the code generation process.
Looked interesting until the moment I saw it's not free. Sorry, but in this day and year I'm not gonna consider using a piece of basic infrastructure that is not free and open source, at least not for something as fundamental as ORM layer.
Or you could use Slick[0] for free.<p>[0]: <a href="http://slick.typesafe.com/" rel="nofollow">http://slick.typesafe.com/</a>
This looks suspiciously similar to SQLAlchemy[1].<p>[1]: <a href="http://www.sqlalchemy.org/" rel="nofollow">http://www.sqlalchemy.org/</a>
A simple library that is similar (but not multi-database; this said, at least you don't have to learn another syntax for SQL)
<a href="https://github.com/l3nz/ObjectiveSync" rel="nofollow">https://github.com/l3nz/ObjectiveSync</a><p>- Minimal wrapper over JDBC.<p>- Querying done in SQL. You should not be afraid of SQL. If you are, you should not be doing anything above the trivial CRUD.<p>- Centralizing object marshaling and unmarshaling - each object should know how to sync itself and its descendents<p>- Single syntax for inserting and updating<p>- Ruby-like objectivized JDBC fetching with exception handling<p>- User-definable deep fetching and updating (almost Hibernate-like).<p>- Batch API to avoid round-trips when submitting multiple queries.<p>- Stats collection and similar stuff.
A fully open source equivalent: <a href="https://github.com/keredson/DKO" rel="nofollow">https://github.com/keredson/DKO</a><p>I wrote this for Two Sigma's internal use back in 2010.
Not too sure what's special about this thing. I also wonder why people keep making DSLs to replace SQL. I was using iBatis back in 2005 (now called MyBatis - <a href="http://blog.mybatis.org/?m=1" rel="nofollow">http://blog.mybatis.org/?m=1</a>) and it worked great.
> jOOQ is SQL-centric. Your database comes "first".<p>This approach has always seemed completely backwards to me. Isn't the database simply a mechanism for persisting records/objects whose structure is determined by domain modeling?<p>To me, it would make about as much to say of a GUI framework "foobarWidgets is GUI-centric. Your UI comes 'first'.", as though the application itself was just an afterthought.<p>Don't get me wrong - I like SQL, and I happily use relational databases to store objects. I just see the database as a means, not an end.
This is another option: <a href="http://ebean-orm.github.io/" rel="nofollow">http://ebean-orm.github.io/</a> sound very nice and complete