Design & Architecture
Based on the nature of the HealthTrack app, which desires only one instance of each database to exist throughout the application’s life cycle, our group has chosen to follow the Singleton design pattern to implement our existing databases necessary for our application.
By abiding to this design pattern, as well as GRASP principles, we ensure that issues that could arise from having multiple instances, such as data inconsistency, race conditions, and unnecessary memory usage will be prevented and maintain data integrity and efficiency of the database operations throughout the application.
On top of that, our group also added Strategy Design later on in our development phase in order to abstract the sorting process and allow for the addition of more possible sorting methods using the strategy design pattern. With it, our application now has a refresh sorting strategy and name sorting strategy that allows for a cleaner code and easier update.