PROJECT: Event Manager


Overview

Event Manager is a computer application developed base on Address Book - Level 4 and is used to manage events for Residence College(RC) Students of NUS.

This product prefers users to interact by Command Line Interface(CLI) with the help of Graphic User Interface(GUI) create by JavaFX.

Java is used for better compatibility with other platforms.

  • Main features:

    • Authentication: Admin/User

    • Basic operation: Create – Read – Edit – Delete (CRUD)

    • Comment sections

    • Event RSVP

    • Search features

    • Undo, redo commands

    • Event reminder

    • Automatic sorting

    • Export events as iCalendar file

Role

I am in charge of develop automatic sort, search and export calendar features.

Summary of contributions

  • Major enhancement: Add the ability to export all registered events of the currently logging in user to an iCalendar file of user choice name

    • What it does: Allow users to take advantage of the available calendar applications to better manage their events.

    • Justification: This feature can improve user management ability since there are many other tasks/events beside RC events that students have.

    • Highlights: This enhancement follow command pattern that are currently applied in this project, which open for future expansion or improvement based on existing code.

    • Credits: Import [ical4j] version 3.0.0 to convert event and data to iCalendar format

  • Major enhancement: New modified find command to search by keywords in varieties of combination for better navigation.

    • What it does:User are now allowed to search by any attributes that an event have and can include some must have keywords in certain data attributes instead of just name in the previous version.

    • Justification: This enhancement significantly increases user navigation ability in the product compare to the original search by name

    • Highlights: this enhancement extends previous find command structure to avoid affecting other components of this application

  • Minor enhancement: Add automatic sorting by event datetime, then by event name for current events that are saved in .xml file and displayed on GUI.

  • Minor enhancement: Add new attributes: datetime to the event

  • Code contributed: [Click here]

  • Other contributions:

    • Project management:

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

    • Enhancements to existing features:

      • Fix current tests that are affected by default sorting and new attributes

    • Documentation:

      • Updated User Guide and Developer Guide to reflect latest stage of the product

    • Community:

      • PRs reviewed (with non-trivial review comments): (Examples: #Pullrequest79)

      • Contributed to forum discussions (examples: #CS2113 forum issue 47)

      • Reported bugs and suggestions for other teams in the class

    • Tools:

      • Integrated a third party library (ical4j) to the project

Contributions to the User Guide

Below are all my contributions to different sections in product user guide. This demonstrate my abilities to communicate with end-users:

Automatic sorting: Events in Event Manager will always be displayed in chronological order, followed by alphabetical order.

Locating events: find

Admin/User: Finds events whose field contains any of the given keywords specified by the user.
Format: find PREFIX/KEYWORD [MORE_PREFIX][MORE_KEYWORDS]

Available prefixes:

  • k/ Default search option

  • n/ Name search

  • c/ Contact search

  • e/ Email search

  • p/ Phone search

  • v/ Venue search

  • d/ Datetime search

  • t/ Tag search

  • a/ Attendee search

  • The search is case insensitive. e.g sports will match Sports.

  • The order of the keywords does not matter. e.g. Sports Day will match Day Sports.

  • Only full words will be matched e.g. Sport will not match Sports.

  • Events matching at least one keyword will be returned (i.e. OR search). e.g. Sports Day will return Sports games, Good Day.

  • Command default prefix (k/) will allow searches in any field of an event, while other prefixes will result in events that must have that keyword in the indicated field.

  • At least one of the available prefixes must be presented.

  • When using different prefixes together, logic AND operator is used. This means that if there is one or more prefixes in the combination that does not have any keywords following it, search results will always be empty.

  1. If there are more than 1 prefixes of the same type, for example, find n/new n/dark n/meeting, they will be automatically combined together, which means this command will be assumed to be the same as find n/new dark meeting

  2. If there is only the prefix without any keywords following it, no events will be found as there are no events with the required fields left empty

  3. Unknown prefixes will be ignored.

Examples:

  • find n/Day
    Returns events with names Sports Day and Any day

  • find k/Sports Sci friends
    Returns events having the name Sports Competition, venue Sci Avenue, and tag friends

  • find d/12/01/2018 04:30
    Returns any event having date 12/01/2018 or time 04:30

  • find k/Day n/Sports d/12/01/2018
    Returns any event having keyword day with names including Sports and with dates 12/01/2018

Exports calendar: export

Admin/User: Exports current registered/hosted events of the user/admin to an iCalendar file to use with other calendar application
Format: export FILENAME

Examples:

  • export myCalendar
    Exports the iCalendar file with name 'myCalendar' to your source folder.

File name should not be longer than 500 characters and can not be empty.

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.

Default sorting

Current Implementation

Since our product is an event manager, events should be controlled and view in chronological order. To do this, UniqueEventList class was modified so as to sort the event list in Date order, follow by Name order.

Consider this scenario:

Step 1: User launches application, then logs in

Step 2: User adds a new event which will occur before some of the other events in the list
e.g: add n/Jack Birthday Party …​ d/10/10/2018 20:30…​

autoSortingBefore
Figure 1. Add new event that need to be sorted

Step 3: When add method is called, it performs the intended operation, then sorts the list before returning it to other components.

Step 4: The event list panel is reloaded and displays the newly added event in the correct place.

autoSortingAfter
Figure 2. Auto sorting results

Aspect: How to sort the list

  • Alternative 1 (current choice): Event list will be sorted based on sort method implemented in UniqueEventList class to modify the internal list which event manager is backed on.

    • Pros: Easy to implement with minimum modification that could affect other components.

    • Cons: Every method that changes the internal list (e.g: add, setEvent, delete) will need to implement the sorting method again at the end of the method.

  • Alternative 2: Sort only when we need to get the list if the list is not sorted.

    • Pros: The easiest implementation without affecting other components.

    • Cons: The sort operation when called by other components, for example the UI component, will return operations to the main thread, which will severely affect testing with JUnit on JavaFX thread.

  • Alternative 3: Only sort the list for displaying on the UI

    • Pros: Will perform minimal operation while still returning what we need to observe.

    • Cons: Very complicated implementation as the UI is updated based on observing internal list. We will need a class to update the UI if we only want to sort the list on display.

Enhance current find command

Current Implementation

find command is used for better navigation. Therefore, it is enhanced to search for more properties in an Event.

find can search for any data with the default keywords and . If specific prefixes are added, find can search for events that must contain that keyword in the specific fields.

If there are more than 1 prefixes of the same type, for example, find n/new n/dark n/meeting, they will be automatically combined together, which means that this command will be assumed to be the same as find n/new dark meeting.
Current version implementation uses logic AND operator for different prefixes.
  • Alternative 1 (current choice): Modify the predicate to display the events that contain one of the keywords.

    • Pros: Follows the current structure of find command, which means that current resources can be reused.

    • Cons: With the current implementation of the predicate, scaling will severely affect product performance.

Future enhancement: [V2.0]

  • Search options for keywords contained or for the exact keywords.

  • Search with both logic AND and OR operator with different prefixes.

  • Search for events within a time range.

Export RVSP-ed events to iCalendar file

Current implementation

This feature will increase the compatibility of Event Manager with other calendar app for better planning.

Consider the following scenario:

Step 1: User launches the application, then logs in.

Step 2: User executes export mycal command. The export command receive argument to accept as filename

Step 3: Current user, who is logged in, will be used to receive an event filtered list that he/she has registered for.

Step 4: An FileOutputStream will be created to create new file/re-write if the file exist will the data from the filtered event list convert to iCalendar file format. File will be stored in folder that you store EventManager.jar

exportCommandResultUI
Figure 3. Command result show in the UI
exportCommandResultFile
Figure 4. Command result show in file folder

The process is illustrated in the following diagram:

exportCalendarCommandSequencesDiagram
Figure 5. ExportCalendarCommand sequence diagram

Aspect: How to export the event list

  • Alternative 1 (current implementation): Using ical4j external library to create methods to convert events to RFC5545 format, then stream to FileOutputStream with given filename from user.
    All method are written in the ExportCalendarCommand class.

    • Pros: Easy to implement, can reuse current resources and easy to match wth the implementation of Attendance list.

    • Cons: Violates some of the OOP design as the export method should be in the storage class.

  • Alternative 2: Create a class to write an .ics file with given RFC5545 standard.

    • Pros: Have better control of the output file, since the ical4j support API has not been updated for a long time and currently shows some areas which are lacking.

    • Cons: Very complicated and time consuming.

Calendar will be exported to your source folder.

[Proposed]: Future enhancement [V2.0]

Export should be able to export the attendance list of an event according to user preference.