Chapter 3. A basic CRUD application

 

This chapter covers

  • An introduction to all major Play concepts
  • Creating a small application

In the previous chapter, we introduced our example application: the paper clip warehouse management system. Now that we know what we’re going to build, and have our IDE all set up, it’s time to start coding.

In this chapter, we’ll start implementing our proof-of-concept (POC) application. It will be a simple CRUD[1] application, with data stored in-memory rather than in a database. We’ll evolve our POC application in later chapters, but this simple application will be our starting point.

1 Create, Retrieve, Update, Delete

We’ll start by setting up a controller with some methods and linking some URLs to them.

3.1. Adding a controller and actions

 
 
 

3.2. Mapping URLs to action methods using routes

 
 
 
 

3.3. Adding a model and implementing functionality

 
 
 

3.4. Mocking some data

 
 

3.5. Implementing the list method

 
 
 

3.6. Adding the product form

 
 

3.7. Handling the form submission

 
 
 
 

3.8. Adding a delete button

 
 
 
 

3.9. Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage