Groovy 2 Cookbook
暫譯: Groovy 2 食譜
Andrey Adamovich, Luciano Fiandesio
- 出版商: Packt Publishing
- 出版日期: 2013-06-27
- 售價: $2,220
- 貴賓價: 9.5 折 $2,109
- 語言: 英文
- 頁數: 394
- 裝訂: Paperback
- ISBN: 1849519366
- ISBN-13: 9781849519366
-
相關分類:
JVM 語言
海外代購書籍(需單獨結帳)
商品描述
Java and Groovy go together like ham and eggs, and this book is a great opportunity to learn how to exploit Groovy 2 to the full. Packed with recipes, both intermediate and advanced, it's a great way to speed up and modernize your programming.
Overview
- Simple and more advanced recipes to cover a broad number of topics and challenges
- With scores of practical examples, this book will help you to build efficient, flexible, and well-integrated systems
- Solve everyday programming problems with the elegance and simplicity of Groovy 2
In Detail
Get up to speed with Groovy, a language for the Java Virtual Machine (JVM) that integrates features of both object-oriented and functional programming. This book will show you the powerful features of Groovy 2 applied to real-world scenarios and how the dynamic nature of the language makes it very simple to tackle problems that would otherwise require hours or days of research and implementation.
Groovy 2 Cookbook contains a vast number of recipes covering many facets of today's programming landscape. From language-specific topics such as closures and metaprogramming, to more advanced applications of Groovy flexibility such as DSL and testing techniques, this book gives you quick solutions to everyday problems.
The recipes in this book start from the basics of installing Groovy and running your first scripts and continue with progressively more advanced examples that will help you to take advantage of the language's amazing features.
Packed with hundreds of tried-and-true Groovy recipes, Groovy 2 Cookbook includes code segments covering many specialized APIs to work with files and collections, manipulate XML, work with REST services and JSON, create asynchronous tasks, and more. But Groovy does more than just ease traditional Java development: it brings modern programming features to the Java platform like closures, duck-typing, and metaprogramming.
In this new book, you'll find code examples that you can use in your projects right away along with a discussion about how and why the solution works. Focusing on what's useful and tricky, Groovy 2 Cookbook offers a wealth of useful code for all Java and Groovy programmers, not just advanced practitioners.
What you will learn from this book
- Use Groovy with different IDEs and Operating Systems
- Integrate Groovy with Java and understand the peculiar features of the language
- Work with files of different formats, like PDF, Excel, and Zip
- Manipulate XML and work with JSON
- Access databases using the elegant Groovy API
- Unleash the power of asynchronous programming using the advanced features of the GPars API
- Learn how to use Groovy to test your Java code and other testing techniques
- Master the metaprogramming capabilities of the language and learn how to write Domain Specific Languages
Approach
This book follows a Cookbook style and is packed with intermediate and advanced level recipes.
Who this book is written for
This book is for Java developers who have an interest in discovering new ways to quickly get the job done using a new language that shares many similarities with Java. The book’s recipes start simple, therefore no previous Groovy experience is required to understand the code and the explanations accompanying the examples.
商品描述(中文翻譯)
Java 和 Groovy 就像火腿和雞蛋一樣相輔相成,而這本書是學習如何充分利用 Groovy 2 的絕佳機會。書中包含了中級和高級的食譜,是加速和現代化編程的好方法。
**概述**
- 簡單和更高級的食譜涵蓋了廣泛的主題和挑戰
- 本書提供大量實用範例,幫助您構建高效、靈活且良好整合的系統
- 以 Groovy 2 的優雅和簡單解決日常編程問題
**詳細內容**
快速掌握 Groovy,這是一種為 Java 虛擬機(JVM)設計的語言,整合了物件導向和函數式編程的特性。本書將展示 Groovy 2 在現實場景中的強大功能,以及這種語言的動態特性如何使得解決本來需要數小時或數天研究和實現的問題變得非常簡單。
《Groovy 2 食譜》包含大量食譜,涵蓋當今編程領域的許多方面。從語言特定主題如閉包和元編程,到 Groovy 靈活性的更高級應用如 DSL 和測試技術,本書為日常問題提供快速解決方案。
本書的食譜從安裝 Groovy 和運行您的第一個腳本的基礎開始,並逐步進入更高級的範例,幫助您充分利用這種語言的驚人特性。
本書包含數百個經過驗證的 Groovy 食譜,涵蓋許多專門的 API,用於處理文件和集合、操作 XML、處理 REST 服務和 JSON、創建異步任務等。但 Groovy 不僅僅是簡化傳統 Java 開發:它為 Java 平台帶來了現代編程特性,如閉包、鴨子類型和元編程。
在這本新書中,您將找到可以立即在項目中使用的代碼範例,以及關於解決方案如何運作的討論。專注於有用和棘手的內容,《Groovy 2 食譜》為所有 Java 和 Groovy 程序員提供了豐富的有用代碼,而不僅僅是高級從業者。
**您將從本書中學到什麼**
- 在不同的 IDE 和操作系統中使用 Groovy
- 將 Groovy 與 Java 整合,理解該語言的特殊特性
- 處理不同格式的文件,如 PDF、Excel 和 Zip
- 操作 XML 和處理 JSON
- 使用優雅的 Groovy API 訪問數據庫
- 利用 GPars API 的高級特性釋放異步編程的力量
- 學習如何使用 Groovy 測試您的 Java 代碼及其他測試技術
- 精通該語言的元編程能力,學習如何編寫特定領域語言(DSL)
**方法**
本書採用食譜風格,包含中級和高級的食譜。
**本書的讀者**
本書適合對使用一種與 Java 共享許多相似之處的新語言快速完成工作的 Java 開發者。書中的食譜從簡單開始,因此不需要先前的 Groovy 經驗即可理解代碼和範例的解釋。