I have finally seen the wonderful world that is Object Oriented Programming. This past semester I took a VB.net course and Java course and finally got to know a bit about OOP. I know the basics.
However, the classes only dealt with memory resident objects, there as no storage of them to a flat file or database. Basically, I don't know how to do OOP alongside a databse. But I want to learn.
One of the projects I'm currently working on is a calendar/schedule for a sports team's website. I've got the DB scheme down (I'm really good with DB design). I've started off my migration to OOP by using a database class called ezSQL from Justin Vincent. It really has made the code simpler and smaller. I like that. I've also begun to take a look at some of the form classes, such as PEAR's HTML:Quick_Form. But how do I take my application a step further?
The events/games would be an object. They would have various properties I would set as well as some methods for interacting with the object. My big question is: What is the proper way to store the object into the database? Do I write a method called 'storeInDatabase' or something like that? For some reason, my gut tells me that's not right. And what about functions such as 'displayScheduleTable' or 'displayEventDetails'? Those don't seem to belong in an 'Event' class.
There's probably some great sites or posts about this very topic, I'm just not finding them. Everything I'm seeing so far is the basics of OOP, which I have a decent handle on. I need to learn how to develop a database application using OOP.
BTW, my current enviroment is still PHP 4, so I can't use any of the fun and new things in PHP 5.
Thanks alot, in advance, for any help you may provide me.