PROJECT: Invités
This portfolio documents my contributions to Invités. |
Invités is a desktop application that helps people to organize and manage events. It simplifies and streamlines common event management tasks such as managing a guest list, attendance taking, QR code ticketing and mass email sending. With our application, event planners are able save time and effort as it offers a much more beginner friendly and specialized workflow as compared to its competition such as Microsoft Excel or Google Sheet. It is also designed to be highly versatile and can be used to plan and manage a wide range of events from school camps to weddings.
The application is developed in Java and has a graphical user interface created with JavaFX.
Invités is developed as part of a team project for a software development module in National University of Singapore. I was tasked with the responsibility to implement a data sharing mechanism for the guest data. Below is a breakdown of our various roles in the team, which consists of five members.
-
Srivastava Aaryam: Mass email communication
-
Sandhya Gopakumar: Events management
-
Sarah Taaher Bonna: Guest list management
-
Tan Tze Guang: Attendance management
-
Tan Wei Ming: Data sharing
Summary of contributions
This section summarizes my main contributions to the team. It showcases my ability to develop software features and work on software as a team. |
-
Major enhancement: added the ability share data by importing/exporting guests to Comma Separated Values(CSV) files
-
What it does: Allows event planners to export/import guests along with their details to CSV files. For unsuccessful imports, an import report window will be generated to show the malformed data and its associated errors.
-
Justification: The import feature is critical to the application because it allows event planners to save time by adding guests in batches. The export feature also allows event planners to share guest data easily.
-
Highlights: This enhancement is designed to support future file formats easily and it required an in-depth analysis of several design alternatives.
-
-
Minor enhancement: Added utility class to generate QR codes for ticketing (Credits: XZing Core)
-
Code contributed: RepoSense link
-
Other contributions:
-
Project management:
-
Enhancements to existing features:
-
Community:
-
Contributions to the User Guide
Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users. |
Importing guests from CSV file : import
Import multiple guests with data from a specified CSV file. To create your own CSV file for importing guests, please see Section 6: "CSV Guest List Format" for the accepted format.
Format: import FILE_PATH
Examples:
-
import directory/subdirectory/guestlist.csv
You will populate the guest list with the data imported from the CSV file in the specified path.
Exporting guests to CSV file : export
Exports guests' data in the guest list to a specified CSV file. Allows you to share your guest list easily using the exported CSV file. The format of guest fields in the CSV file is the same format as the import
command and can be found in Section 6: "CSV Guest List Format".
Format: export FILE_PATH
Examples:
-
export directory/subdirectory/guestlist.csv
You will export the currently filtered guest list entries into a CSV file in the specified path.
CSV Guest List Format
The import
and export
command will only work with CSV files satisfying a predefined format. To create valid CSV files, guests fields must be in the following format below and each guest’s details must be entered on a new line.
Format: NAME,PHONE_NUMBER,EMAIL,PAYMENT_STATUS,ATTENDANCE,UID,[TAG]
Individual guest fields shall not contain any commas. |
Example: sample CSV file
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. |
Import/Export Command
Current Implementation
High level overview of the class hierarchy
The import and export command enables batch importation and exportation of people into and out of the guest list. Additionally, the import command will create a popup window to show the errors during import only if there are any. The commands currently only support comma-separated value file format (CSV), however, it is designed to easily support other formats such as VCard in the future.
The implementation of the import and export feature mainly resides under the logic component of the application. The import command involves an additional user interface (UI) component that shows import errors.
The Import/Export feature is facilitated by the AdaptedPerson
,PersonConverter
and SupportedFile
interfaces. They provide the behaviour specifications so that the Import/Export command will be able to operate without knowing the underlying implementations.
-
AdaptedPerson
represents a person in the respective file format. It requires the following method.-
AdaptedPerson#getFormattedString()
: returns the string representation of the person according to the particular file format.
-
-
SupportedFile
represents a supported file that is able to read and writeAdaptedPerson
s' to the actual file on the computer. Here are some of its key methods-
SupportedFile#readAdaptedPersons()
: Returns all person in the form ofAdaptedPerson
s from the file -
SupportedFile#writeAdaptedPersons()
: Writes allAdaptedPerson
to the file
-
-
PersonConverter
represents a person converter that is able to convert betweenPerson
s andAdaptedPerson
s. Here are some of its key methods.-
PersonConverter#encodePerson()
: Encodes aPerson
object and returns the correspondingAdaptedPerson
object -
PersonConverter#decodePerson()
: Decodes anAdaptedPerson
object and returns correspondingPerson
object
-
To support the import/export of CSV files, CsvAdaptedPerson
,CsvPersonConverter
and CsvFile
implements the above mentioned interfaces.
For the import command, the popup window to show errors encountered is facilitated by the ImportError
and ImportReportWindow
classes.
-
ImportError
represents an error encountered during the import command. It stores the actual CSV formatted person and its associated error message. -
ImportReportError
is the controller class of the popup window that will display allImportError
s encountered during the execution of an import command.
The following class diagrams shows the relationship between the classes and interfaces mentioned above.
Command mechanism
The import command will first read the csv file and loop through all the guest data and add them into the model. When application encounters a particular guest in CSV file which fails to be converted or is already an existing guest, an ImportError
will be created. These ImportError
object will be added in a list within the import command.
After the command completes the importation of all guests in the guest list, if there are unsuccessful imports, it will trigger a ShowImportReportEvent
which will display the errors
The following sequence diagram shows how the Import operation works:
The ShowImportReportEvent
will be handled by the MainWindow
according to the following sequence diagram below.
The export command will only export the currently filtered guest list by calling Model#getFilteredPersonList
. This enables greater flexibility as it provides a way for users to select specific groups of people to export. The following sequence diagram shows how the export operation works:
Design Considerations
Aspect: Implementing decoding/encoding functionality in Import/Export command
-
Alternative 1 (current choice): import & export command be able to do accept a general
PersonConverter
-
Pros: Reduction in code duplication when supporting other file-formats in the future. Easier to mock and do unit tests.
-
Cons: More complicated to implement.
-
-
Alternative 2: Each supported format has its own command which knows how to do the required conversion
-
Pros: We do not need to check for the required import/export format required.
-
Cons: Higher testing overhead for possible numerous types of export & import command. Duplicated boilerplate code.
-
Aspect: Implementing the reading/writing of file functionality in Import/Export command
-
Alternative 1: Abstract the writing/reading of files into separate classes,
SupportedFile
interface andCsvFile
class (current choice)-
Pros: Able to add support for other file formats with changing existing code.
-
Cons: Increased code complexity.
-
-
Alternative 2: Use a utility class with static methods
-
Pros: Simple to implement.
-
Cons: Violates open-close principle. Code will only work for CSV files. High coupling with the import/export command. Impossible to mock, decreases the testability of the import/export commands.
-
Importing and exporting guests
-
Importing guests from CSV file
-
Prerequisites: Delete all guests before each test case. Execute
list
followed byclear
. -
Test case: Download sample.csv into directory where application Jar file is located and execute
import sample.csv
Expected: All guests are imported fromtest.csv
. No errors are found. -
Test case: Download errorsample.csv into directory where application Jar file is located and execute
import errorsample.csv
Expected: No guests are imported fromtest.csv
. Popup window shows all import errors. -
Other incorrect commands to try:
import
,import test
, etc
Expected: No guests are imported. Error details shown in the status message.
-
-
Exporting all guests
-
Prerequisites: List all guests using
list
. There must be at least 1 guest in guest list panel after thelist
command. Notest.csv
file should be found in same directory of application Jar file. -
Test case:
export test.csv
Expected: All guests are exported intotest.csv
.test.csv
can be found in the same directory of the application Jar file. -
Other incorrect commands to try:
export
,export test
, etc Expected: No guests are exported. Error details shown in the status message.
-
-
Exporting filtered guest to CSV file
-
Prerequisites: There must be guests that are absent. Filter all absent guests using
filter a/ABSENT
. -
Test case: 'export test.csv'
Expected: Only guests that are absent are exported intotest.csv
.test.csv
can be found in the same directory of the application Jar file.
-
-
Exporting to file that already exists
-
Prerequisites: There must be guests in the guest list panel. Export guests using
export test.csv
. -
Test case:
export test.csv
Expected: No guests are exported. Error details shown in the status message.
-
-
Exporting empty guest list
-
Prerequisites: guest list panel in user interface must be empty.
-
Test case:
export test.csv
Expected: No guests are exported. Error details shown in the status message.
-
Guest preview
-
Displaying guest in guest preview
-
Prerequisites: Have guests in guest list.
-
Test case: Click on any guest in guest list panel.
Expected: Guest details should show up in guest preview. Any command that successfully modifies the underlying guest list (uselist
to see underlying guest list) will clear the person preview. Note:filter
andfind
is not considered to be modifying the guest list.
-