I've been coding for a while and am currently working on the biggest project I have ever worked on. As I go on, it occurs to me that there must be some reason all the big packages that I see use classes in one way or another.
It also dawns on me that perhaps this reason is to ease the knots that I seem to get myself tied into. Especially in regards to database access and user authentication.
Thing is, I have never used classes, and while I learned PHP pretty much from looking at things and changing them until they did what I wanted, I just cannot seem to learn classes in the same way.
Anyhow, I'm doing a tutorial and reading up as much as I can (though I dont seem to get it fully most of the time) and I am finding myself without answers for a few fundamental things ....
For example, what would I use a class for? I mean ... I'm assuming classes are best used for repetitive things, as opposed for things that are just used once.
So ... a class is your man if you want to access the database and return results, but not your man if you want to return a specific results set (unless it applied specifically to another task).
Will it make code run faster or better? Will it make my body of code easier to manage?
Sorry if these are dumb questions.
Cheers.