-
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-2021-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-2021-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 representations for the following resources should be augmented with HTML forms:
/users
/routes
/sports
/sports/{sid}/activities
Each one of these forms must, when submitted, send a POST request to the associated resource. For instance:
- The representation returned on a
GET /users
request should contain a form with the fieldsname
andemail
. - This form, when submitted, must send a
POST
request to/users
containing these two fields in the body. - If the
POST
request is successful, i.e. a new user was created, its response should be a303 See Other
with the Location header pointing to the created resource (e.g./users/{uid}
).
For this last phase, the project should stop relying on locally stored vendor JARs and use the Gradle supported dependency management system.
The technical report should be updated and/or extended with the relevant technical information. The sections developed in the previous phases can be improved or changed. There should not be a separate report for each phase.
The completed project must be delivery until July 4 (end of week 15), via the creation of a 1.0.0
tag on the GitHub repository.