前翻 后翻
正在播放... 已暂停   您正在聆听的 Audible 音频版本的样品。
查看全部 3 张图片

DSLs in Action (英语) 平装 – 2011年1月27日

平均3.8 星
5 星
4 星
3 星
2 星
1 星
平均3.8 星 5条亚马逊美国的评论 us-flag |
| 天天低价·正品质优

显示所有 格式和版本 隐藏其他格式和版本
全新品最低价 非全新品最低价
平装, 2011年1月27日

『2016年度央视中国好书』盘点了2016年唱响主旋律,传播正能量的好书,并通过演讲、访谈、朗读、电视短片等手段分享年度好书,让读者体会好书的文字之美、思想之美、情感之美和艺术之美,以及体验阅读的快乐与意义。 >点击查看『2016年度央视中国好书』完整书单

click to open popover


  • iPhone/iPad/Mac
  • Android手机或平板电脑



  • 出版社: Manning Publications; Pap/Psc (2011年1月27日)
  • 平装: 375页
  • 语种: 英语
  • ISBN: 1935182455
  • 条形码: 9781935182450
  • 商品尺寸: 18.7 x 1.9 x 23.5 cm
  • 商品重量: 630 g
  • ASIN: 1935182455
  • 用户评分: 分享我的评价
  • 亚马逊热销商品排名: 图书商品里排第2,278,946名 (查看图书商品销售排行榜)
  • 您想告诉我们您发现了更低的价格?



Debasish Ghosh, Chief Technology Evangelist at Anshinsoft, is passionate about programming languages and cooperative polyglotism. He has developed systems using multiple JVM languages and has designed DSLs using Java, Ruby, and Scala. Debasish is a senior member of the ACM and an active blogger on programming techniques and languages.


5 星
4 星
3 星
2 星
1 星

此商品在美国亚马逊上最有用的商品评论 (beta)

美国亚马逊: 平均3.8 星 5 条评论
19/20 人认为此评论有用
平均5.0 星 Five languages, no trivial examples! 2011年1月19日
评论者 John Griffin - 已在美国亚马逊上发表
版本: 平装

Once you implement a domain model in your favorite programming language, it no longer speaks the dialect that the domain expert can understand. If your implementation doesn't conform exactly to the specifications you agreed on with the domain user there's no way it can be verified by the person who understands the domain rules.

DSLs in Action addresses this by suggesting a DSL-driven application development model. Design your domain APIs around the syntax and semantics that the domain user understands. Then, even during the development of the code base, the user can do incremental verifications of the domain rule implementations. If your code speaks the language of the domain, it becomes clearer to the person who develops it, to the one who maintains it, and to a nonprogrammer domain expert who understands the business.

You will learn how to design and implement DSLs using the modern languages Ruby, Groovy, Scala, Clojure and Java. In addition, discussions of the strengths and weaknesses of these languages when designing a DSL are included.

Admittedly, not everyone will be familiar with all the programming languages used to implement the DSL structures in this book so the author has included short reference cards (or cheat sheets) for the languages in the appendixes. More thorough references are provided to complete texts to supplement them. The source code for all examples in this book is available from Manning's website, [...].

The author, Debasish Ghosh (@debasishg on Twitter), is the chief technology evangelist at Anshinsoft ([...]). He's a senior member of the ACM and his blog is at Ruminations of a Programmer ([...]).

Summary of Contents

Part 1: Using DSLs
Chapter 1: Learning to Speak the Language of the Domain
What a DSL actually is and the benefits it can provide start this chapter. The structure of a DSL is covered. The chapter concludes by tying in appendix A and discussing what makes a well-designed abstraction.

Chapter 2: The DSL in the Wild
Here you create your first DSL using Java. Groovy is introduced to demonstrate how to make the DSL more Expressive. DSL implementation patterns are introduced and how to choose a DSL type is presented.

Chapter 3: DSL-driven Application Development
Integrating internal and external DSLs in an application is the main topic of this chapter. Once this topic is completed, error and exception management is discussed and performance optimization is covered.

Part 2: Implementing DSLs
Chapter 4: Internal DSL Implementation Patterns
The author demonstrates how to build a programmer's toolbox of architectural patterns that can be used to implement DSLs. The use of metaprogramming to aid in the construction is extensively covered.

Chapter 5: Internal DSL Design in Ruby, Groovy and Clojure
The running application typical of Manning books, in this case a stock trading processor, is introduced here. The initial implementation is in Ruby and then it is improved with Groovy. Clojure is introduced to demonstrate how one must think a little differently with this language. A discussion of the pitfalls of each of these languages concluded the chapter,

Chapter 6: Internal DSL Design in Scala
This chapter is dedicated to Scala to which the author gives a good introduction. Developing an internal DSL with Scala is then covered. A discussion of monadic structures rounds out the chapter.

Chapter 7: External DSL Implementation Artifacts
This chapter is dedicated to the tools used to generate an external DSL. Parsers are discussed along with ANTLR, the Eclipse Modeling Framework and Xtext.

Chapter 8: Designing External DSLs using Scala Parser Combinators
Beginning with a discussion of exactly what parser combinators are this chapter continues with the Scala parser combinator library. A discussion of packrat parsers follows and then a dive into Scala DSL design with the combinators finishes up.

Part 3: Future trends in DSL development
Chapter 9: DSL Design: Looking Forward
The main thrust of this chapter is to touch base on developing trends in the DSL world. DSL workbenches are canvassed. The important topic of DSL versioning and practices that you can adopt to ensure a smooth evolution of your DSL's syntax rounds out the book.


