Hi,
I think the name Factory is actually confusing. As you said, it is an entry
point for JOOQ DSL, while "factory", for me, is kind of a provider which
builds objects, hiding dependency and wiring details from consumers.

If there are two classes like Executor and Factory, then my first thought
is that factory is supposed to build executor instances.

Using CDI notation:
@Inject DataSource datasource;

@Produces
Executor jooqExecutor() {
  return Factory.build executor(datasource, someCfg);
}

And everywhere in the code we just ask for Executor to be injected:

@Inject Executor jooq;
[...]
jooq.select(...)

So, if Factory is kind of the DSL entry point, I would be less confused
with DSL/Dsl or JooqDSL or something like that.

Regards and thanks for this excellent tool,
Witold Szczerba

2 kwi 2013 21:27, "Lukas Eder" <[email protected]> napisał(a):
>
> Dear group,
>
> It has been brought to my attention that using "Factory" as a name for
> the jOOQ DSL entry point might not be the optimal choice. You will
> find details about this request in this thread here [1].
>
> I understand the arguments brought up by Christopher Deckers, which are
mainly:
>
>     1. The name is too generic to be linked to jOOQ
>     2. The name is too generic to be used easily in auto imports, code
> navigation, Google searches
>
> I personally did not agree with the above because of
>
>     1. The class is in a package, which clearly links it to jOOQ
>     2. The class is in a package, which clearly links it to jOOQ
> (except for auto imports)
>
> But I may not suffer from the same pain as you, the users. Also I'm
> curious about the potential of finding a better name.
>
> So please, if you feel either way (pro / contra "Factory"), bring up
> your arguments in favour / against the current name. If you're against
> it, please also bring up a compelling alternative. By "compelling", I
> don't mean things like "Builder", "SQL", "API", but something that
> clearly communicates the intent of the "Factory", which are two
> things:
>
>   - Being the single point of entry for the jOOQ DSL
>   - Being the single "factory" for constructing jOOQ QueryParts,
> functions, bind values, etc.
>
> As of jOOQ 3.0, the Factory is no longer:
>
>   - An entity holding "contextual" information about JDBC Connections,
> DataSources, Settings, SQLDialect. This information has been moved
> outside of the Factory in jOOQ 3.0 and is off-topic for this
> brainstorming.
>
> More info about the Factory can be found here [2] and here [3]
>
> Let's try to get to a conclusion until Sunday, April 7.
>
> Cheers
> Lukas
>
>   [1]:
https://groups.google.com/forum/?fromgroups=#!topic/jooq-user/uxcYEC7IoDM
>   [2]: http://www.jooq.org/javadoc/latest/org/jooq/impl/Factory.html
>   [3]: http://www.jooq.org/doc/3.0/manual/sql-building/factory
>
> --
> 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