My travels with Modern Java in Action

Finished reading Modern Java in Action !! Yeeeaaaahhhh for me :clap:

This is a very well written book. It’s obvious the authors have a lot of experience, not only with Java, but also with Design Patterns, JVM, Concurrency, Functional Programming as well as other JVM languages like Scala & Kotlin. Modern Java in Action will be open on my desk for quite a while to come.
Congratulations to the authors !!

There are a lot of topics covered in this book and it is heavy leaning towards Functional Programming.
However, for this entry I’ll just mention a few that come to mind right now.

  • Behaviour Parameterisation
    I’d never heard of this before but in a nutshell it’s the ability to let a method take multiple behaviours through parameters.
    Java 8 introduces lambdas (basically a type of higher order function) and by passing lambdas as parameters you get multiple behaviour.

  • Design Patterns
    There are a couple of sections dedicated to writing some of the classic Design Patterns using lambdas.
    I will be revisiting those sections sometime in the near future.

  • Java Module System (aka. Jigsaw Project)
    Java 9 is a “re-birth” I would say. The designers took the language and the JVM apart and put it back together in modules which means when writing applications in Java 9+ you can pick the modules you need to use from the language instead of being given everything in one JAR.
    Modules can expose APIs and hide implementations. This is definitely a feature I want to explore more. This is another big jump we Java developers will have to get our heads around. It’s all about design and architecture when using modules.

  • Functional Programming
    As I’ve mentioned before, Java 8 is the move towards FP programming and this book is heavily focused on all the features that give this functionality.
    With the Stream API, lambdas, Functional Interfaces and FP theory covering immutability, currying, recursion, pattern matching and the limitations Java currently has around some of these topics.

  • Reactive Programming
    Java 9 introduces the Flow API which is based on the Reactive Streams project. The Flow API is not an implementation but the main reactive libraries have been written against the Flow API. The discussion on reactive programming dives into the world of Threads, Concurrency and Parallelism.
    It’s another topic I will have to go back over again (and again, and again …).

There’s a lot more in this book. And I will try and add to this thread as I learn more.
. . .

2 Likes