Groovy for Domain-Specific Languages, 2/e(Paperback)
暫譯: Groovy 用於領域特定語言,第二版(平裝本)
Fergal Dearle
- 出版商: Packt Publishing
- 出版日期: 2015-09-29
- 售價: $2,210
- 貴賓價: 9.5 折 $2,100
- 語言: 英文
- 頁數: 439
- 裝訂: Paperback
- ISBN: 1849695407
- ISBN-13: 9781849695404
-
相關分類:
JVM 語言
海外代購書籍(需單獨結帳)
相關主題
商品描述
Extend and enhance your Java applications with domain-specific scripting in Groovy
About This Book
- Build domain-specific mini languages in Groovy that integrate seamlessly with your Java apps with this hands-on guide
- Increase stakeholder participation in the development process with domain-specific scripting in Groovy
- Get up to speed with the newest features in Groovy using this second edition and integrate Groovy-based DSLs into your existing Java applications.
Who This Book Is For
This book is for Java software developers who have an interest in building domain scripting into their Java applications. No knowledge of Groovy is required, although it will be helpful. This book does not teach Groovy, but quickly introduces the basic ideas of Groovy. An experienced Java developer should have no problems with these and move quickly on to the more involved aspects of creating DSLs with Groovy. No experience of creating a DSL is required.
What You Will Learn
- Familiarize yourself with Groovy scripting and work with Groovy closures
- Use the meta-programming features in Groovy to build mini languages
- Employ Groovy mark-up and builders to simplify application development
- Familiarize yourself with Groovy mark-up and build your own Groovy builders
- Build effective DSLs with operator overloading, command chains, builders, and a host of other Groovy language features
- Integrate Groovy with your Java and JVM based applications
In Detail
The times when developing on the JVM meant you were a Java programmer have long passed. The JVM is now firmly established as a polyglot development environment with many projects opting for alternative development languages to Java such as Groovy, Scala, Clojure, and JRuby. In this pantheon of development languages, Groovy stands out for its excellent DSL enabling features which allows it to be manipulated to produce mini languages that are tailored to a project's needs.
A comprehensive tutorial on designing and developing mini Groovy based Domain Specific Languages, this book will guide you through the development of several mini DSLs that will help you gain all the skills needed to develop your own Groovy based DSLs with confidence and ease.
Starting with the bare basics, this book will focus on how Groovy can be used to construct domain specific mini languages, and will go through the more complex meta-programming features of Groovy, including using the Abstract Syntax Tree (AST). Practical examples are used throughout this book to de-mystify these seemingly complex language features and to show how they can be used to create simple and elegant DSLs. Packed with examples, including several fully worked DSLs, this book will serve as a springboard for developing your own DSLs.
Style and approach
This book is a hands-on guide that will walk you through examples for building DSLs with Groovy rather than just talking about "metaprogramming with Groovy". The examples in this book have been designed to help you gain a good working knowledge of the techniques involved and apply these to producing your own Groovy based DSLs.
商品描述(中文翻譯)
**擴展和增強您的 Java 應用程式,使用 Groovy 的領域特定腳本**
## 本書介紹
- 使用這本實用指南,在 Groovy 中構建與您的 Java 應用程式無縫整合的領域特定迷你語言
- 通過在 Groovy 中使用領域特定腳本,增加利益相關者在開發過程中的參與
- 使用本書的第二版,快速掌握 Groovy 的最新功能,並將基於 Groovy 的 DSL 整合到您現有的 Java 應用程式中。
## 本書適合誰
本書適合對在 Java 應用程式中構建領域腳本感興趣的 Java 軟體開發人員。雖然不需要具備 Groovy 的知識,但了解 Groovy 將會有所幫助。本書不教授 Groovy,但會快速介紹 Groovy 的基本概念。經驗豐富的 Java 開發人員應該不會對這些內容感到困難,並能迅速進入使用 Groovy 創建 DSL 的更深入方面。不需要具備創建 DSL 的經驗。
## 您將學到什麼
- 熟悉 Groovy 腳本並使用 Groovy 閉包
- 使用 Groovy 的元編程功能來構建迷你語言
- 使用 Groovy 標記和建構器來簡化應用程式開發
- 熟悉 Groovy 標記並構建自己的 Groovy 建構器
- 使用運算子重載、命令鏈、建構器及其他多種 Groovy 語言特性來構建有效的 DSL
- 將 Groovy 與您的 Java 和基於 JVM 的應用程式整合
## 詳細內容
在 JVM 上開發意味著您是 Java 程式設計師的時代早已過去。JVM 現在已穩固地建立為一個多語言開發環境,許多專案選擇使用替代 Java 的開發語言,如 Groovy、Scala、Clojure 和 JRuby。在這些開發語言的殿堂中,Groovy 以其卓越的 DSL 支援功能而脫穎而出,允許其被操作以生成符合專案需求的迷你語言。
這本書是設計和開發基於 Groovy 的迷你領域特定語言的全面教程,將指導您開發幾個迷你 DSL,幫助您獲得自信和輕鬆開發自己的 Groovy 基於 DSL 所需的所有技能。
本書從最基本的內容開始,將重點放在如何使用 Groovy 構建領域特定的迷你語言,並將深入探討 Groovy 的更複雜的元編程特性,包括使用抽象語法樹(AST)。本書中使用實際範例來揭開這些看似複雜的語言特性的神秘面紗,並展示如何使用它們來創建簡單而優雅的 DSL。本書充滿範例,包括幾個完整的 DSL,將作為開發您自己的 DSL 的跳板。
## 風格與方法
本書是一個實用指南,將通過範例引導您使用 Groovy 構建 DSL,而不僅僅是談論「使用 Groovy 進行元編程」。本書中的範例旨在幫助您獲得良好的技術知識,並將其應用於生成自己的 Groovy 基於 DSL。