Groovy in Action (häftad)
Häftad (Paperback)
Antal sidor
illustrated ed
Glover, Andrew / King, Paul / Laforge, Guillaume / Skeet, Jon
234 x 186 x 32 mm
1140 g
Antal komponenter
Groovy in Action (häftad)

Groovy in Action

Häftad, Engelska, 2007-04-01


Because Groovy is so new, most readers will be learning it from scratch.

Groovy In Action quickly moves through the basics of Groovy. After getting readers up

and running, Groovy in Action presents rich and detailed examples illustrating

Groovys enhancements to Java along with Groovys special support for XML,

regular expressions and database programming. Readers get their hands dirty

exploring tips and tricks for Groovy programming along with core tasks such as

unit testing and build support. Readers will even learn to script Windows via

Groovy. An additional bonus track is dedicated to Grails, the Groovy Web

Application Framework.

Groovy in Action introduces Groovy by example, presenting lots of reusable code

while explaining the underlying concepts. Java developers new to Groovy find a

smooth transition into the dynamic programming world. Groovy experts gain a

solid reference that challenges them to explore Groovy deeply and creatively.
Visa hela texten


Har du läst boken? Sätt ditt betyg »

Bloggat om Groovy in Action

Övrig information

Dierk Koenig is a senior software developer, mentor and coach at Canoo Engineering AG, Basel, Switzerland. He writes for leading magazines on software development and speaks at international conferences. He joined the Groovy project as a committer in 2004. Andrew Glover is the President of Stelligent Incorporated. He actively blogs about software quality at and Dr Paul King is Managing Director and Principal Consultant for ASERT, has provided technical and strategic consulting to hundreds of organizations throughout the U.S. and Asia Pacific. Guillaume Laforge is the official Groovy Project Manager and member of the JSR-241 Expert Group standardizing the Groovy Scripting Language. Guillaume is a software architect and Open Source consultant, working for OCTO Technology. Jon Skeet is a software engineer and Groovy enthusiast who specializes in Java and C# development.


foreword xix
preface xx
acknowledgments xxiii
about this book xxv
about the authors xxix
about the title xxxii
about the cover illustration xxxiii

1 Your way to Groovy 1
1.1 The Groovy story 3

What is Groovy? 4

Playing nicely with Java: seamless integration 4

Power in your code: a feature-rich language 6

Community-driven but corporate-backed 9

1.2 What Groovy can do for you 10

Groovy for Java professionals 10

Groovy for script programmers 11

Groovy for pragmatic programmers, extremos, and agilists 12

1.3 Running Groovy 13

Using groovysh for Hello World 14

Using groovyConsole 17

Using groovy 18

1.4 Compiling and running Groovy 19

Compiling Groovy with groovyc 19

Running a compiled Groovy script with Java 20

Compiling and running with Ant 21

1.5 Groovy IDE and editor support 22

IntelliJ IDEA plug-in 23

Eclipse plug-in 24

Groovy support in other editors 24

1.6 Summary 25

Part 1 The Groovy language 27

2 Overture: The Groovy basics 29
2.1 General code appearance 30

Commenting Groovy code 30

Comparing Groovy and Java syntax 31

Beauty through brevity 32

2.2 Probing the language with assertions 33
2.3 Groovy at a glance 36

Declaring classes 36

Using scripts 37

GroovyBeans 38

Handling text 39

Numbers are objects 40

Using lists, maps, and ranges 41

Code as objects: closures 43

Groovy control structures 46

2.4 Groovys place in the Java environment 47

My class is your class 47

GDK: the Groovy library 49

The Groovy lifecycle 50

2.5 Summary 53
3 The simple Groovy datatypes 55
3.1 Objects, objects everywhere 56

Javas type systemprimitives and references 56

Groovys answereverythings an object 57

Interoperating with Javaautomatic boxing and unboxing 59

No intermediate unboxing 60

3.2 The concept of optional typing 61

Assigning types 61

Static versus dynamic typing 62

3.3 Overriding operators 63

Overview of overridable operators 63

Overridden operators in action 65

Making coercion work for you 67

3.4 Working with strings 69