Le mercredi 5 juin 2013 13:46:22 UTC+2, Joachim Durchholz a écrit :
>
>
> For me, that's a secondary aspect. 
> What's more important is that, for us, ORM layers simply can't be made to 
> work. (An insightful article on that topic can be found at 
> http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx.) 
> At our project, we need to stick with SQL semantics, and so while we 
> certainly like to map table column structures and foreign-key relationships 
> to Java classes as automatically as possible, this is always less important 
> than being able to effortlessly bang SQL against the database. 
>
> I think Jooq is for those who find that ORMs don't work for them. 
> Those that find ORMs worth it don't need Jooq, they can use Hibernate or 
> Mybatis or whatever ORM suits them best. 
> Those that try to mix both usually find that they're running into problems 
> with inconsistent data. The usual consequence of denormalized data if you 
> will, or - from the Java perspective - of pointer aliasing. 
>

Well, I am mixing both in the same app with success.
I use hibernate for the business logic stuff and jooq for the reporting 
(mainly displaying tabular data with sums, counts, averages).
Both tools have pros and cons. Hibernate is excellent for efficiently 
loading graphs and has an interesting caching mechanism, on the other hand, 
jooq is perfect when plain SQL is needed, SELECT with aggregates, 
subqueries, stored procedures and such things. Hybrid scenarios can 
actually make sense if there is enough separation (I wouldn't write 
services that mix both in the same transaction).

The biggest problem with ORMs is that people expect too much from them. 
Many people think they can use them to design a wonderful OO layer on top 
of their DB and stop caring about SQL and the implications of the 
underlying relational structure, which obviously lead to disaster. Full 
object orientation always sounds nice, but not everything is designed to 
fit in this paradigm, especially MVC apps (typically HTTP-based webapps) 
which require some kind of service orientation by nature. 



 

-- 
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