I contributed to this RecipEditor: recipe manager
Add new recipe functionality that utilizes the GUI functionality
I initially made the CLI add functionality. I proposed the GUI Add functionality because it will more user-friendly and a faster way to add recipe for fast typer as the amount of specific flags worsen the user experience
What: Add the component that call the GUI and the interaction between GUI, CLI
Justification:
To make the transition between the GUI and CLI workflow seamless. Since the functionality of edit and add in GUI mode are the similar, the GUI component is also used for the Edit Command (whose CLI functionality was handled by William)
Added other useful sub-features to make the GUI experience useful
/add
command: When the user text input is cannot be parsed, it will
be saved in the temporary file and a question will be asked to the user on whether they want to change without having
to type /add
or /edit
to access the command againA parser that parse text file generated from the GUI into a valid Recipe that can be stored in the Recipe Object by the program
Because the user can type virtually anything in a text file, a robust parser to a valid Recipe Object that the program can understand is important
The parser is strict but allow the user some freedom to key in the data
Store Recipe data from the Model functionality. Create logic to make the program recover gracefully from user tampering with the data
The bulk of the code for Storage is made by Qian Hui. However, due to my GUI proposal, the complexity of storing the data evolved over time and I helped to code various helper functions to ensure that the interaction between the data files and the program is seamless
Allow the user to tamper with the data in various way without crashing the program