2007-05-24
| Table of Contents: |
| Rate This Article: | Add This Article To: |
( Page 3 of 3 )
Languages
At this point, we offer a definition of Domain-Specific Language:
A Domain-Specific Language is a custom language that targets a small problem domain, which it describes and validates in terms native to the domain.
Most computer languages are textual, with their statements and expressions consisting of sequences of characters in a standard character set. Graphical languages have become increasingly popular in recent years, particularly with the emergence of the Unified Modeling Language (UML) as a popular set of standard notational conventions for depicting elements in an object-oriented software system.
When computer experts talk about languages, they usually mean general-purpose textual programming languages such as Visual Basic, C#, or Java. In Domain-Specific Development, our interpretation of the word language is widened considerably—it includes graphical languages such as UML, flowcharts, entity-relationship diagrams, state diagrams, Venn diagrams, and so on. We also include other textual languages such as XML and domain-specific varieties like SQL and regular expressions. We even think of tabular and form-based formats such as spreadsheets or the Windows Forms Designer as being languages. Special languages also exist for domains such as music notation and direct-manipulation interfaces. With the power available in modern computers, there is absolutely no need to be restricted to simple linear textual notations to convey our intentions to the computer; we want to exploit the power of the computer to provide means to express the author's intent as directly as possible, thus increasing the efficiency of our development. This includes interactive aspects such as dragging and other gestures, context menus, toolbars, and so on.
There are two main forces at work driving the evolution of languages. The first of these is the progressive lifting of the level of abstraction at which we express our intentions about what we want the computer to do. Originally, programmers had to express their algorithms and data structures in terms directly accessible to the computer hardware, which was efficient for the hardware but very tedious and error-prone for the programmer. Subsequent developments such as symbolic assemblers, filing systems, third- and fourth-generation languages, databases, class libraries, and model-driven development have moved the languages in which developers express their intentions further from the computer hardware and closer to the problems they are trying to solve.
The second force driving language evolution is the increasing variety of available digital media. Originally, computers were used purely to compute with numbers, then also with symbols and texts, and then with bitmaps and images. The evolution of computing has reached a point where the limitation on how we express our intentions is no longer the physical capabilities of the computer itself but the limits of our understanding of how to construct and manipulate computer languages. In Domain-Specific Development, instead of building on a general-purpose language in order to solve a problem, we use a language that is itself designed to suit the problem being solved.
Related Work
Domain-Specific Development is not new. In 1976, David Parnas introduced the concept of families of programs in his paper "On the Design and Development of Program Families" and talked about the possibility of using a program generator to create the family members. In 1986, Jon Bentley in his column in the journal Communications of the ACM pointed out that much of what we do as programmers is the invention of "little languages" that solve particular problems. Later, in 1994, the popular and seminal book Design Patterns: Elements of Reusable Object-Oriented Software, by Gamma, Helm, Johnson, and Vlissides (also known as the "Gang of Four" book), introduced the Interpreter pattern. According to the authors, the intent of this pattern is: "Given a language, define a representation of its grammar along with an interpreter that uses the representation to interpret sentences in the language." But it is only relatively recently that Domain-Specific Development has begun to gain widespread acceptance in the IT industry.
Domain-Specific Development is closely related to many emerging initiatives from other authors and organizations, of which the following is a partial list.
Model-Driven Development
Many vendors of software development tools are offering Model-Driven Development tools, which allow users to build a model of their problem, often using a graphical language such as the Unified Modeling Language (UML). From these models, a code generator or model compiler is used to generate some or all of the code for the resulting application. The Object Management Group has a branded initiative under this heading called Model Driven Architecture (MDA). We'll talk more about model-driven development and MDA later in this chapter.
Language-Oriented Programming
Sergey Dimitriev, co-founder and CEO of JetBrains, uses the term "Language Oriented Programming" to describe the approach of creating a domain-specific language to solve a programming problem in his article
"Language-Oriented Programming: The Next Programming Paradigm" at www.onboard.jetbrains.com/is1/articles/04/10/lop/.
Language Workbenches
Martin Fowler, popular industry author and speaker, also refers to Language-Oriented Programming and uses the term "Language Workbench" to refer to the kind of tools required to support Language-Oriented Programming and Domain-Specific Development in his article "Language Workbenches: The Killer App for Domain-Specific Languages?" at http://
martinfowler.com/articles/languageWorkbench.html.
Domain-Specific Modeling
The Domain-Specific Modeling Forum (www.dsmforum.org) is a body that promotes the idea of specifying domain-specific languages and generating solutions from them. Their site contains several interesting and compelling case studies.
Generative Programming
The book Generative Programming: Methods, Tools, and Applications, by Krzysztof Czarnecki and Ulrich W. Eisenecker, discusses how to automate the generation of applications, with a particular focus on domain engineering and feature modeling, and presents a detailed discussion of several different techniques for program generation. There is a regular conference called Generative Programming and Component Engineering (GPCE) dedicated to this topic.
Intentional Software
Intentional Software (www.intentionalsoftware.com) aims to develop an environment in which all programming is domain-specific. Its Domain Workbench technology represents programs and models as data, and provides multiple ways to render and interact with them using domain-specific textual and graphical syntax.
Software Factories
Software Factories are described in the book Software Factories: Assembling Applications with Patterns, Models, Frameworks, and Tools, by Jack Greenfield and Keith Short, with Steve Cook and Stuart Kent. Software Factories are a strategic initiative from Microsoft that proposes to use a combination of passive content such as patterns, models, DSLs, assemblies, and help files, with dynamic content such a customized tools, tailored processes, templates, wizards, and tests, all integrated into Visual Studio for producing a particular type of solution. DSL Tools form an important part of this initiative.
![]() |
|