Not for beginners. At first this book comes at you so fast that it can seem overwhelming but hold on it does get better. Although this reviewer would not call this a 'Magnum Opus' it is as close as you get without being one. It becomes immediately clear that the author knows what he is doing and does this sort of thing everyday.

Ruby, Groovy, Clojure and Scala along with Java are used in the examples and this reviewer and the author are willing to bet that the reader is fluent in at least one of those languages. The good thing here, as the author says, is all of the code is understandable regardless of whether you have experience with one of them or not. It should also convince readers to do what they've said they were going to do for the last three years and learn a new programming language. One excellent side effect of so many languages in such a small space is that you will learn how each of them makes you think about and approach a problem differently.

The book contains excellent discussions of domain cognizance with topics such as accidental complexity and minimalism in coding followed with a great review/introduction of the differences, strengths and weaknesses of Internal DSLs versus External DSLs. There is even a chapter dedicated to designing external DSLs via Scala parser combinators.

It is an exhaustively wide and deep coverage of the subject. By the time you've finished reading the book, you'll have a thorough understanding of the concepts that you need to master in order to design domain abstractions that your users can understand and appreciate. This will bring much added business value to any project.

Five languages with no trivial examples all in one book, highly recommended.
11/12 人认为此评论有用
平均4.0 星 A pragmatical book on DSLs 2011年1月10日
评论者 Federico Tomassetti - 已在美国亚马逊上发表
版本: 平装
This book introduces DSLs in the right way. It explains well their importance and later it explains how to realize the first internal DSLs easily. The author created a really smooth path into the DSLs realm and I think it is a great accomplishment. Moreover the author masters many languages and it is able to explain the differences between each of them, providing advices to choose the best option to implement your DSLs. Reading this book you will play with Ruby, Scala (the langauge the author seems to prefer), Groovy and Clojure. I appreciated very much the inclusion of a functional language, I think it gives completeness to the topic of internal DSLs.

On internal DSLs this is absolutely the most pragmatic and complete resource I had ever read.

On external DSLs the author introduce the important concepts and provide an example using Xtext (in my opinion the best technology to use right now).

I also appreciated the chapter on the future trends. I think it gives some ideas about what we should expect from DSLs and analyzing the trend towards more expressivity. The concept of DSL workbench is also introduced.

Finally seven appendixes add value to book: we have cheat sheet for [Ruby|Scala|Groovy|Clojure]'s DSL-friendly features, notes on polyglot programming, an appendix on metaprogramming.

In my opinion this book is definitely worthy the money, there is a lot of value on it so take a look to it.
4/6 人认为此评论有用
平均5.0 星 Great book, good theory and practical examples 2011年6月29日
评论者 Berlin L. Brown - 已在美国亚马逊上发表
版本: 平装
I too have been interested in compilers, language design, DSLs. I have a couple of books on ANTLR, Computer Science Compiler Design and other misc DSL books.

They have their strengths and weaknesses but most of them are things you might already know or with ANTLR, content you can look-up online. The books seem dry and not interesting. You have to force yourself to go through them. And even if you go through them you aren't interested in actually taking the time to go through the example.

DSLs in Action was a fun book to read. It a wide range detail from some of the theory to the case studies to useful examples. It was a solid book that really kept me interested in the material. I have been hoping that a book would cover, Scala and Lisp and Ruby. This book touches on some of the subjects.
3/5 人认为此评论有用
平均5.0 星 Wonderful book 2011年2月15日
评论者 Alexey Ott - 已在美国亚马逊上发表
版本: 平装
Great book on how to design, implement and use domain specific languages.
Author started from common description of DSLs, show different approaches to they building (for both internal, and external DSLs), and provided a lot of examples in different languages (Groovy, Ruby, Clojure, and Scala (his favorite).
So, after reading this book, you'll able to design and create your own DSLs.
P.S. there is also great philosophical appendix on designing "good" programs - it really worth to read it to many peoples.
3/19 人认为此评论有用
平均2.0 星 LOGO is another great DSL - and language meant to teach children programming ... 2014年7月26日
评论者 Keith McAfee - 已在美国亚马逊上发表
版本: 平装
I am completely confused by the authors misuse of his title term. DSL, Domain Specific Language is a a term that only has meaning in contrast to GPL, General Purpose Langauge. Each and every 1 of the 5 JVM languages in this book is a GPL. They are standard general purpose languages that are compiled into java IL and run on the JVM. In exactly the same way that Visual Basic.NET, F#, C# and Boo are .Net langauges, all of which are GPLs as well. The test of DSL vs GPL is simple - is the language usable or intended to be usable to write programs of many forms, solving nearly any problem that arises ... then it is a GPL. Or is the language intentionally built only to solve a subset of problems that arise commonly in more narrow circumstances, and build to take advantage of that narrowness to make development either easier, more testable, more provable, more efficient, more readable or more secure. If a language be as appropriately used to build a web site, a web server, a checkbook balancing app or a game ... then it, by definition is in no way a DSL.

Examples of DSLs include such things as: The CScript langauge used in the torque game engine, the mod scripting interfaces exposed in games such as WoW, Eve Online and Neverwinter Nights. The R language for statistical computation. The Prolog language could "almost" be called a DSL, because even though it was intended as a high-level GPL, it turns out that it is truly suited for developing expert systems (more efficiently than any other GPL) and less suited to most other general programming tasks. LOGO is another great DSL - and language meant to teach children programming concepts, but useful for problem solving almost exclusively in the domain of drawing pictures on a screen.

This book does seem to be an interesting book for those interested in understanding common concepts and differences in general purpose languages that are targeted to a VM, such as JVM/.Net - that adopt different programming styles, such as traditional static typed OO, dynamic OO, and functional paradigms.

I wish I could get past the complete misuse of the core concept enough to value it on that level.