Your May/June 2018 digital edition of Java Magazine is
now available.
Best
practices in programming are codified in a wide range of patterns. In this
issue, we look at some of those patterns to help make sure that established
knowledge and techniques find their way into code.
We
start off with a deep dive into one of the traditional design patterns, Command,
and see it applied in multiple contexts: contacting remote systems and
executing code there, and building an interactive editor.

The
final design-pattern article addresses mapping concepts of domain-driven design
(DDD)
to Java EE. DDD contains its own set of patterns that attempt to map
domain knowledge to an implementable system. It lifts software architecture
directly into the problem domain, enabling experts there to participate more
effectively. How those concepts are mapped to Java EE can be tricky to know at
times. This article helps illustrate that mapping.
Java
10’s new var keyword is a bit of a puzzle to some readers, and our detailed
treatment of how and when to use it illustrates making best use of
this handy feature, which we expect will be widely adopted over the next few
years.
And
if you’re a glutton for deep understanding of the JVM’s inner workings, don’t
miss our article on how the compiler and JVM identify redundant locks and remove
them from code. This feature might seem rather obscure, but it accounts for
the difference in performance between StringBuilder and StringBuffer and also
explains why arrays of more than 64 elements have a different performance
profile than smaller arrays.
In
addition, you’ll find our usual in-depth quiz,
as well as my book
review of a volume that’s useful when doing code reviews and answering a
colleague’s questions about why a given Java routine needs to be rewritten.
Andrew
Binstock
Editor in Chief, Java Magazine
@platypusguy
Editor in Chief, Java Magazine
@platypusguy