Groovy for Domain-Specific Languages, 2/e(Paperback)
Fergal Dearle
- 出版商: Packt Publishing
- 出版日期: 2015-09-29
- 售價: $2,170
- 貴賓價: 9.5 折 $2,062
- 語言: 英文
- 頁數: 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.
商品描述(中文翻譯)
使用Groovy在Java應用程式中擴展和增強您的功能
關於本書
- 使用這本實用指南,在Groovy中建立與Java應用程式無縫整合的領域特定腳本語言
- 通過Groovy的領域特定腳本語言,增加利益相關者在開發過程中的參與度
- 使用第二版的最新功能,並將基於Groovy的領域特定腳本語言集成到現有的Java應用程式中
本書適合對象
本書適合對在Java軟體開發人員,對於在他們的Java應用程式中建立領域特定腳本語言有興趣的人。不需要了解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。