Начать новую тему Ответить на тему
Статистика раздачи
Размер: 25.07 МБ | | Скачали: 0
Сидеров: 11  [0 байт/сек]    Личеров: 4  [0 байт/сек]
Пред. тема | След. тема 

Автор
Сообщение

Ответить с цитатой 

Groovy 2 Cookbook

Год: 2013
Автор: Andrey Adamovich, Luciano Fiandesio
Жанр: Программирование
Издательство: Packt Publishing
ISBN: 978-1-84951-937-3
Язык: Английский
Формат: PDF
Качество: Изначально компьютерное (eBook)
Количество страниц: 394
Описание:
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.

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.
Chapter 1: Getting Started with Groovy 7
Introduction 7
Installing Groovy on Windows 8
Installing Groovy on Linux and OS X 10
Executing Groovy code from the command line 11
Using Groovy as a command-line text file editor 14
Using Groovy to start a server on the command line 16
Running Groovy with invokedynamic support 17
Building Groovy from source 18
Managing multiple Groovy installations on Linux 20
Using groovysh to try out Groovy commands 23
Starting groovyConsole to execute Groovy snippets 29
Configuring Groovy in Eclipse 35
Configuring Groovy in IntelliJ IDEA 42
Chapter 2: Using Groovy Ecosystem 47
Introduction 47
Using Java classes from Groovy 48
Embedding Groovy into Java 51
Compiling Groovy code 57
Simplifying dependency management with Grape 60
Integrating Groovy into the build process using Ant 63
Integrating Groovy into the build process using Maven 71
Integrating Groovy into the build process using Gradle 75
Generating documentation for Groovy code 78
Checking Groovy code's quality with CodeNarc 82
Chapter 3: Using Groovy Language Features 89
Introduction 89
Searching strings with regular expressions 90
Writing less verbose Java Beans with Groovy Beans 92
Inheriting constructors in Groovy classes 99
Adding the cloning functionality to Groovy Beans 100
Defining code as data in Groovy 104
Defining data structures as code in Groovy 108
Implementing multiple inheritance in Groovy 117
Adding a functionality to the existing Java/Groovy classes 123
Defining type-checking rules for dynamic code 126
Adding automatic logging to Groovy classes 132
Chapter 4: Working with Files in Groovy 135
Introduction 136
Reading from a file 136
Reading a text file line by line 138
Processing every word in a text file 140
Writing to a file 142
Replacing tabs with spaces in a text file 144
Filtering a text file's content 146
Deleting a file or directory 149
Walking through a directory recursively 151
Searching for files 153
Changing file attributes on Windows 157
Reading data from a ZIP file 159
Reading an Excel file 160
Extracting data from a PDF 162
Chapter 5: Working with XML in Groovy 167
Introduction 167
Reading XML using XmlSlurper 168
Reading XML using XmlParser 170
Reading XML content with namespaces 172
Searching in XML with GPath 175
Searching in XML with XPath 178
Constructing XML content 184
Modifying XML content 187
Sorting XML nodes 189
Serializing Groovy Beans to XML 192
Chapter 6: Working with JSON in Groovy 197
Introduction 197
Parsing JSON messages with JsonSlurper 198
Constructing JSON messages with JsonBuilder 201
Modifying JSON messages 204
Validating JSON messages 205
Converting JSON message to XML 211
Converting JSON message to Groovy Bean 214
Using JSON to configure your scripts 218
Chapter 7: Working with Databases in Groovy 223
Introduction 223
Creating a database table 224
Connecting to an SQL database 228
Querying an SQL database 231
Modifying data in an SQL database 235
Calling a stored procedure 239
Reading BLOB/CLOB from a database 242
Building a simple ORM framework 244
Using Groovy to access Redis 246
Using Groovy to access MongoDB 252
Using Groovy to access Apache Cassandra 256
Chapter 8: Working with Web Services in Groovy 263
Introduction 263
Downloading content from the Internet 264
Executing an HTTP GET request 265
Executing an HTTP POST request 268
Constructing and modifying complex URLs 271
Issuing a REST request and parsing a response 272
Issuing a SOAP request and parsing a response 276
Consuming RSS and Atom feeds 279
Using basic authentication for web service security 283
Using OAuth for web service security 284
Chapter 9: Metaprogramming and DSLs in Groovy 289
Introduction 289
Querying methods and properties 290
Dynamically extending classes with new methods 293
Overriding methods dynamically 296
Adding performance logging to methods 299
Adding a caching functionality around methods 305
Adding transparent imports to a script 317
DSL for executing commands over SSH 319
DSL for generating reports from logfiles 327
Chapter 10: Concurrent Programming in Groovy 335
Introduction 335
Processing collections concurrently 336
Downloading files concurrently 340
Splitting a large task into smaller parallel jobs 344
Running tasks in parallel and asynchronously 349
Using actors to build message-based concurrency 355
Using STM to atomically update fields 361
Using dataflow variables for lazy evaluation 365
Index 371
Правила, инструкции, FAQ!!!
Торрент   Скачать торрент Магнет ссылка
Скачать торрент
[ Размер 16.14 КБ / Просмотров 15 ]

Статус
Проверен 
 
Размер  25.07 МБ
Приватный: Нет (DHT включён)
.torrent скачан  0
Как залить торрент? | Как скачать Torrent? | Ошибка в торренте? Качайте магнет  


     Отправить личное сообщение
   
Страница 1 из 1
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему


Сейчас эту тему просматривают: нет зарегистрированных пользователей и гости: 1


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Перейти:  
Ресурс не предоставляет электронные версии произведений, а занимается лишь коллекционированием и каталогизацией ссылок, присылаемых и публикуемых на форуме нашими читателями. Если вы являетесь правообладателем какого-либо представленного материала и не желаете чтобы ссылка на него находилась в нашем каталоге, свяжитесь с нами и мы незамедлительно удалим её. Файлы для обмена на трекере предоставлены пользователями сайта, и администрация не несёт ответственности за их содержание. Просьба не заливать файлы, защищенные авторскими правами, а также файлы нелегального содержания!