By Peter Bell

Rails, Cats and DSLs

Sam picked up on an interesting article and Sean put together a great response. I just wanted to look at the discussion from the perspective of Domain Specific Languages to provide another way of looking at such issues . . .

Rails (or MG:Unity) can be viewed as a collection of simple Domain Specific Languages for rapidly developing web applications (it also comes with a build in interpreter for the DSLs - that's the framework code). The strength of Domain Specific Languages is that they allow you to more efficiently capture your intent (less characters and effort are required to express the same functionality). Any Domain Specific Language will allow you to implement a class of functionality (workflows, controllers, wiring of beans, object relational mapping, validation, URL creation, etc.) more quickly that implementing the same functionality in ColdFusion, Ruby or Java directly.

However, as Sean pointed out, there is a learning curve to any language (whether it is a framework, a tag, an XML schema, boxes and arrows, a table based interface for entering requirements or whatever). So the amount of times you'll use the language and the amount of time it'll save you must be compared to the learning curve. Whether it is worth using a DSL depends on how well your use cases overlap with those envisioned by the DSL author, the steepness of the customization cliff, the ease of learning the language, the power of the language, and like learning human languages - the number of other languages you're learnt in the past. In my experience, someone who has learnt fifteen frameworks will probably have a much easier time picking their sixteenth.

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.005.