Preface

Back in 2009, I discovered Play by chance while surfing the web. I was surprised at how easy it was to get started with the framework. At the time, I was doing most of my web development using the Seam web framework. Play was a game changer then, and I started to build all my applications using it. Soon enough, I joined Guillaume Bort, the founder of Play, and contributed to the framework.

The framework started to gain more and more traction, though mostly in Europe. Time passed, and we released Play 1.1 and then Play 1.2. Then Guillaume started to envision a complete rewrite of Play using Scala as a core language, giving Play extra power. The goal was to empower Play’s users while keeping the main success ingredients: Play’s simplicity and rapidity. Guillaume soon joined forces with Sadek Drobi. Sadek put his functional programming knowledge into the mix and Play 2 was born! Though the Play 2 core uses advanced Scala features, Play 2 focuses on simplicity and has a fully supported Java API. Play 2 Java is probably the best option for building scalable web applications with simplicity in mind without sacrificing scalability and other features.

While I contributed little to Play 2’s features codewise, my main contribution to Play 2 adoption is this book. I hope it will become an invaluable aid to professional Play developers. In truth, my coauthor Sietse and I could have added even more information to this book, but we hope that we’ve struck a good balance between useful content and weight. We also hope that you will enjoy the book and that it will help you unleash the full potential of Play while keeping its simplicity in mind.

NICOLAS LEROUX

Soon after Nicolas introduced Play at Lunatech, it became clear that this was going to be the framework we’d be using for all new projects. Play “gets it.” For “it,” in this case, a lot of things can be substituted. Play “gets” HTTP and the web in general, how developing web application works, what makes a nice and clean API, and more. This was clear from the early Play 1 beta versions, and that’s why we’ve used it on many projects since 1.0 came out. It didn’t disappoint.

Now, with Play 2, Play continues to improve web development for the Java platform.

It’s interesting that we have to say “Java platform,” rather than just Java. The Java platform is no longer synonymous with the Java language—there are a lot of different languages targeting the JVM, all trying to improve the developer experience in their own way. Play 2 embraces Scala, partly for its benefits as a reactive[1] language, but also for all the benefits that a strictly type-safe language provides. By supplying a first-class Java API to the framework, Play 2 provides the best of both worlds.

1 Read the Reactive Manifesto at http://www.reactivemanifesto.org/ if you want to know what that means, exactly.

We wrote this book in the hope that it will help you take advantage of all the benefits that web development using Play offers. But, perhaps more importantly, we also wanted to teach you all the core concepts behind Play. They’re just good principles when developing for the web, and Play makes it easy to apply them. We hope we succeeded in these goals, and that you’ll enjoy this book and developing Play applications.

SIETSE DE KAPER

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset