Try fast search NHibernate

12 December 2008

WOW!

Si en mi “sucutrucho” logro hacer lo que hago, que pasaría con algo como esto ?

Me divorcio ? hmmmm me parece lo mas probable.

Artorius

A week ago I started a new project in uNhAddIns; the code-name is Artorius.

The base target of Artorius is the HQL-AST (perhaps is better to think about it as nHQL-AST).

The picture

ArtoriusStruct

The Story

The port of the string-AST-parser is an old task in NHibernate (perhaps one of my first occupation). Hibernate are using an old version of ANTLR Parser Generator and more than one year ago Ayende and I had tried the port of that code, in two different ways, but without a usable result. After that work I found GOLD and Diego Jancic (aka “The economist”) had begin a work to implement an string-AST-parser based on GOLD; unfortunately the work on OSS is hard to maintain and perhaps the state of NHibernate code-base, at that moment, was not ready to receive the new parser.

In uNhAddIns , after a request of my friend and after implement DetachedQuery, in a weekend born something like a game, named: DetachedDynQuery

The first time I think about Artorius was as an evolution of DetachedDynQuery; a real AST representation of an HQL query. I must admit that was a loooong thinking, without touch my keyboard, for various reason (the first is that now we have LINQ).

The Situation

To have a better idea about what nHQL-AST must support, I have begun the work from the string-AST-parser based on GOLD. The actual parser are passing the test available here (basically to test the grammar).

Browsing the code you can see that there are some other incomplete work but before start the real implementation of the nHQL-AST I prefer to complete the grammar. If you want navigate the BNF, of the actual grammar, you can download the HQL.htm file from here.

05 December 2008

The light

Yesterday I saw the light at the end of the tunnel.

The Oslo project.

Do you want avoid XML to map your domain ? Which language you want use to configure NH ? Why not English or Spanish or Italian ?

http://wm.microsoft.com/ms/msdn/oslo/mwindowexample.wmv

NHibernate have a lot of fireflies… the EntityMode.Xml are allowing something like this but using XML mappings.

Well…sorry it is incomparable.

The same base concept was provided by AjGenesis some years ago, but even if today AjGenesis are supporting text, instead XML, the MGrammar appear as a very powerful tool to create our DSL to generate all artifacts, including NHibernate mappings of course (I know… I know… AjGenesis is a project of “good soul”, behind MGrammar there is Microsoft).