PROJECT: OASIS


Overview

OASIS is an employee management application that is suitable for small-to-medium sized enterprises. It is an all-in-one tool for office administration and communication that runs on any computer. With the use of primarily textual commands coupled with a beautiful user interface, you can get your administrative jobs done faster compared traditional point-and-click applications. Some of the main features that you can look forward to using are employee records management, authentication and permissions, assignment management, and leave management.

Summary of contributions

The following section highlights my major and minor contributions to OASIS:

Code Contributed: [Reposense]

  • Major enhancement: Assignment Management

    • Adding new assignment: addasignment

      • What it does: This command allows authorized users to create new assignment.

      • Justification: This function allows authorized user to computirized assignment documents, which would assist in easy retrieval as well as reduces paper waste.

    • Delete assignment: deleteassignment

      • What it does: This command allows authorized users to delete assignment from the system when it is no longer needed.

      • Justification: Having an overwhealming number of data might not necessarily be good. Especially, when the data is no longer important. Therefore, when the assignment data is not used anymore, it can be remove from the system.

    • Edit assignment: editassignment

      • What it does: This allows authorized users to make changes to existing assignment documents.

      • Justification: Making changes in order to document improvement will be needed during the course of the assignment.

    • List assignments: listassignments

      • What it does: This allows the user to view all the existing assignments in the system.

      • Justification: This will enable the users to search for infomation of the assignment they are working on.

    • Highlights: Being the first time working in a medium-sized project and making improvements to the existing implementation, I picked up many technical and writing skills. Prior understanding of the model and interaction of the components is also needed, However, the most important lesson I learnt is the importance of writing clear documentation. It is because with clear documentation, collaborating with others is easier.

  • Minor enhancement:

    • Keyboard Shortcuts

      • What it does: With valid key combinations, command word corresponding to the key pressed will be written into the command box.

      • Justification: Frequent users could access commonly used commands quickly.

  • Other contributions:

    • Project management:

      • Managed releases v1.1 - v1.4 (4 releases) on GitHub

    • Enhancements to existing features:

      • Update AddCommand to accept new person with assignment, if and only if the assignments exist withing the system.(Pull requests #184)

      • Wrote additional tests for existing features implemented by me.(Pull requests #116)

    • Community:

      • Reported bugs and suggestions for other teams in the class (examples: #1, #2, #3, #4, #5, #6, #7)

    • Documentation:

      • Updated Model and UI diagram.

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation with minimal technical terms targeting end-users.

Add an assignment : addassignment

Adds an assignment into the system.

Format: addassignment -an ASSIGNMENT_NAME -au AUTHOR -de DESCRIPTION

  • To use this command, you must be logged in with "ADD_ASSIGNMENT" permissions.

Examples:

  • addassignment -an KRYPTONE -au Jhonny English -de Data encription application.

  • addassignment -n IRobot -au Tom Smith -de Autonomous robotic vacuum cleaner which has intelligent programming.

List all assignments : listassignments

Displays a list of assignments that are in the system.

Format: listassignments

Removing an assignment : deleteassignmnet

Removes an assignment from the system.

Format: deleteassignment INDEX

  • To use this command, you must be logged in and have the "DELETE_ASSIGNMENT" permission.

Examples:

  • deleteassignment 3

Edit assignment details : editassignment

Changes assignment details (such as description).

Format: editassignment INDEX [-an ASSIGNMENT NAME] [-au AUTHOR] [-de DESCRIPTION]

  • To use this command, you must be logged in and have the "EDIT_ASSIGNMENT" permission.

  • Edit the assignment at the specified INDEX. The index refers to the number shown in the displayed assignment list. The index must be a positive integer 1, 2, 3, …​

  • At least one of the optional fields must be provided.

  • Existing values will be updated to the input values.

Keyboard Shortcuts

Command Key

Add employee

CTRL + A

Exit

CTRL + Q

Find employee

CTRL + F

List employees

CTRL + L

Select

CTRL + S

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Assignment Management

There are four commands related to assignments. The four commands are addassignment, listassignments, deleteassignment and editassignment.

These commands could only be executed by user with the appropriate permission.

Current Implementation

An assignment is represented by Assignment model object. Assignment object stores the information of AssignmentName, Author and Description.

The following diagram shows the classes to model Assignment:

AssignmentModel
Add Assignment

The following sequence diagram shows how adding an assignment works:

AddAssignmentSequenceDiagram

Below is an example on how addassignment mechanism behaves when a new assignment is added.

  1. When user executes addassignment -au ASSIGNMENTNAME -au AUTHOR -de DESCRIPTION command, it will be parsed, then new Assignment object will be initialized. If the current user does not have the permission to add new assignment, error message will be thrown.

  2. If user has the required permission, then the current Assignment object will be compared to the existing assignments in the system with hasAssignment(toAdd) method. If the new object is unique, then it will be added into the system. However, if there is duplicate, the system will throw DuplicateAssignmentException.

  3. The new Assignment will then be copied and transformed to become XmlAdaptedAssignment object, which is then saved into a file by the Storage component.

Delete Assignment
Deleting an assignment form the system will remove it permanently!

The following sequence diagram shows how deleting an assignment works:

DeleteAssignmentSequenceDiagram

Given is an example of how deleting an assignment mechanism behaves when it is executed.

  1. When user executes the deleteassignment INDEX command, DeleteAssignmentCommand object will be created. It then checks if the current user has the required permission to execute the command. If the user does not have the required permission, then and error message will be displayed.

  2. Meanwhile, if the user has the required permission, system gets the Assignment object to be deleted from list of assignments and finally delete it. It will then update the list in the Storage component.

List Assignment

The parsing sequence of listing all assignments is similar to adding and deleting an assignment. In addition, there is no permission required to run listassignment command.

When user executes listassignment command, system will retrieve all assignment data in the Storage component using updateFilteredAssignmentList() and update the User Interface to list all the assignments.

ListAssignmentCommand.java
public CommandResult runBody(Model model, CommandHistory history) {
        requireNonNull(model);
        model.updateFilteredAssignmentList(PREDICATE_SHOW_ALL_ASSIGNMENTS);(1)
        EventsCenter.getInstance().post(new AssignmentListEvent());
        return new CommandResult(MESSAGE_SUCCESS);
    }
1 The method to retrieve all assignments.
Edit Assignment

Parsing the command when executing editassignment is similar to deleteassignment command.

  1. When user executes editassignment 1 -an ASSIGNMENTNAME command, the command will be parsed. The given prefix and field indicate that the corresponding field of Assignment should be edited with the new field. To do so, EditAssignmentDescriptor object will be produce. This object has the newly edited Assignment object.

  2. After, the 'Permission' of the user will be check. If the user does not have the appropriate permission, error message will be displayed.

  3. While if the user has the appropriate permission, the old Assignment object will be replaced with the new Assignment object.

  4. The list of the assignments will then be updated in the Storage.

Design Consideration

Aspect: How the Assignment object is stored
  • Alternative 1 (Current Implementation): store assignment information in Xml file.

    • Pros: Xml file has extensibility, as it has no fixed set of tags. Allowing future developers to enhance the information of the assignment.

    • Cons: Inefficient retrieval of information of the assignment when the storage size gets too big.

  • Alternative 2: store the assignment information using database system.

    • Pros: Fast and efficient retrieval of information, even when the amount of data is massive.

    • Cons: Separated system needs to be set up to store information. Thus, might result in additional cost.

Command Shortcuts

With various keyboard combinations user will be able to access command keywords quickly.

Current Implementation

Keyboard shortcuts in OASIS is implemented using KeyEvent handler within the CommandBox class.

When valid key combination is pressed, the text in the command box will be replaced with the corresponding command word.

Aspect: Logic & UI

Within the CommandBox class, there is KeyEvent handler method which handles keyboard’s input. If the key pressed is a valid combination, then the text field in command box will be replaced with the command corresponding to one of the existing commands.

Design Consideration

Current Implementation: Use the KeyEvent handler in the CommandBox class.

  • Pros: It is easy and simple to implement.

  • Cons: As the number of commands increase, there might not be enough key combination to accommodate all the commands.