CSBSJU-CS330-F22 / Dining-Menu

A dining app that shows the Menu for the SJU Refectory.
BSD 3-Clause "New" or "Revised" License
1 stars 10 forks source link

Facade Design Pattern #117

Open jnewhouse003 opened 2 years ago

jnewhouse003 commented 2 years ago

Façade design pattern creates a single class that connects to other subsystems and creates simple method calls that then call to the other classes. One spot that we see this could be used in our project would be by creating a façade for our JDBC classes. right now we have 3 JDBC classes: JDBCInsert, JDBCSelect, and JDBCUpdateDelete. Say we wanted to save a favorite food and then view the favorite food. Right now to save the favorite food we make a call to the JDBCInsert class to save the food in the database. Then to view the favorite food we make a call to the JDBCSelect class. Instead with a JDBCFacade class, we could make a call to the JDBCFacade class to save the food which would use the instance of the JDBCInsert to save the food. We would then be able to use the same JDBCFacade class to then get the favorite food from the database as it would use the instance of the JDBCSelect to get the favorite food from the database.

jnewhouse003 commented 2 years ago

Screenshot 2022-12-03 123037