[ANN] Domain-Specific Languages by Martin Fowler
От: perekrestov Украина  
Дата: 12.10.10 11:36
Оценка: 11 (1) :)
Domain-Specific Languages
Re: [ANN] Domain-Specific Languages by Martin Fowler
От: perekrestov Украина  
Дата: 12.10.10 11:47
Оценка:
Вот еще коментарии к выпуску этой книги г-на Фаулера

Domain Specific Languages (DSLs) have been around since I've been in computing, but it's hard to find much information about how to work with them. DSLs are small languages, focused on a particular aspect of a software system. You can't build a whole program with a DSL, but you often use multiple DSLs in a system mainly written in a general purpose language.

DSLs come in two main forms: external and internal. An external DSL is a language that's parsed independently of the host general purpose language: good examples include regular expressions and CSS. External DSLs have a strong tradition in the Unix community. Internal DSLs are a particular form of API in a host general purpose language, often referred to as a fluent interface. The way mocking libraries, such as JMock, define expectations for tests are good examples of this, as are many of the mechanisms used by Ruby on Rails. Internal DSLs also have a long tradition of usage, particularly in the Lisp community.

People find DSLs valuable because a well-designed DSL can be much easier to program with than a traditional library. This improves programmer productivity, which is always valuable. In particular it may also improve communication with domain experts, which is an important tool for tackling one of the hardest problems in software development. CSS is an excellent example of this, most people who program CSS don't consider themselves to be programming. Despite this, however, I don't generally think that end-users will usually write in DSLs directly — it's the communication enhancement that's important.

Although DSLs have been around for a long time, the lack of knowledge of how to program with them is a significant barrier — which is exactly why I've worked on this book. The books provides techniques to develop both internal and external DSLs, giving you both the information to choose between them and a good package of information to begin your work. I also stress the importance of layering a DSL over a library, so that you usually build both together. There's also material on code-generation, which is an occasionally essential part of working with a DSL.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.