My favorites | Sign in
Project Logo
                
People details
Project owners:
  diogo86

The DSL Catalog project tries to offer end users the possibility to query the application with a Domain Specific Language that derives from class methods implemented by the developer.

Each catalog class represents a business entity collection that's supposed to be browsable by the user through some predefined criterias.

Users must be able to type "students from London enrolled into Maths with professor John". The query is gonna be processed as:

  1. instantiate the "Students" catalog class
  2. call "from" method passing "London" as an argument
  3. this method returns the students catalog itself
  4. call "enrolled" method
  5. then it instantiates and returns the "Enrollment" catalog
  6. the enrollment catalog is joined to the students catalog
  7. call "into" passing "Maths" as an argument
  8. this method returns the enrollment catalog
  9. call "withProfessor" method passing "John" as an argument
  10. this method returns the enrollment catalog

Then the query is configured with user provided criterias and gets ready to be iterated over for the results.

Catalogs and methods are named whatever the developer thinks are clear for its users. In fact it's suggested that application's users take part into the language development since they have better business understanding.

The code implementation uses PHP for the host language and Zend_Db as its database abstraction layer. However the proposed idea can be implemented in most programming languages with or without a corresponding database abstraction layer.

Status

It currently features a class structure with Fluent Interface for internal usage and an external interface usage as an exported Domain Specific Language.

A small demo application is available with a client interface, some catalogs (names in Portuguese) and an SQLite database.









Hosted by Google Code