-
Notifications
You must be signed in to change notification settings - Fork 0
phase 4
This document describes the requirements for the fourth and final phase of the Software Laboratory project.
Use the PostgreSQL Relational Database Management System, instead of SQL Server.
- Install PostgreSQL on the development machines. Alternatively, use a docker image (see
build.gradle
). - Obtain and use a JDBC driver for PostgreSQL.
- Change both the DDL and DML statements to use the PostgreSQL dialect.
- Use the
JDBC_DATABASE_URL
environment variable to configure the PostgreSQL connection settings.
Host the application on the Heroku.
- Create an Heroku free account. Heroku is an example of a Platform-as-a-Service (PaaS) provider.
- Install the Heroku CLI (Command Line Interface) on all the development machines.
- On the Heroku web site, create a new application
- The name should follow the following structure:
isel-ls-1920-2-g<número-do-grupo>
. - Select the "Europe" region.
- The name should follow the following structure:
- On the application home page, provision the "Heroku Postgres" add-on using the "Hobby Dev - Free" plan.
- The
JDBC_DATABASE_URL
environment variable will be automatically added to Java the execution environment.
- The
- Create the
Procfile
file withweb:
followed up by the necessary to start the application. - On the command line, do
heroku login
. - On the command line, inside the project root folder, do
heroku git:remote -a isel-ls-1920-2-gXX
. This will create a Git remote pointing to the Heroku repository.
The main goal for this requirement is to add support for the commands with POST
method in the HTTP interface.
For that, the following changes should be made.
-
Resource
/rooms/create
, allowing the following methods:-
GET
method - returns a representation with a creation HTML form. -
POST
method - creates a new room. When successful, redirects to the room detail. If an error occurs, returns creation HTML form with error information.
-
-
Resources
/rooms/{rid}/bookings/create
, allowing the following methods:-
GET
method - returns a representation with a creation HTML form. -
POST
method - creates a new booking. When successful, redirects to the booking detail. If an error occurs, returns creation HTML form with error information.
-
-
Resource
/users/create
, with a similar behaviour. -
Resource
/labels/create
, with a similar behavior.
Each one of these forms must, when submitted, send a POST request to the associated resource path. For instance:
- The representation returned on a
GET /rooms/create
request should contain a form with all the fields required to create a room. - This form, when submitted, must send a
POST
request to/rooms/create
containing these fields in the body. - If the
POST
request is successful, i.e. a new room was created, its response should be a303 See Other
with theLocation
header pointing to the created room (e.g./rooms/1
). Otherwise, it should be a form with added error information.
For this last phase, the project should stop relying on locally stored vendor JARs and use the Gradle supported dependency management system.
The completed project must be delivery until June 20 (end of week 16), via the creation of a 1.0.0
tag on the GitHub repository.
The final project evaluations will start on June 22.