Project Assignment, Phase 1
In this chapter, you will begin implementing your own project assignment. The project is completed incrementally during Parts 9–12, and no later than the end of Part 12 the finished project must be submitted and approved by a course instructor during remote or in-person guidance. Read the project requirements carefully before you begin.
Parts 9–12 contain guidance intended to help you make progress with the project. Likewise, Parts 9–12 contain exercises whose purpose is to support the project's gradual development. As before, you must complete at least 50% of the exercises.
We recommend implementing the project using the phased approach described in these chapters.
Project Topic
Start by choosing a project topic and familiarizing yourself with the project requirements. You can find ready-made project topics in the project assignment instructions.
After selecting a topic, report it through the task below.
Choose a project topic that interests you.
You may choose one of the predefined topics from the project guidelines page or create a project based on your own idea.
If you choose a predefined topic, submit the name of the topic you selected: (Expense Tracking, Product Inventory Management, Library, Housing Company Management, Flashcard Application)
If you create a project based on your own idea, write and submit a project plan.
The plan must include:
- The purpose of the application.
- The functional requirements that are essential for the application.
- A description of the entities that are important to model within the application's domain.
You may use the descriptions of the predefined topics as examples. After submitting, present the plan to an instructor in person or through remote supervision before starting the remaining project phases.
For pair projects, the application must contain at least three modeled entities (individual projects require two; requirement 1.1) and three views (individual projects require two; requirement 4.1). For this reason, pair project plans must always be reviewed by an instructor before proceeding to the next phases.
Initializing the Project
Once you have selected a topic, you can create a new JavaFX project. We recommend using the course's JavaFX project template introduced in Part 7.1.
Tips:
- First create a separate empty directory for your project in a location that you can easily find on your computer.
- When creating the project in the IDE, choose that directory as the project location (
Locationsetting). - Give your project a unique identifier (
GroupId). A suitable format isfi.jyu.ohj2.yourname.topicwhereyournameis your university username andtopicis the project topic.
Once the project has been created, try running it and verify that the application starts correctly.
Initializing a Git Repository
After creating the project, immediately create a Git repository inside the project directory using the command
git init.
However, do not create the first commit just yet. First, let's prepare the project directory slightly.
Projects using Git typically include .gitignore and README.md files.
The purpose of the .gitignore file was briefly discussed earlier in the course: files and directories listed in it are not included in commits unless explicitly forced.
Examples include IDE-generated out and target directories that contain compiled code.
It is especially important to remember to add files containing sensitive information, such as personal data, passwords, or API keys, so that they do not accidentally end up in a remote repository.
Make sure your project contains a .gitignore file.
If you are using the course JavaFX template, one is already included.
Pay attention to the spelling
.gitignore begins with a period and is written entirely in lowercase.
README.md is written in uppercase letters and does not begin with a period.
The README.md, or "Read Me" file, is intended both for presenting the project and for providing important development instructions.
Remote repository services usually display this file on the project's front page, making it a good place to describe the project for non-technical users as well.
You can create a README.md file directly in the IDE by right-clicking the project in the project explorer, selecting New → File, and naming the file
README.md
The README.md file is typically written using Markdown.
At this stage, the README can be very simple.
Include at least the project name and a short description consisting of a few sentences
If you are using one of the predefined topics, you may copy the project description from the project assignment instructions.
Once you have created the README.md and .gitignore files, make your first commit.
Finally, create a remote repository and upload your local repository there using the instructions for remote Git usage.
- Create an IDEA project. You may use the JavaFX template provided for the course.
- Initialize a local Git repository.
- Add
README.mdand (if necessary).gitignorefiles. - Create the first commit.
- Create a public remote repository for your project on GitLab or GitHub.
- Push the local repository to the remote repository.
At this stage, README.md may contain only the project name and a brief 1–2 sentence description of the project topic.
Submit a link to your public Git remote repository for this exercise. The easiest way to find the repository URL is from the project's page in the hosting service:
- GitLab (JYU): https://gitlab.jyu.fi/dashboard/projects/personal
- GitHub: https://github.com/repos
Implementing the Data Model
Before diving deeper into the user interface, it is worth thinking carefully about the application's data model and behavior. Begin development by implementing the classes that are essential to the data model. In the predefined project topics, the classes, their attributes, and their relationships are already described using UML diagrams.
Tips:
-
Implement data-model attributes using JavaFX
Propertytypes from the beginning. This will make it easier to connect the model and view later. -
Place data-model classes in a dedicated
modelpackage, separate from other classes. -
Start thinking about which public methods the class should provide to other classes. Although getter and setter methods are needed for JSON serialization, you can already consider methods that improve encapsulation. For example, in the Todo example application, the controller never adds a
Taskobject directly into the task list of the collection. Instead, adding a task is the responsibility of the collection through itsaddTask()method.Do not spend too much time thinking about class behavior at this stage; not every future use case can be predicted. Additional helper methods can always be added later when implementing controller classes.
-
We strongly recommend testing cooperation between model classes by using them directly from the application's
mainmethod (or from a helper method called bymain). You do not need a user interface yet. Create and use objects directly from the main program. Verify that your model supports the application's most important operations, such as: adding data, retrieving data, modifying data and deleting data. The debugger can help verify that the model state is correct.If you wish, you may even write unit tests for the model's basic functionality. You can use the Todo application's model tests from Part 8.5 as an example.
-
There is no need to think about saving or loading data yet.
Once you have implemented an initial version of the data model in Java and the code contains no errors, it is a good time to save your progress in Git.
Create a new commit (git add + git commit) and push it to the remote repository (git push).
Preliminary User Interface Plan
Once you have an understanding of the application's data model and requirements, it is a good time to begin planning the basic layout and behavior of the user interface.
Create a new directory in your project called plan
In the IDE, this can be done by right-clicking the project and selecting:
New → Directory
Create a file named user_interface.md
Write preliminary information about the required user-interface views into the file.
You can use the following template for the user interface design document
# User Interface Plan
## View 1

