jOOQ is an internal domain-specific language (DSL), modelling the SQL language (external DSL) in Java (the host language). The main mechanism of the jOOQ API is described in this popular article: The Java Fluent API Designer Crash Course. Anyone can implement an internal DSL in Java (or in most other host languages) according to the … Continue reading A Curious Incidence of a jOOQ API Design Flaw
Tag: fluent-api
Advanced Java Trickery for Typesafe Query DSLs
When browsing Hacker News, I recently stumbled upon Benji Weber's most interesting attempt at creating typesafe database interaction with Java 8. Benji created a typesafe query DSL somewhat similar to jOOQ with the important difference that it uses Java 8 method references to introspect POJOs and deduce query elements from it. This is best explained by … Continue reading Advanced Java Trickery for Typesafe Query DSLs
Simplernate. A Query DSL for Hibernate, Inspired by jOOQ
"Simplernate" ! The name is very compelling. And so is the idea - we think. Specifically, because we get most credit for this new project in the following short readme: https://gist.github.com/thermz/eb1b12b2146168a08e68 It reads: Simplernate is (will be) an Hibernate wrapper that help developer to query the database using Hibernate ORM. To do this, Simplernate offers a … Continue reading Simplernate. A Query DSL for Hibernate, Inspired by jOOQ
The Java Fluent API Designer Crash Course
Ever since Martin Fowler's talks about fluent interfaces, people have started chaining methods all over the place, creating fluent API's (or DSLs) for every possible use case. In principle, almost every type of DSL can be mapped to Java. Let's have a look at how this can be done DSL rules DSLs (Domain Specific Languages) … Continue reading The Java Fluent API Designer Crash Course
The ultimate SQL-DSL: jOOQ in Scala
I've recently come across some advertising for the new upcoming version of Scala IDE for Eclipse, which made me remember my college programming lessons at the EPFL Laboratoire des Méthodes de Programmation (LAMP), the origin of the Scala language. Back then, Scala appeared quite freaky. Very elegant, a bit inefficient, somewhat dogmatic. It was much … Continue reading The ultimate SQL-DSL: jOOQ in Scala
jOOQ-meta. A “hard-core SQL” proof of concept
jOOQ-meta is more than just meta data navigation for your database schema. It is also a proof of concept for the more complex jOOQ queries. It is easy for you users to believe that the simple vanilla queries of this form will work: create.selectFrom(AUTHOR).where(LAST_NAME.equal("Cohen")); But jOOQ claims to be a "hard-core SQL library". A "hard-core … Continue reading jOOQ-meta. A “hard-core SQL” proof of concept
Op4j and Lambda-J. For more fluency in Java
I recently blogged about simple constructs, such as Java's Arrays.asList() and the fact that it is not used often enough: https://blog.jooq.org/javas-arrays-aslist-is-underused/ I like to work with fluent API's, which are still quite a rare thing in the Java world, compared to other languages that support features such as language extensions, operator overloading, true generics, extension … Continue reading Op4j and Lambda-J. For more fluency in Java
Another Fluent API: jOOX. Porting jQuery to Java
Recently, in my every day programming madness, I really felt the urge to kill someone involved with the formal specification of DOM. The beloved Document Object Model. While everyone understands that this API is complete in functionality and scope and it's a standard, and it's almost the same in every language.... well it's incredibly verbose. … Continue reading Another Fluent API: jOOX. Porting jQuery to Java