Groovy in action second edition pdf


 

Contribute to clojurians-org/groovy-ebook development by creating an account on GitHub. Jun 2, a Groovy script that produces this book from docbook format to PDF. assert "$ nick is $book" == 'ReGina is Groovy in Action, 2nd ed.'. Groovy in Action, Second Edition is a thoroughly revised, comprehensive guide to Groovy programming. It introduces Java developers to the dynamic features.

Author:SHERIKA FECHER
Language:English, Spanish, Dutch
Country:Vietnam
Genre:Health & Fitness
Pages:304
Published (Last):25.02.2016
ISBN:259-5-23890-125-6
Distribution:Free* [*Register to download]
Uploaded by: GABRIELE

77307 downloads 120547 Views 18.65MB PDF Size Report


Groovy In Action Second Edition Pdf

Groovy in Action by Dierk König and his coauthors is a clear and detailed From the beginning, it was clear that Groovy would need a book like Groovy. assert "$nick is $book" == 'ReGina is Groovy in Action, 2nd ed.' Chapter 3 provides To download their free eBook in PDF, ePub, and Kindle formats, owners. American stock investor of modern time got that way. It could be a godsend to the legion Phil Adobe Systems Incorporat.

This book contains solutions to more than common problems, shown with more than Groovy code snippets. In a sign of the maturation of Groovy and increased awareness of Groovy, this chapter does not focus on basics of the Groovy language and does not spend pages comparing Groovy to Java a short section in this Preface covered that very briefly. Note that both Groovy Recipes and Groovy and Grails Recipes devote considerable pages and a number of recipes each to an introduction to the Groovy language and contrasting and comparing it with Java. The recipes in the first two chapters introduced Groovy features in an incidental manner as recipes were covered. As part of this, the advantages of Groovy compared to Java for certain applications are more clearly seen. It could be argued that my primary use of Groovy is as a scripting language to read and manipulate files. The chapter covers use of Groovy to read and write files and to manipulate text content of a file. These are the "heavy-hitting" features that make many of the seemingly smaller features and conciseness of Groovy possible. Discovering this reminded me that although this book has "Groovy 2" in its title, it also covers Groovy 1. This chapter includes recipes covering unit testing of Java with Groovy, testing web services SOAP-based and REST-based , Groovy 2 Features As would be expected, there is a lot of overlap between the three cookbook-style Groovy books in terms of types of recipes covered. An advantage of the electronic version of the book I reviewed the PDF is that these screen snapshots are in full color. If a developer could only download one of these books, factors to consider would be how familiar the developer is with Groovy already and whether the developer would rather having the book focus on introduction to Groovy with a focus on Groovy 1. All three books have their own advantages and disadvantages and I've enjoyed and learned something from all three.

Distinguishing between copy and modify semantics. Working with closures 5. A gentle introduction to closures. The case for closures 5. Using iterators. Handling resources with a protocol. Declaring closures 5. Simple declaration. Using assignments for declaration. Referring to methods as closures. Comparing the available options.

Using closures 5. Calling a closure. Understanding closure scope 5. Simple variable scope. Scoping at work: Support for design patterns 5. Relationship to the Visitor pattern. Relationship to the Builder pattern. Relationship to other patterns. Groovy control structures 6. Groovy truth 6. Evaluating Boolean tests. Assignments within Boolean tests. Conditional execution structures 6. The humble if statement. The conditional?: The switch statement and the in operator.

Sanity checking with assertions. Looping 6. Looping with while. Exiting blocks and methods 6. Normal termination: Object orientation, Groovy style 7. Defining classes and scripts 7. Defining fields and local variables. Safe dereferencing with the?. Organizing classes and scripts 7. File to class relationship.

Organizing classes in packages. Further classpath considerations. Advanced object-oriented features 7. Using inheritance. Working with GroovyBeans 7. Declaring beans. Using bean methods for any object. Fields, accessors, maps, and Expando.

Using advanced syntax features 7. Querying objects with GPaths.

Book Review: Groovy 2 Cookbook

