DSLs in Action introduces the concepts and definitions a developer needs to build high-quality domain specific languages. It provides a solid foundation to the usage as well as implementation aspects of a DSL, focusing on the necessity of applications speaking the language of the domain. After reading this book, a programmer will be able to design APIs that make better domain models. For experienced developers, the book addresses the intricacies of domain language design without the pain of writing parsers by hand.
On any given day, a developer may encounter a system rife with languages, frameworks, and operating environments none of which resemble the actual domain of the system he's being asked to develop! Success and sanity dictate that developers and designers work at higher levels of abstraction so that they can remain focused on the problems they're trying to solve. Domain Specific Languages, "little languages" implemented on top of a conventional programming language, provide a way to maintain the power of the underlying network of technology while writing code that more closely models the domain of the business problem. DSLs in Action introduces the concepts and definitions a developer needs to build high-quality domain specific languages. It provides a solid foundation to the usage as well as implementation aspects of a DSL, focusing on the necessity of applications speaking the language of the domain. After reading this book, a programmer will be able to design APIs that make better domain models. For experienced developers, the book addresses the intricacies of domain language design without the pain of writing parsers by hand. The gap in understanding between the development team and the business domain specialists can lead to errors during user acceptance tests. This book teaches developers to build DSLs that bridge this gap by offering API development techniques that closely model the domain vocabulary. Even non-programmer domain experts can benefit from this book by learning how DSLs can make them a more integral part of the team during the program development phase. The book discusses DSL usage and implementations in the real world based on a suite of JVM languages like Java, Ruby, Scala, and Groovy. It contains code snippets that implement real world DSL designs and discusses the pros and cons of each implementation. WHAT'S INSIDE * Working with DSLs in real-life applications * In-depth techniques of DSL implementation * Meta-programming techniques * Parser/Combinator based little languages * Implementing DSLs on top of the JVM * Real-world DSL examples * Interoperability among JVM languages * Correct level of abstraction for your domain APIs * DSL and Domain Driven Design This book is written especially for developers familiar with JVM-based languages, but many of the techniques presented will work in other programming environments as well.