Book Review: Reactive Web Applications by Manuel Bernhardt

Datetime:2016-08-23 04:40:33          Topic:          Share

I wasn’t sure what to expect from Reactive Web Applications because it’s a newer book on a very broad subject matter. This specific title is very comprehensive explaining the basics of architecting, designing, and scaling a reactive web application from scratch.

The book is great because it balances theory and practice with real examples. Note you will need some knowledge of Java and Scala to fully implement the features.

But if you’re someone that’s willing to dive into a new style of development this is a powerful book to get you started. It covers the fundamentals of reactive programming and asynchronous connections & how you can apply this to your web development workflow.

Book Contents

The whole books breaks down into three primary sections: getting started, core concepts, and advanced topics.

Inside these sections are 11 total chapters each with their own sub-chapters. You’ll start with some info about reactive design with a theoretical slant towards computer science. Then you move into practice with simple API webapps and custom apps using Scala.js .

Here’s a list of the total chapters in order:

  1. Did you say reactive?
  2. Your first reactive web application
  3. Functional programming primer
  4. Quick introduction to Play
  5. Futures
  6. Actors
  7. Dealing with state
  8. Responsive user interfaces
  9. Reactive Streams
  10. Deploying reactive Play applications
  11. Testing reactive web applications

The first three chapters caught my interest the most. They’re full-on introductions to reactive programming and reactive web application development with a larger overview of the process.

You learn how asynchronous applications are created from theoretical examples which later connect into Play and Reactive Streams .

The fourth chapter offers an overview of Play as it relates to reactive development. However this is not a beginner’s guide and you really do need some understanding of Java and Scala.

I struggled a bit with the later chapters because my Scala knowledge is fairly basic. However the examples are a great way to learn the reactive ideology. The author goes into states with Play and covers how you can handle this in a stateless environment.

The concepts of futures and actors really confused me. I think the author does an excellent job explaining how these work, but I wasn’t prepared to take in that information. I had to do some research on the topic which lead me to various sites explaining the differences between the two.

All of these concepts connect into Akka which allows concurrent asynchronous connections with an API.

The middle chapters alternate between practical techniques and theoretical examples. This provides a nice break where you can spend time reading, then dive back into the coding.

The final few chapters cover deployment and testing. I think these were a little light considering how much depth was packed into the first 8 chapters.

But if you pick up this book hoping to learn the fundamentals of reactive web development then you’ll definitely be pleased. You’ll learn a ton of libraries powered by Java/Scala like Play and Akka, moving to Scala.js and AngularJS for the frontend.

Be willing to put in the work and make it through the lessons. You’ll be happy you did and by the end you’ll have a firm grasp of reactive Java development that you can use to build your own custom applications from scratch.

Pros & Cons

The best thing about this book is the broad spectrum of ideas you get to try across the Play framework. You really get to learn how reactive web applications are built using these technologies as tools. But nothing is forced down your throat because you’re learning the underlying philosophies along with live examples.

The author Manuel does a great job explaining each step in his line of thinking. You’ll understand why you’re trying Scala.js+Angular before you even sit down to write code.

I learned a lot about Akka and the role it plays in asynchronous connections. Deployment covered a bit about Akka but also covered Jenkins and Docker. This book really goes all out to focus on a ton of different technologies.

I’ve seen other books do this and for the most part I’ve been sorely disappointed.

But with Reactive Web Applications I think Manuel did an excellent job. Each new framework and tool is introduced before you have to actually write code.

Another good thing is that you really don’t need to be an expert on actors, futures, or functional programming. Yes it definitely helps if you already have this knowledge.

But if you just have some experience with Java and Scala you can learn all of these skills from the book. Every feature is explained clearly and over the course of the book you begin to see the “bigger picture” of the application lifecycle.

I would say that the chapters on futures & actors are a little sparse with detail. The author does a good enough job with his explanations but I did get lost. You might need to spend time researching these concepts on your own to fully understand them.

I also think the later chapter on deployment was a bit confusing. If you’re not familiar with deployment you can leave this alone and come back to it when you have more experience. But it would’ve been nicer to have these chapters hold your hand a little more.

The testing chapter was fantastic and I got a lot out of that. Especially testing the individual components which isn’t something I usually do. The author explained the process well and had me hooked on testing right from the start.

My overall complaint would be that some chapters lack detail while others are packed full of detail. The writing style is the same across the whole book. It’s just that in some chapters I felt surprisingly lost and was expecting a little more hand-holding.

Who’s This Book For?

If you’re a fairly new web developer this book will fly right over your head. This is not for the faint of heart and you really need some confidence in your programming ability.

Knowledge of Java and Scala is a must. You don’t need to be an expert, but the more you know the easier it’ll be to understand these concepts.

It covers both frontend and backend development so you get to peek into both worlds. Most web developers should be comfortable with this even if they prefer to specialize.

If you have no intentions of ever writing Scala or Java code then you’ll definitely want to pass on this book. The whole thing pivots on the Play framework so you’ll really want to know how that works(or at least be willing to learn).

Final Summary

If you’re into Play/Akka or Reactive Streams then you’ll really enjoy this book. It provides enough of a walkthrough for all these technologies to get you moving and building applications quickly.

Reactive Web Applications is the perfect book for someone new to this topic who wants to start with practical examples.

You will need some knowledge of Java and you definitely should be comfortable writing code. But even if you don’t fully understand functional programming you can learn as you go and keep up with the tasks just fine.

Review Rating: 4/5