This is for a Cattle Drive assignment, so I can't post a lot of code. I've got a database that I want to access for purposes of displaying a list of videos in table format. (My code works, but it has issues.) Currently I put the code for loading the driver inside the block of code that handles the login. My reasoning for this was that once the login is successful, I want my app to display the list of videos stored in the database, and in order to do that, I have to have access to the database.
Apparently, this is a poor choice. My nitpicker made a reference to a popular website that has thousands of people logging in every few minutes, and I guess loading the driver with each login is bad. I just don't know why.
What is the issue with loading the driver? When should it be done, and for what reasons?