Peter Bell has been talking about domain specific languages for some time now, but I expect they are still a pretty foreign concept to many people, myself included not too long ago. However, if you have used any of the popular ColdFusion frameworks like Model-Glue, Mach-II, ColdSpring, etc., then you have actually used a DSL in their XML configuration files.
To my current understanding, a DSL allows you to take a generic set of application code and configure it to a specific use – hence the words domain specific. That configuration may be done via XML, a text file that is parsed, or even code. The big thing here is that you are writing configuration for a specific problem area or domain.
On a recent project, we were faced with 50+ simple CRUD style lookup tables that all had to have the same style list, create, and update form user interfaces. So, instead of creating individual little DAO, business, and service objects as well as the same cfm views over and over, we are adopting a generic “object” approach where there will be a single DAO, business object and service object, which when given an “object definition” via an XML document, will become smart objects and all of the sudden know that they represent a certain data element.
By doing this, the actual code we have to maintain is limited and making fixes and tweaks that much easier. The UI design is also much simpler in that there are only one set of views, so changing styles etc. can be done in one place and be applied across the board. It is also much simpler to make changes to the different objects managed by the system, whether that be adding a new object definition or changing the properties of an existing object definition.
So, are people using DSLs out there without really knowing it? What are some problem areas that you have addressed with a DSL? I know Peter Bell has discussion building whole applications before and while I am not to that point yet, I am very interested.