CS2340C_Team45

Design & Architecture

UML

Architecture Analysis

Our project consists of five main models, the logistics, destination, dining, accommodations, and community models. These are the main pieces of our project that facilitate data update and retrieval to their associated databases. In order to faciliate this, we created database, authentication, and group singletons that help manage our applications. These singletons provide unique instances that ensure appropriate data transfers to firebase. It also ensures smooth group collaboration.

Throughout our application, we also ensured appropriate SOLID/GRASP implementation where appropriate. By following these principles, we also adopted several design patterns such as singleton, strategy, and observer.

For example, we use strategy pattern on our dining page which allows users to sort by review and time. This allows our application to change behavior at runtime based on user specifications. In the future, we can easily add more sorting strategies without modifying existing code.

We also implemented the observer pattern in our community page. This allows us to collect queries from our database in an elegant manner. The observable adds the observer to its list of observers. It then begins to collect database queries throughout the code. We need all of these queries before we can proceed. After each query, we test if all the data is collected yet. Once all the data has been collected, we notify all observers by calling update(...) on each observer in this list and passing them the necessary data. The update(...) method is defined upon the creation of the observer. Using this pattern, we are able to elegantly collect queries from the database and proceed with the next steps once all data is collected without having to stop and wait.