Khokeletso Khokeletso
3 min readSep 26, 2022
WeThinkCode_ Project Report

Table of Contents

  1. Introduction……………………………………………………………..
  2. Server Side(HTTP API)..………………………………………………
  3. Server Side(Relational Database Design and SQL)……………..
  4. Server Side(Persistence)……………………………………………..
  5. Front-End/Client Side(HTML/CSS)………………………………..
  6. Conclusion………………………………………………………………

Introduction

The brownfields of Web Development which had a codebase of the server side where we used HTTP API’s, Relational database design and SQL, Object Persistence and HTML and CSS we did the following:

Server side(HTTP API):

  • implemented the handler to retrieve a single task by id from the tasks database.
  • configure the server to handle a GET request to the endpoint /task/{id}.
  • Modifying the GET /task/{id} handler to return an HTTP Not Found response if the task was not found in the database.
  • Creating a new API endpoint to add a new task to the database. Where The new endpoint uses the HTTP PUT/POST method.
  • Creating the API handler to return an HTTP Created response code and set the Location header in the response to /task/{id} where {id} is the id of the newly added task.
  • Modifying the POST /task handler to return an HTTP Bad request response if the task is already existing in the database.

Server side( Relational Database Design and SQL)

  • Creating a table for storing book genres where by the table is named Genres. The Table having the following columns:

— > Code — for Identifying the genre

— > Description — for storing the description matching the code

  • Created SQL file to Insert staff in the table.
  • Created SQL file to find specific thing in the table.

Server side(Persistence)

  • Creating a method that to ensure that only SQL Create commands are accepted.
  • Figure out what the method takes as parameters and returns to ensure that it behaves correctly.
  • Create method to execute a SQL create statement command.
  • Implement method’s parameters and return types are, to ensure that code meets the descriptions.
  • Inserting data to iterate over the genres collection and persist each Genre object as a row into the Genres table.
  • Inserting data to iterate over the books collection and persist each Book object as a row into the Books table, then update the Book object with the generated id of the row that was inserted.
  • Reading the table by creating method to read all genre’s from the database, to find genres where the description of the genre matches a substring.

Front-end/Client side(HTML/CSS)

HTML

  • Since the projects was a Brownfields project we had the browser HTTP API written for us, Just had to create the web form and the web page and link the CSS to the HTML file.
  • When it comes to HTML (Web page), created an HTML file that will write the title that must be Terms and Conditions. And have a main heading as Our Terms and Conditions.
  • When it comes to HTML(Web Form), created an HTML file that will focuses on the new registration, where the form will display/ask user Firstname , Lastname, email, password , password confirmation, and have a submit button to send the details
  • Validating the password to see the first and second password are the same

Linking stylesheets(CSS)

  • To changing the specific parts of the browser to be different colors and have some specific feature when something done to that feature(e.g the submit button will change color when the user hover on the button

Conclusion

After the project I understood more about creating an HTML file and adding stylesheet to the HTML file and also got the understanding on how the Web development works

I was also able to understand how to work with Java and HTML so that they can be able to interact with one another. I also got the clear information of when to use which tag to do specific thing.