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

Singleton Design Pattern #115

Open jnewhouse003 opened 1 year ago

jnewhouse003 commented 1 year ago

A singleton Design pattern creates only one instance of a class that is being used. One spot that we could see a Singleton design pattern being implemented would be regarding how we are handling our JDBC and calls to our database. Right now we are creating a new instance of our JDBC each time we go to a new JSP file that calls to our database. So in the instance of our project we would only create one JDBC class when the project is initially run and then we would pass along that JDBC class to each JSP file so that we don't need to keep creating a new connection each time.