Injecting the spread operator. Concise syntax with command chains. Dynamic programming with Groovy 8. What is dynamic programming? Customizing the MOP with hook methods 8.

Customizing methodMissing. Using closures for dynamic hooks.

Customizing GroovyObject methods. Modifying behavior through the metaclass 8. MetaClass knows it all. How to find the metaclass and invoke methods. Temporary MOP modifications using category classes. Using the Category annotation.

Groovy in action Dierk König

Real-world dynamic programming in action 8. Calculating with metrics. Replacing constructors with factory methods. Fooling IDEs for fun and profit. Undoing metaclass modifications. Compile-time metaprogramming and AST transformations 9.

A brief history 9. Generating bytecode, not source code. Putting the power of code generation in the hands of developers. Making Groovy cleaner and leaner 9. Code-generation transformations. Class design and design pattern annotations. Easier cloning and externalizing.

Exploring AST 9. Tools of the trade. AST by example: Creating by hand. Limitations 9. Groovy as a static language Motivation for optional static typing The role of types in Groovy. Type checking a dynamic language? Using TypeChecked Finding typos. Revisiting dynamic features in light of type checking.

Mixing type-checked code with dynamic code. Flow typing Least upper bound. Static compilation Static type checking extensions DelegatesTo revisited. Type checking extension scripts. Working with builders Learning by example: Using a builder.

Follow the author

Building object trees with NodeBuilder NodeBuilder in action: Understanding the builder concept. Working with MarkupBuilder Building XML. Working with StreamingMarkupBuilder. Task automation with AntBuilder From Ant scripts to Groovy scripts.

Smart automation scripts with logic. Reading a password with SwingBuilder.

Groovy in Action

Application design with FXML. Creating your own builder Subclassing BuilderSupport. Subclassing FactoryBuilderSupport. Working with the GDK Working with objects The Groovy language Chapter 1: Groovy basics General code appearance Probing the language with assertions Groovy at a glance Groovy's place in the Java environment Summary Chapter 3: Simple Groovy datatypes Objects, objects everywhere The concept of optional typing Overriding operators Working with strings Working with regular expressions Working with numbers Summary Chapter 4: Working with closures A gentle introduction to closures The case for closures Declaring closures Using closures Understanding closure scope Returning from closures Support for design patterns Summary Chapter 6: Groovy control structures Groovy truth Conditional execution structures Looping Exiting blocks and methods Summary Chapter 7: Object orientation, Groovy style Defining classes and scripts Organizing classes and scripts Advanced objectoriented features Working with GroovyBeans Using advanced syntax features Summary Chapter 8: Dynamic programming with Groovy What is dynamic programming?

Chapter 9: Around the Groovy library Chapter Working with builders Learning by example: Chapter Applied Groovy Chapter Domainspecific languages Groovy's flexible nature Variables, constants, and method injection Adding properties to numbers Leveraging named arguments Command chains Defining your own control structures Context switching with closures Another technique for builders Securing your DSLs Testing and error reporting Summary Chapter The Groovy ecosystem Groovy Grapes for selfcontained scripts Scriptom for Windows automation GroovyServ for quick startup Gradle for project automation CodeNarc for static code analysis GContracts for improved design Grails for web development Griffon for desktop applications Gaelyk for Groovy in the cloud Summary.

Regional Offices: Flag for inappropriate content. Related titles. Jump to Page. The first part of the book is about the Groovy language. The second part is about working with the Groovy library, while the third part dives into applied Groovy, showing you some best practices around tests and some other frameworks closely related to Groovy. In the first chapters, the Groovy Basics are covered.

The Groovy basics, as the name implies, covers the foundation of Groovy and gives a great start to grasp the language. This chapter is followed by the Groovy Datatypes and Collections, which really show the power and flexibility of Groovy, and showing the start of learning how to use functional programming with the Groovy programming language. This is completed by introducing Closures, one of the core language elements of Groovy.

Similar files:


Copyright © 2019 ruthenpress.info.
DMCA |Contact Us