Skip to content

phase 4

fbfreitas edited this page May 25, 2020 · 3 revisions

Phase 4

Introduction

This document describes the requirements for the fourth and final phase of the Software Laboratory project.

Requirements

Using PostgreSQL

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.

Hosting on Heroku

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.
  • 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.
  • Create the Procfile file with web: 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.

Resource creation via the HTTP interface

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:

  • /rooms - form to add a new room.
  • /rooms/{rid} - form to associate a label to the room with rid.
  • /rooms/{rid}/bookings - form to add a new booking.
  • /labels - form to add a new label.

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 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 containing these fields in the body.
  • If the POST request is successful, i.e. a new room was created, its response should be a 303 See Other with the Location header pointing to the created project (e.g. /rooms/1).

Dependency management

For this last phase, the project should stop relying on locally stored vendor JARs and use the Gradle supported dependency management system.

Delivery

The completed project must be delivery until June 13 (end of week 15), via the creation of a 1.0.0 tag on the GitHub repository. Improvements will be accepted until June 20, via the creation of 1.*.0 tags (functionality additions) or 1.0.* tags (error fixes). The final project evaluations will start on June 15.

Clone this wiki locally