API discussion: type hierarchies

10 views
Skip to first unread message

Christopher Deckers

unread,
Feb 26, 2012, 11:14:36 AM2/26/12
to jooq...@googlegroups.com
Hi,

I am new to jOOQ, and often have to go for external documentation to
find my way. As an API consumer, I have a hard time understanding what
methods are available, which type to use, the interactions between the
various types involved, etc. One of the reasons is that I have the
feeling the API involves too many classes and interfaces.

My question is: are all these levels of classes and interfaces
hierarchies necessary? Do we need all these marker interfaces? Can't
things be collapsed a little to simplify the design and lower the
barrier to entry?

For reference, I attach a screenshot of the class/interface hierarchy
of a generated table.

Cheers,
-Christopher

GeneratedTableHierarchy.png

Lukas Eder

unread,
Feb 26, 2012, 4:59:23 PM2/26/12
to jooq...@googlegroups.com
Hello Christopher,

> My question is: are all these levels of classes and interfaces
> hierarchies necessary? Do we need all these marker interfaces? Can't
> things be collapsed a little to simplify the design and lower the
> barrier to entry?

Thanks for this analysis. I agree that the balance between keeping
things DRY and keeping them simple has gotten a bit odd in the jOOQ
API. I can understand that this is a bit cumbersome for new users
navigating the Javadoc.

I have recently had the same thoughts, and I was wondering if
abstractions, such as org.jooq.Type and org.jooq.NamedQueryPart were
really necessary. I have created a trac ticket for this:
https://sourceforge.net/apps/trac/jooq/ticket/1192

After some analysis, I'll post here a list of API artefacts that we
could probably do without.

Do other users share these thoughts? Or does anyone reference a
higher-level API type?

Cheers
Lukas

Reply all
Reply to author
Forward
0 new messages