Skip to content

UML Diagram

Isaac Joffe edited this page Dec 4, 2023 · 21 revisions

Project Part 4

UML Diagrams

The following UML class diagram outlines our final application design.

Inventory Mangager App UML Diagram (4)

Design Patterns

We used many design and architectural patterns in our solution. The app architecture is based off of Android best practices, using Fragments to make most of the application's features while using ViewModels for handling data storage and interaction.

  • Singleton Pattern
    • The ItemViewModel() and TagViewModel() classes are essentially singleton classes because of their use of static variables. This allows one standard connection to the database to be made so that all parts of the application use the same global data (all parts of the application are then synchronized). Similarly, Android enforces that only instantiation of a Fragment() class can exist at once.
  • Proxy Pattern
    • The ItemViewModel() and TagViewModel() classes also support the proxy design pattern because they track local copies of the database for speed. They still operate on the database, but many functions also use a local copy that is in sync with the database so that the application can run faster and better.
  • Observer Pattern
    • The ItemViewModel() and TagViewModel() classes also relate to the observer design pattern because the updates in their LiveData() objects trigger listeners to update the UI appropriately. This is how the list of all tags and the list of all items are displayed dynamically.

Project Part 3

The following UML class diagram outlines our initial application design.

Inventory Mangager App UML Diagram (2)

Clone this wiki locally