No, all I am suggesting is to split things which are not supposed to be
used together anyway. By that, I mean to have everything in one place
excluding the methods for contextual factory object construction and
configuration.
As I said: the "recipe" for constructing the factory instance, in a typical
application, is never going to be mixed with actual query building and
execution. This is because there is no need to copy/paste the same lines of
code every time we have to build query. And even if this is all going to be
a single line of "with(configuration)", then again: there is no need to
spread the configuration object all over the place if no one actually need
that object directly (Law of Demeter, a.k.a. The Principle of Least
Knowledge).

Regards,
Witold Szczerba



On 5 April 2013 16:41, Christopher Deckers <[email protected]> wrote:

>
> I would split that as much as possible. For example, if the static method
>> "with(Configuration cfg)" is going to be mixed with other static methods
>> like max/min/nvl or other static DSL methods, then I would suggest
>> splitting that.
>>
>
> I am not sure I follow. Do you go further than what I suggested (bridging
> between different factories) and keeping them completely separate? Then
> users would have to use multiple imports.
>
> import org.jooq.JooqDsl.*;
> import org.jooq.JooqRenderingDsl.*;
>
> I don't know whether this is good or bad. The good side is that things are
> separate and that other kinds of Dsl can be added instead of having
> everything be aggregated to Factory. The bad side is that you have
> different imports.
>
> Maybe then there should be a tradeoff class:
> org.jooq.JooqDslAll.*
>
> which is a facade to all those little *Dsl classes. This would work if the
> API creator makes sure that methods in one *Dsl class does not collide with
> the methods of another *Dsl class and every method added to any *Dsl class
> gets added to JooqDslAll.
>
> The picky ones would choose the individual imports, the lazy one would
> just include the whole API, while internally having a clear separation.
>
> -Christopher
>
>  --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to