The Well-Grounded Java Developer: Vital techniques of Java 7 and polyglot programming
Benjamin J Evans
Language: English
Pages: 496
ISBN: 1617290068
Format: PDF / Kindle (mobi) / ePub
Summary
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.
About the Book
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.
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 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
Table of Contents
- Introducing Java 7
- New I/O
- Dependency Injection
- Modern concurrency
- Class files and bytecode
- Understanding performance tuning
- Alternative JVM languages
- Groovy: Java's dynamic friend
- Scala: powerful and concise
- Clojure: safer programming
- Test-driven development
- Build and continuous integration
- Rapid web development
- Staying well-grounded
PART 1 DEVELOPING WITH JAVA 7
PART 2 VITAL TECHNIQUES
PART 3 POLYGLOT PROGRAMMING ON THE JVM
PART 4 CRAFTING THE POLYGLOT PROJECT
Linux in a Nutshell (6th Edition)
Android Programming: The Big Nerd Ranch Guide (2nd Edition)
Hackers Beware: The Ultimate Guide to Network Security
Point, the framework is up and running in the JVM, but the user classes specified in config.xml haven’t yet been touched. In fact, until DIMain examines the config file, the framework has no way of knowing what the classes to be loaded are. To bring up the application configuration specified in config.xml, a second phase of classloading is required. This uses a custom classloader. First, the config.xml file is checked for consistency and to make sure it’s error-free. Then, if all is well, the.
Method. The problem with Callable is that it can only model methods that take no arguments. In order to cope with a realistic set of different combinations of parameters and call possibilities, we’d need to make other interfaces, with specific combinations of parameters. This is done in a lot of Java 6 code but very quickly leads to a huge proliferation of interfaces, which can cause problems for the developer (such as running out of PermGen memory to store classes in—see chapter 6). By contrast,.
The stack. Has type-specific and wide variants. store (i1) [val] → [] Stores a value (primitive or reference) in a local variable, removing it from the stack in the process. Has shortcut forms and typespecific variants. [val] → [val, val] Duplicates the value on top of the stack. Has variant forms. dup getfield i1, i2 [obj] → [val] Gets the field at the constant pool index specified from the object on top of the stack. putfield i1, i2 [obj, val] → [] Puts the value into the object’s.
Count over time What went wrong? Why we have to care 161 Transistor counts aren’t the same thing as clock speed, and even the still-common idea that a higher clock speed means better performance is a gross oversimplification. NOTE Moore’s Law has been a good guide to the past, and it should remain accurate for a while longer (estimates vary, but until at least 2015 seems reasonable). But Moore’s Law is formulated in terms of transistor counts, and these are increasingly not a good guide to.
A clock. But this counter is per-CPU and can potentially be affected by power saving and other factors at runtime. This means that different CPUs can drift away from each other and from wall-clock time. Finally, there are High Precision Event Timers (HPETs). These started appearing in more recent years in order to stop people tearing their hair out trying to get better timing from the older clock hardware. HPET uses at least a 10 MHz timer, so it should be accurate to at least 1 μs—but it’s not.