Preface

This book not only provides you with the opportunity to discover all the basics of Play! Framework 2, but also gives you an insight into its advanced features. This new version of Play! Framework has inherited a lot of features from the previous versions, but it has also learned from them. Thus, it comes with fresh thoughts, a clear vision, and amazing new APIs.

The book will focus on what kind of applications can be built using Play! Framework 2, and what kind of technologies can be used easily with it. In order to demonstrate how it can be easy and fast, we'll build a full application from scratch, integrating as many functionalities as will be needed by any modern web application.

Given that Play! Framework 2 can be used with both Java and Scala, you'll be introduced to the Scala programming language. However, most of the examples are in Java.

What this book covers

Chapter 1, Getting Started with Play! Framework 2, introduces readers to Play! Framework 2 and helps them discover how easy it is to bootstrap your development environment and take a fast track to creating your first application.

Chapter 2, Scala – Taking the First Step, covers just enough of Scala so as to enable you to create advanced Scala templates.

Chapter 3, Templating Easily with Scala, keeps you in touch with the Scala programming language while creating server-side templates. We'll see how to produce views for content and how to combine them. From this chapter, we will start making the application that we will build along with the book.

Chapter 4, Handling Data on the Server Side, explains how to create data on the server side, how to add constraints to them, and then how to generate views on them, while keeping in mind that a web application, especially a CRUD one, mainly deals with data on both server and client sides. By the end of this chapter, you'll be able to create a flow between the browser and the database.

Chapter 5, Dealing with Content, covers how easy it will be to manage different representations of data. We'll introduce how streams are handled by Play! Framework 2, using body parsers. We'll also take the opportunity to use JSON to share our data between the client and the server sides. Also, we'll see how to create an Atom feed of the same data.

Chapter 6, Moving to Real-time Web Applications, demonstrates how to achieve more powerful features (required by any modern web applications) to deal with data in a real-time fashion, using the APIs provided with Play! Framework 2. You'll build an end-to-end workflow using CoffeeScript in the browser to consume events produced on a WebSocket by the server.

Chapter 7, Web Services – At Your Disposal, covers the WS API that Play! Framework 2 includes. This API will leave us consuming or producing content to a different application, using whatever representation of the data we're used to. To illustrate such a use case, we'll connect to Twitter's end points to consume tweets and show them in our application.

Chapter 8, Smashing All Test Layers, gives an overview of all test layers that can be covered using the test features provided by Play! Framework 2. Being a full-stack framework, Play! Framework 2 not only includes binding with testing frameworks, but also mockups for the whole server. By the end of this chapter, you'll be able to test the server-side code and also the user interface using Selenium. The chapter is also the only one that is Scala- and not Java-oriented.

Chapter 9, Code Once, Deploy Everywhere, explains how a Play! Framework application can be used in a continuous integration tool, and how to put it in production by following the continuous-deployment philosophy. You'll also be introduced to the Typesafe console that can help us monitor applications at runtime.

Appendix A, Introducing Play! Framework 2, gives you a deeper insight into the underlying concepts on which Play! Framework is built. We'll see why it is so awesome and what its differences are with the first version. It's also a good place to start, where an overview of the features of Play! Framework 2 can be grasped at once.

Appendix B, Moving Forward, keeps you moving forward with all the very advanced features of Play! Framework 2 that we had to leave aside for a while. You'll also see that the Play! community is expanding very fast and that a lot of helpful plugins are already available.

Appendix C, Materials, gives information about the publicly available sources on GitHub.

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

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