Play! 2 for Java aims to allow developers to build modern web applications that allow them to take full advantage of commodity cloud infrastructure to produce highly scalable, fault tolerant applications. This course will act as a high level introduction to the various features of Play! that will allow you to take full advantage of this modern web framework.
Introduction Hello and welcome to the ‘Play! 2 for Java' course. This module will introduce you to both the course plan and the Play! Framework itself. We'll start by going over what you can expect from this course. The module outline and a quick introduction of what we are going to build along the way to demonstrate the various topics. Then we'll begin focusing on the Play! Framework itself. We'll explain the history behind Play! and how it has evolved. We'll look at the overall philosophy, its roots and non-blocking, stateless, asynchronous, highly scalable principles. And we'll look at the overall architecture and structure of the technology.
Starting Up Hello, and welcome to the ‘Play! 2 for Java' course. In this module, we will look at getting started with Play! 2. We'll begin by using the Play! 2 website to download the latest version of Play! . We'll add the Play! binaries to our system path so that we can run the Play! command from anywhere. Next, we'll use the Play! Command to generate and run a basic Play! application. From here, we'll look at the other common tasks that we'll use the Play! Command for. We'll explore the structure of the generated project to get a high-level view of how Play! applications fit together. Finally, we'll look at how the Play! Command allows us to generate the necessary project files for opening our application in IDEs, such as Eclipse and IntelliJ's IDEA.
Routing Hello, and welcome to the ‘Play! 2 for Java' course. In this module, we will look at how Play! deals with request routing. We'll start by looking at the role of the router and why it is important. We'll see how the basic mechanics of a router work. We'll then look into the DSL, or Domain Specific Language, provided by Play! for defining routes. We'll cover a few of the DSL aspects, such as the basic syntax of a route definition, defining dynamic URI parts via tokens, clobbing, and regular expressions, specifying types and defaults for dynamic parts and route priority. Finally, we'll look briefly at Reverse Routing and how Play! provides type safe routing via the DSL.
Controllers, Actions and Results Hello, and welcome to the ‘Play! 2 for Java' course. In this module we will look at Play! 's Actions, Controllers, and Results. We'll begin by looking into Controllers in Play! and what features they offer us. This will lead us nicely into Actions; Play! 's primary concept for handling incoming requests. We'll then look into Results, an abstraction that Play! uses to describe responses, going back to the calling client. From here, we'll look into Session and Flash Scope as a means for sharing information across multiple request responses. Finally, we'll look at the basic structure of the request and response objects available to Actions. Once we've covered these core topics, we'll take this knowledge and use it to implement the basic structure and flow of the sample application.
Views Hello, welcome to the ‘Play! 2 for Java' course. In this module, we are going to look at Views in Play! . We'll look at how a Play! view is constructed, like to pass arguments from a Controller Action to the view. We'll look at how we achieve iteration & conditional logic in views. And we'll look at reuse in the views via partials & layouts. Finally, we'll look at how we access session & flash objects in your views.
Data Access Hello, and welcome to the ‘Play! 2 for Java' course. In this module, we're going to look at working with data in Play! from both a data persistence and user interface angle. We'll start by looking at data persistence in Play! . This includes an overview of how Play! approaches data access. A primer and basic data access using Ebean and the ORM that can be used alongside Play! . And a look at database migrations supporting Play! . Then, we'll move onto looking at how you can interact with the data layer. We'll see how you can use form objects to convert our command models to and from HTTP Requests, as well as providing validation. Also along the way, we'll see how we can use Play! 's view helpers to quickly build forms that include help text and validation messages.
The Global Object Hello, and welcome to the ‘Play! 2 for Java' course. In our final module, we are going to look at the Global Object, a hook for controlling global events in our application. We'll start by going over the high-level features of the Global Object. We'll look at the options for wiring functionality into key stages of the application lifecycle. Then, we'll move down a level and see how various events in the Request/Response lifecycle can be handled, such as intercepting requests, handling not found responses, and handling issues with malformed routes. Then we'll look at a few of the other common handlers available. After this, we'll look at a few more complete examples of important and commonly used features of the Global Object.