By Adam L. Davis
Start development robust apps that make the most of the dynamic scripting functions of the Groovy language. This booklet covers Groovy basics, corresponding to fitting Groovy, utilizing Groovy instruments, and dealing with the Groovy improvement equipment (GDK). you are going to additionally research extra complicated points of Groovy, corresponding to utilizing Groovy layout styles, writing DSLs in Groovy, and benefiting from Groovy's useful programming features.
There is extra to Groovy than the center language, so Learning Groovy covers the prolonged Groovy surroundings. you will see tips on how to harness Gradle (Groovy's construct system), Grails (Groovy's net software framework), Spock (Groovy's trying out framework), and Ratpack (Groovy's reactive net library).
What you are going to learn
- Groovy basics, together with the GDK or Groovy improvement Kit
- Advanced Groovy, equivalent to writing Groovy DSLs
- Functional programming in Groovy
- GPars, the integrated concurrency library
- Gradle, the construct system
- Grails, the net software framework
- Spock, the checking out framework
- Ratpack, the reactive net library
Who is that this booklet for
Although this publication is meant for people with a Java history, an individual with easy programming abilities may gain advantage from it. This e-book is a data-filled, but easy-to-digest travel of the Groovy language and atmosphere.
Read Online or Download Learning Groovy PDF
Similar compilers books
This ebook constitutes the refereed lawsuits of the eighth foreign convention on Case-Based Reasoning, ICCBR 2009, held in Seattle, WA, united states, in July 2009. The 17 revised complete papers and 17 revised poster papers offered including 2 invited talks have been conscientiously reviewed and chosen from fifty five submissions.
Xv From the previous to the recent xvii Acknowledgments xxi 1 Verilog – an instructional advent 1 Getting began 2 A Structural Description 2 Simulating the binaryToESeg driving force four growing Ports For the Module 7 making a Testbench For a Module eight eleven Behavioral Modeling of Combinational Circuits Procedural types 12 ideas for Synthesizing Combinational Circuits thirteen 14 Procedural Modeling of Clocked Sequential Circuits Modeling Finite nation Machines 15 ideas for Synthesizing Sequential platforms 18 Non-Blocking task ("
Many folks have already got no less than a passing acquaintance with procedural languages akin to uncomplicated or Pascal, yet would possibly not have met a useful language like Lisp earlier than. utilizing an identical relaxing and occasionally quirky variety that they hired so effectively in "The paintings of C-Programming", Robin Jones and his workforce clarify the basics of Lisp in a manner that scholars from university to postgraduates will locate lucid and stimulating.
This publication constitutes the completely refereed post-conference complaints of the twenty ninth overseas Workshop on Languages and Compilers for Parallel Computing, LCPC 2016, held in Rochester, long island, united states, in September 2016. The 20 revised complete papers provided including four brief papers have been conscientiously reviewed.
- APL Programs for the Mathematics Classroom
- Compilers: Principles, Techniques, and Tools (2nd Edition)
- Advances in Design and Specification Languages for Embedded Systems
- High integrity compilation: a case study
Extra info for Learning Groovy
AnnotationCollector can be used to create a meta-annotation • Many improvements to existing AST transformations This release saw a huge improvement in performance by taking advantage of Java 7’s invoke dynamic. However, it is not enabled by default (this will be covered in a later chapter; basically you just have to “turn it on”). org/latest/html/documentation/core-metaprogramming. html#_extension_modules 13 CHAPTER 2 ■ GROOVY 101 The main point to notice here is implicit closure coercion, which allows you to use closures anywhere a SAM (single abstract method interface) could be used.
Properties files, ConfigSlurper allows for a dot notation. It also allows for nested (closure) configuration values and arbitrary object types. name" == 'Test42' Expando The Expando class can be used to create a dynamically expandable object. You can add fields and methods. This can be useful when you want to use extremely dynamic meta-programming. say('hello') // Draco says: hello 21 CHAPTER 4 ■ GDK ■ Exercise Use meta-programming to alter some class’s metaClass and then print out the class of the metaClass.
0 and above. © Adam L. Davis 2016 A. L. 1007/978-1-4842-2117-4_3 15 CHAPTER 3 ■ TOOLS Invoke-dynamic helps the compiler improve the performance of things like ducktyping, meta-programming, and method-missing calls. Shell 1 groovysh The Groovy shell can be used to execute Groovy code in an interactive command shell. ■ Exercise Try it out! Documentation 1 groovydoc This tool generates documentation from your Groovy code. Groovy uses the same comment syntax as Java, including the conventions for documenting code.
Learning Groovy by Adam L. Davis