chat-client -- 2

Job ID: 38764546

Budget: $30 – $250 USD

For this assignment you will be implementing a Chat Client using Java and JavaFX. JavaFX

will be used as out GUI framework. To fully implement our Chat Client, we will need some

help from their party libraries and a build system.

To help with the building and dependency management, we are going to use Gradle to

manage our project. You should not need to install gradle itself as it should be automatically

added once we import the project to IntelliJ.

The GUI framework we are going to use is JavaFX, this works a little different that the GUI

we used in Project 1 as that was Java Swing. For more information and documentation on

JavaFX can be found here.

For making HTTP requests, we are going to use Java’s standard API and use the HttpClient

Class.

For realtime communication, we are going to use a WebSocket for communication.

The

third party libary we are going to use is Tyrus Project.

It provides an implmentation for

the WebSocket API in Java. It documentation can be found here: Docs. This dependency

will be installed and managed by graded.

In order for us to communicate with the Chat Server, we need to be able to speak a common

language between the server and the client. This is important because it is not always the

case that a server and client are written in the same language.

For this your Chat Client

and the chat server will communicate via JSON(Javascript Object Notation). However, Java

does not have a standard API for parsing and accessing JSON objects. At least not easily.

Therefore, we are going to use the GSON library to parse and build JSON strings.

Gson

Project. Documentation for the Gson library can be found here.

One of the important aspects of a project like this is to work on your ability to learn new

tools and APIs. You are ability to learn and learn quicky is an important skill to have.

2

Setup

When setting up the project it is important that you make sure everything works and is

ready to go before you start adding code. Given that we are using Graded, we need to make

sure that when we important, gradle is active and out project has a build.gradle file. One is

given to you in the project.