How ay2425s2-cs2103t-f11-2/tp works
Main Components
• User Interface (UI) Layer: Represented by the files in the src/main/java/seedu/address/ui package and associated FXML files in src/main/resources/view. This layer handles all user interactions.
• Logic Layer: This layer exists in src/main/java/seedu/address/logic and includes the command classes (e.g., AddCommand, EditCommand, DeleteCommand, etc.), logic manager, and message handling. It parses user inputs and delegates commands.
• Parsing Component: In src/main/java/seedu/address/logic/parser, you have classes that tokenize and transform user input into commands.
• Domain Model: Located under src/main/java/seedu/address/model. This includes the core business objects (e.g., Person, Allergy, Priority, etc.) and collections like UniquePersonList.
• Storage Component: Found under src/main/java/seedu/address/storage, this component is responsible for persisting and retrieving data using JSON files.
• Utility and Common Components: The src/main/java/seedu/address/commons package contains core classes (like Config, LogsCenter, GuiSettings, etc.) that support the other layers.
Relationships and Interactions
• The UI layer interacts with the Logic layer by capturing user events and forwarding them to the LogicManager.
• The Logic layer uses the Parser to interpret user commands and then operates on the Domain Model.
• The Storage layer is accessed by both the Logic and Model layers when data persistence or retrieval is required.
• Utility classes (within Commons) are used across layers for tasks like configuration, logging, and file handling.
Architectural Patterns and Design Principles
• MVC or a similar pattern: which separates concerns into view (UI), controller (Logic) and model (Domain Model).
• Command Pattern: Evident in the various command classes, making it easier to add or modify commands.
• Separation of Concerns: Each component (UI, logic, storage, model) has a distinct responsibility.
• Use of utility classes to centralize common functions (e.g., file, string, JSON utilities).
Relevant Technologies and Frameworks
• Java and JavaFX – for the desktop user interface (noted by the FXML files).
• Gradle for build management (build.gradle and gradlew scripts).
• JSON for persistence (via JSON-based storage classes).