The Well-Grounded Java Developer
Vital techniques of Java 7 and polyglot programming
Benjamin J. Evans and Martijn Verburg
Foreword by Dr. Heinz Kabutz
  • July 2012
  • ISBN 9781617290060
  • 496 pages
  • printed in black & white

How to become a well-grounded Java developer—and how to stay that way.

From the Foreword by Dr. Heinz Kabutz, The Java Specialists' Newsletter

The Well-Grounded Java Developer starts with thorough coverage of Java 7 features like try-with-resources and NIO.2. You'll then explore a cross-section of emerging JVM-based languages, including Groovy, Scala, and Clojure. You will find clear examples that are practical and that help you dig into dozens of valuable development techniques showcasing modern approaches to the dev process, concurrency, performance, and much more.

Table of Contents detailed table of contents




about this book

about the authors

about the cover illustration

Part 1 Developing with Java 7

1. Introducing Java 7

1.1. The language and the platform

1.2. Small is beautiful—Project Coin

1.3. The changes in Project Coin

1.4. Summary

2. New I/O

2.1. Java I/O—a history

2.2. Path—a foundation of file-based I/O

2.3. Dealing with directories and directory trees

2.4. Filesystem I/O with NIO.2

2.5. Asynchronous I/O operations

2.6. Tidying up Socket-Channel functionality

2.7. Summary

Part 2 Vital techniques

3. Dependency Injection

3.1. Inject some knowledge—understanding IoC and DI

3.2. Standardized DI in Java

3.3. Guice 3—the reference implementation for DI in Java

3.4. Summary

4. Modern concurrency

4.1. Concurrency theory—a primer

4.2. Block-structured concurrency (pre-Java 5)

4.3. Building blocks for modern concurrent applications

4.4. Controlling execution

4.5. The fork/join framework

4.6. The Java Memory Model (JMM)

4.7. Summary

5. Class files and bytecode

5.1. Classloading and class objects

5.2. Using method handles

5.3. Examining class files

5.4. Bytecode

5.5. Invokedynamic

5.6. Summary

6. Understanding performance tuning

6.1. Performance terminology—some basic definitions

6.2. A pragmatic approach to performance analysis

6.3. What went wrong? Why we have to care

6.4. A question of time—from the hardware up

6.5. Garbage collection

6.6. JIT compilation with HotSpot

6.7. Summary

Part 3 Polyglot programming on the JVM

7. Alternative JVM languages

7.1. Java too clumsy? Them’s fighting words!

7.2. Language zoology

7.3. Polyglot programming on the JVM

7.4. How to choose a non-Java language for your project

7.5. How the JVM supports alternative languages

7.6. Summary

8. Groovy: Java’s dynamic friend

8.1. Getting started with Groovy

8.2. Groovy 101—syntax and semantics

8.3. Differences from Java—traps for new players

8.4. Groovy features not (yet) in Java

8.5. Interoperating between Groovy and Java

8.6. Summary

9. Scala: powerful and concise

9.1. A quick tour of Scala

9.2. Is Scala right for my project?

9.3. Making code beautiful again with Scala

9.4. Scala’s object model—similar but different

9.5. Data structures and collections

9.6. Introduction to actors

9.7. Summary

10. Clojure: safer programming

10.1. Introducing Clojure

10.2. Looking for Clojure—syntax and semantics

10.3. Working with functions and loops in Clojure

10.4. Introducing Clojure sequences

10.5. Interoperating between Clojure and Java

10.6. Concurrent Clojure

10.7. Summary

Part 4 Crafting the polyglot project

11. Test-driven development

11.1. TDD in a nutshell

11.2. Test doubles

11.3. Introducing ScalaTest

11.4. Summary

12. Build and continuous integration

12.1. Getting started with Maven 3

12.2. Maven 3—a quick-start project

12.3. Maven 3—the Java7developer build

12.4. Jenkins—serving your CI needs

12.5. Code metrics with Maven and Jenkins

12.6. Leiningen

12.7. Summary

13. Rapid web development

13.1. The problem with Java-based web frameworks

13.2. Criteria in selecting a web framework

13.3. Getting started with Grails

13.4. Grails quick-start project

13.5. Further Grails exploration

13.6. Getting started with Compojure

13.7. A sample Compojure project—"Am I an Otter or Not?"

13.8. Summary

14. Staying well-grounded

14.1. What to expect in Java 8

14.2. Polyglot programming

14.4. New directions in the JVM

14.5. Summary


Appendix A: Java7developer—source code installation

Appendix B: Glob pattern syntax and examples

Appendix C: Installing alternative JVM languages

Appendix D: Downloading and installing Jenkins

Appendix E: Java7developer—the Maven POM


About the book

The Well-Grounded Java Developer offers a fresh and practical look at new Java 7 features, new JVM languages, and the array of supporting technologies you need for the next generation of Java-based software.

What's inside

  • New Java 7 features
  • Tutorials on Groovy, Scala, and Clojure
  • Discovering multicore processing and concurrency
  • Functional programming with new JVM languages
  • Modern approaches to testing, build, and CI

About the reader

Written for readers familiar with Java. No experience with Java 7 or new JVM languages required.

About the authors

Ben Evans is a Tech Fellow of jClarity, a Java performance firm and a member of the Java Community Process Executive Committee. Martijn Verburg is the CEO of jClarity, a Java performance firm, co-leader of the London JUG, and a popular conference speaker.

combo $49.99 pBook + eBook + liveBook
eBook $39.99 pdf + ePub + kindle + liveBook

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks