javapersistencejooqsqlbuilder

Java: JOOQ persistence framework performance and feed back


I've stumbled over a nice SQL builder framework, called JOOQ. BTW, in Russian JOOQ sounds like noun meaning "bug" (as an insect), "beetle" ;)

If you have any feedback about JOOQ, it's performance and such, please share. Links to blogs about JOOQ also welcome.


Solution

  • I think I should answer here also because I started using jooq one and a half months ago so I have some experience with it.

    I wanted to use tool like jooq because:

    Well, with jooq I was able to achieve all that. My main requirement was for jooq to handle complex enough queries (nested, with grouping etc.). That was fulfilled.

    I also wanted to be able to run queries using as few lines of code as possible and was able to reach this with jooq fluent API which allows jquery-like calls to perform SELECTs.

    On my way using of jooq I reported a one or two bugs and I must say, that they were fixed surprisingly fast.

    I also missed some features and again I must say, that I already have almost all of them.

    What I liked very much, is that jooq now uses SLF4J for reporting some very interesting data about it's performance as well as for outputting the actual queries it has built. It really helped me with debugging.

    Jooq even generate Java artifacts for stored procedures, UDFs and updatable recordsets, which I don't use currently, though.

    What's important, jooq transparently supports DB2, Derby, H2, HSQLDB, MySQL, Oracle, PostGreSQL, SQLite, SQL Server, Sybase SQL Anywhere. Pretty extensive list, I think.

    Jooq has support forum in Google groups where Lukas is day and night ready to answer even the stupidest of my questions.

    Jooq supports Maven and that's a great relief for me since all my Java projects are Maven-based. We still miss Maven plugin for generator, but that's not important since running generator is a piece of cake.

    Writting my queries with jooq I suddenly discovered, that they became really portable because I almost never used any MySQL-specific feature in the code since jooq tries to be as portable as possible. For those who can't live with such peculiarities, as I know support for SQL extensions is under the way also.

    What does jooq lack for a moment from my point of view?

    Well, there is no fluent API for statements other than SELECT. This complicates code a little and makes UPDATE/DELETE statements a little more complicated to write. But I think this will be added soon. Just implemented in 1.5.9! Ha! Too quick for me ;)

    And one more thing. Jooq has a good manual, but... I don't know. May be I just don't understand it's structure or architecture... When I started using jooq for the first time, I opened one page after another looking for a feature I need. For example, try to guess, where in jooq manual UPDATE and DELETE statements are described, looking at contents... But that's really subjective, I believe. I also cannot even explain, what's wrong with manual from my point of view. When I can, I will post a ticket or two ;)

    Manual also is not really well-navigable since Trac has no automatic "here, there and back"-like links.

    Well, for me in Moscow (Russia) Trac pages doesn't open fast also so reading manual is a little boring.

    Manual also misses a good architecture description of jooq for contributors. Jooq follows design-by-contract principle it seems and when I wanted to learn how certain feature is implemented inside by using my usual Ctrl-Click on some method name in IDE, I ended up inside a dull interface with no implementation ;) Not that I'm too smart to start improving jooq right away, but certainly I would enjoy understanding how exactly jooq is architectured from ground to up.

    It's a pity also that we cannot contribute to jooq manual. I expected it to be in some kind of wiki.

    What I would also want to improve, is the way news are reported. I would prefer link to manual there or examples how this or that new feature works.

    Release notes link in manual is really just a roadmap. I think, I will do that one myself tomorrow...

    Jooq also have relatively small community currently, but I am glad to report that it doesn't affect code quality or the way new features are introduced.

    Jooq is really a good project. I will stick to it for my future projects as well. I really like it.