**Key functionality**
- What the user sees in the interface
- How the user reaches this view
(application startup, button click, etc.)
- What the user can do in the interface:
what can be clicked and what each button does
**Key components**
- Which JavaFX components might be needed
- This is mainly a place to record links to JavaFX classes
and libraries so they can be easily found later
- This section is optional and intended only to make
finding documentation easier
## View 2

**Key functionality**
- What the user sees in the interface
- How the user reaches this view
(application startup, button click, etc.)
- What the user can do in the interface:
what can be clicked and what each button does
**Key components**
- Which JavaFX components might be needed
- This is mainly a place to record links to JavaFX classes
and libraries so they can be easily found later
- This section is optional and intended only to make
finding documentation easier
Draw preliminary sketches of every view. At this stage, the exact appearance does not need to be finalized. The purpose is to focus on what the user sees and what the user can do. You may create sketches using online diagram tools such as wireframe.cc, DrawIO or Figma or any other drawing application. You may also draw on paper and take a photo or scan it.
The detailed visual design of the interface will be developed in Part 10. If you wish, you may also build the views immediately using SceneBuilder. In that case, take screenshots of the views. Do not spend too much time perfecting the views at this stage; the goal is simply to develop a rough understanding of the planned user interface.
Save the images in the plan directory and reference them in the user_interface.md document.
In the plan, describe what is displayed in each view and how users can interact with it. Doing so helps ensure that you remember all required create, read, update, and delete operations for your data model.
Once the user-interface plan is complete, create another commit and push the changes to the remote repository.
Plan your user interface views and their functionality.
Create a preliminary layout for each user interface view. You may use a diagramming tool, a drawing application, or SceneBuilder. You may also draw the layouts on paper and scan them.
Create a folder named plan in your project and place the images of the views there.
Also add a Markdown file named user-interface.md to the folder and describe the following for each view:
- What the user sees in the view (main view, edit view, etc.).
- What the user can do in the view.
- Which components are intended to implement the most important functions.
Create a new commit that includes the plan folder and push the changes to the Git remote repository.
Submit a link to the plan folder in the remote repository. You can obtain the link by opening the repository in a web browser, opening the plan folder, and copying the URL from the browser's address bar.
We recommend that you present your user interface design plan to an instructor, regardless of whether you selected one of the predefined topics or your own project idea. This helps ensure that you are on the right track and allows you to receive useful feedback that will help you successfully complete the project.
After you have presented your plan to an instructor during a remote or in-person supervision session, you may mark this task as completed yourself. The instructor may add comments below the submission box if necessary.