Miguel Ángel Ballesteros bio photo

Miguel Ángel Ballesteros

CTO and co-founder of GoKoan. I build AI products such as Koanly, learning systems and agentic software workflows that turn complex knowledge into usable tools.

Email LinkedIn Github
RSS Feed

OQL / JEC - Object Query Language / Java Expression Compiler

Available in English .

I created OQL (and it’s successor JEC) to achieve bidirectional data binding in the WAM presentation framework.

Let’s say you have the following expression:

book.pages[selectedPage].text

So, you have a context Map with a key/value pair ("book" -> Book) pointing to a business object Book that holds a list of pages, that’s an object with a text attribute. Another context key/value pair relates the selectedPage to an integer number: ("selectedPage" -> Int).

In the view rendering phase (it was done at the server side, the usual approach at that time), that expression was evaluated (we did a get) and the text of the selected book page was printed.

In the control phase, we received model updates and did a set of that expression.

That’s all :-)

The 2nd version JEC was released to the Open Source community in SourceForge jec.sourceforge.net. Here’s an annotated class diagram of the JEC project:

JEC design