Hi Lukas, > You have a similar use-case with jOOQ and Wicket. I was wondering: > > - How is your project advancing, from the perpective of integrating > the two frameworks? Are you happy in general, with this integration? > Where do you see room for improvement (as far as jOOQ is concerned)
I'm very happy with it! The first small site that i've built with it is ready, the result can be found at http://kaaskamer.nl:8080/kaaskamer/ . I'm currently working on a new order interface + service page for http://www.yourmuze.com/ . The "integration" of jOOQ with Wicket consists of two parts: 1) Management of jOOQ factories and JDBC connections. and 2) jOOQ variants of wicket's Models, DataProviders, etc. For the first part, a customer wicket request cycle listener that initializes the jOOQ factory does the trick, together with a ConfigurationProvider and a static method to access the current factory from anywhere in the application. The second part is a bit more complex. Although it's not strictly necessary, it's convenient to have "jOOQ enabled" Models and DataProviders (=the classes that Wicket objects use to retrieve data from a backend). I have made a few of these classes, but i'm not completely satisfied yet. It works, but every now and then when i try out something new, i find out that they aren't as "general" as they probably should be. Especially the DataProvider needs some work - it's the thing that provides (pageable, sortable, filterable) DataTables with their data. I have a made a DataProvider implementation that takes a jOOQ table and a list of conditions as arguments. Paging works fine with a simple 'limit' but sorting is a problem - the standard wicket classes work with String objects to represent a column. I now use "plain sql fields" there. Doesn't feel right ;) Filtering is another problem - the standard Wicket solution uses a javabean of the type of the table rows (in jOOQ terms, a Record object) to store the filters for the table columns. This is fine for simple '=' or 'LIKE' filters on strings, but as soon as you want to be able to put anything in a filter field that doesn't fit in the corresponding bean property (for example, apply a "> 9" filter on an integer column), it won't work. Another "problem", although not strictly Wicket related, is that as soon as you define a select query that returns columns from more than one table, the resulting record objects don't have any 'getters and setters', which means that a few Wicket things won't work. Some of them (like CompoundPropertyModel) are only for convenience, but others, like DataTable/DataProvider, are a bit harder to work around. This means that i have to either rewrite all that Wicket code to use the jOOQ getValue/setValue methods, or (as i do now) create database views for every single query that i want to execute. I think this is a shame, because this means that the beautiful jOOQ DSL can't be used to define queries. I don't know how to solve this, though. Maybe some "interface magic" to allow "jOOQ views" can help here :) > - Would you be interested in writing a success story for that > integration, for instance onhttp://java.dzone.com/, or any of these > blogs:http://wicket.apache.org/meet/blogs.htmlor any other place? Of course! I remember that i also already promised you to share some of my code :) I wonder what would be the best way to do this. Maybe i should write a simple example application (maybe something like a simple blog or a forum?) and write an article around that? If you have an idea, let me know :) > - Do you think there is potential for someone to write a general > Wicket integration that might make it to this > list:http://wicket.apache.org/learn/projects/ Yes, i think there is, on both the jOOQ factory management and Models/ DataProvider side of things. I'm affraid that i don't have much time to do this at this moment, and to be honest i'm also not that confident about my java/wicket/jooq skills that i would trust myself to write code for other developers yet ;) On the other hand, i do intend to continue using jOOQ + Wicket for the foreseeable future. Maybe in a few months, when my integration code is a bit more stable, i can base a general wicket/jooq integration module on it.
