Domain Specific Querying Language – Atomic.Net

This is just a quick post to inform that I’ve begun development on what I’m calling the Atomic Domain Specific Querying Language or ADSQL for short.  I’ve setup a TestService class in the AtomicWeb project to serve as a play ground for exploring the language.  Please note that this code will not execute without throwing an exception as there is very little implementation behind the declarations.  In fact, it’s mostly filled with thrown NotImplementedExceptions.  Execution is not a goal at this time.  Right now, I am planning on inviting others to explore the grammar of the language and to either contribute or suggest additional elements to the language.  The language is defined in the Schema folder of the Atomic.Net project.  I will also be adding more elements over the next few days/weeks.  The basic strategy of consuming the language when using an IDE that provides IntelliSense style assistance is to use dot notation to discover the next applicable elements to choose from in order to continue writing a statement.  If typing in a dot results in no suggestions, remove the dot and try a square bracket.  This will indicate that the language requires an input argument.  The input argument may be a lambda expression to branch into the language constructs of another related entity.  Consider the following as an example:

Example of a related query in Atomic.Net's Domain Specific Querying Language

Example of a related query in Atomic.Net’s Domain Specific Querying Language


The .CreatedBy element chained from the .And expects a lambda expression in which the single argument provided to the expression will be the appropriate criteria language elements for the .CreatedBy property.  In this case, the argument provided for the createdByWhere parameter will be a User.Criteria language element.  The developer can then formulate the appropriate sub query criteria that applies to the CreatedBy property.

In addition to more language elements, I will also be adding a few more core entities and another project to demonstrate how application developers can add their own entities to the schema.

I’ll discuss the inner workings of how generics are used to construct and route the language elements in another post.  In the meantime, if you’re interested in how the language expressiveness is achieved, please explore the Schema folder in the Atomic.Net project.

See the latest at .