Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Benjamin J Evans, Martijn Verburg

Rating No ratings yet

SummaryThe 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. About the BookThe 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.Written for readers familiar with Java. No experience with Java 7 or new JVM languages required. Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book. What's InsideNew 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 CITable of ContentsPART 1 DEVELOPING WITH JAVA 7 Introducing Java 7 New I/O PART 2 VITAL TECHNIQUES Dependency Injection Modern concurrency Class files and bytecode Understanding performance tuning PART 3 POLYGLOT PROGRAMMING ON THE JVM Alternative JVM languages Groovy: Java's dynamic friend Scala: powerful and concise Clojure: safer programming PART 4 CRAFTING THE POLYGLOT PROJECT Test-driven development Build and continuous integration Rapid web development Staying well-grounded

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
# The Well-Grounded Java Developer: Vital Techniques of Java 7 and Polyglot Programming ## 【One-Line Pitch】 A practical bridge from Java 7 fundamentals to the broader JVM ecosystem, teaching you modern syntax, concurrency patterns, and alternative languages (Groovy, Scala, Clojure) so you can build polyglot, production-ready applications. Ideal for experienced Java developers who want to modernize their toolkit and understand the JVM as a multi-language platform. ## 【Book Arc】 - **Opening (~0%–9%)**: Introduces Java 7's Project Coin features—try-with-resources, multi-catch, underscores in numeric literals, and the language-versus-platform distinction—giving you the syntactic foundation for everything that follows. - **Early (~9%–25%)**: Dives into NIO.2, the new I/O API, covering Path manipulation, file attributes, symbolic links, and asynchronous file channels—essential for modern file handling and scalable I/O. - **Early (~25%–34%)**: Explains Dependency Injection (DI) theory, JSR-330 standardization, and Guice 3 as the reference implementation, showing how to decouple code for testability and maintainability. - **Middle (~34%–47%)**: Tackles modern concurrency—design forces, synchronized classes, deadlock avoidance with tryLock, BlockingQueue patterns, and the fork/join framework—preparing you for multicore processors. - **Late (~47%–75%)**: Explores class files, bytecode, and performance tuning, then transitions to polyglot programming with tutorials on Groovy, Scala, and Clojure, each highlighting different paradigms (dynamic, functional, and safe-by-default). - **Ending (~75%–100%)**: Covers the craft of building a polyglot project—test-driven development, build tools, continuous integration, and rapid web development—tying all techniques into a cohesive workflow. ## 【Key Takeaways】 - **Java 7's Project Coin features are small but transformative** (Early): Try-with-resources eliminates resource-leak bugs, multi-catch simplifies exception handling, and underscores in numbers improve readability—all with minimal learning curve. These are the first steps toward writing cleaner, safer Java. - **NIO.2 is a complete file-handling overhaul** (Early): The Path API, file attribute access, and asynchronous channels replace the clunky java.io.File class, enabling scalable I/O operations that don't block threads—critical for modern, high-concurrency applications. - **Dependency Injection is about design, not frameworks** (Early): Understanding Inversion of Control principles and JSR-330's standardized annotations (@Inject) lets you swap between Guice, Spring, or other containers without rewriting your code—loose coupling is the real win. - **Java's original concurrency model has serious limitations** (Middle): The thread-and-lock approach is low-level and error-prone; java.util.concurrent provides higher-level abstractions, but you must understand design forces like safety, liveness, and performance to make good trade-offs. - **Deadlock is avoidable with careful lock acquisition** (Middle): Using tryLock with timeouts and releasing held locks on failure prevents the classic deadlock scenario—a practical pattern you can apply immediately to any multi-threaded system. - **Fork/join is the framework for multicore processors** (Middle): ForkJoinPool handles lightweight tasks that split recursively, automatically scheduling them across cores—a natural fit for divide-and-conquer algorithms and a glimpse into Java's parallel future. - **The JVM is a polyglot platform** (Late): Groovy offers dynamic flexibility, Scala combines object-oriented and functional styles with conciseness, and Clojure emphasizes safe, immutable data—each language brings different strengths to the same runtime. - **A polyglot project needs disciplined engineering practices** (Ending): Test-driven development, automated builds, and continuous integration are non-negotiable when mixing languages—the book's final section shows how to keep a multi-language codebase healthy. ## 【Reading Tips】 - **Skim the Project Coin chapter** if you're already familiar with Java 7 syntax; focus instead on the NIO.2 and concurrency chapters, which contain the most reusable patterns and practical code listings. - **Deep-read the concurrency chapter** (around 34%–47%): The design forces discussion and deadlock-fixing examples are the book's intellectual core—work through the listings carefully rather than just reading the prose. - **Treat the language tutorials as introductions, not references**: For Groovy, Scala, or Clojure, skim to understand each language's philosophy and key syntax, then consult dedicated resources if you plan to adopt one seriously. - **Pay attention to the "why" behind each technique**: The authors consistently explain the reasoning (e.g., why underscores instead of commas, why DI matters) rather than just showing code—this context helps you apply the ideas to your own projects. - **Skip the performance tuning chapter if you're not doing JVM optimization work**; it's valuable but niche, and the book's core value lies in the language features, concurrency patterns, and polyglot perspective. ## 【Coverage Limits】 This guide covers the book's first half in depth (Java 7 features, NIO.2, DI, concurrency) and summarizes the later sections on bytecode, performance, and polyglot languages based on the table of contents and early excerpts. Detailed content on Groovy, Scala, Clojure, TDD, build tools, and web development is not fully represented in the source material. ##
Page 9
d xvii preface xix acknowledgments xxi about this book xxiv about the authors xxix about the cover illustration xxx PART 1 DEVELOPING WITH JAVA 7...............
View in text
Excerpt 2
can be done to a file by whom. The classic what permissions include whether you can do one or more of reading from, writing to, or executing a file. The clas...
View in text
Excerpt 3
this isn’t as easy as it sounds. As soon as your code uti- lizes a feature that’s only supported by a particular DI framework, you are locked in to that fram...
View in text
Excerpt 4
hat this level of indirection provides a place to add addi- tional metadata without compromising the conceptual integrity of the contained type (MyAwesomeCla...
View in text
Excerpt 5
dealing with a codebase that contains a lot of reflection, you’re probably all too familiar with some of the pain that comes from reflective code. In this su...
View in text
Excerpt 6
e to consume a large percentage of the transistor budget of the CPU, and the impact they had on real performance was subject to diminishing returns. This tre...
View in text
Excerpt 7
a whole. The code is less concise and seems more fragile. As your applications get larger, this difference in conciseness will become more important—you want...
View in text
Excerpt 8
r, Groovy code that’s not inside the usual class and method constructs is considered to be a Groovy script. You saw an example of this in section 8.1.1. In s...
View in text
Tags
AI categories
Programming LanguageJavaBackend
ISBN: 1617290068
Publish Year: 2012
Language: English
Pages: 496
File Format: PDF
File Size: 14.2 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…