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.
|Language:||English, Spanish, Dutch|
|Genre:||Health & Fitness|
|Distribution:||Free* [*Register to download]|
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.
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.
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.
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.
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.
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.