Need a fresh pair of eyes...
Hi Guys!
This isn't strictly a PHP question, but since I'll be doing all my work in PHP on this project, and you are all so super duper smart, I thought I'd ask here.
I just started working for a small company as a PHP programmer, and my boss has given me the go ahead to draw up a proposal that would entail revamping part of our software. I'm taking the time to try and draw up how everythin fits together so if/when he gives the go ahead on this, we'll have a clear cut map of how everything settles together.
Unfortuantely, I'm having a hard conceptualizing my class structure, and getting each part in such a way so that it extends the "proper" parent.
Here are the main portions that need to be organized up.
Company, Business, Inventory, Jobs, Payroll, Timeclock, Recipes, Menu, Loyalty, Vendors, AP, AR, Purchasing.
I've got a good idea of how I'd like everything to be organized, but I'm running into some garbage in my own head where I can see item A inheriting from item B OR item C, and since PHP doesn't handle multi-inheritance, I can't just say "oh, yeah, you'll go to both."
Basically I'm psyching myself out, I think.
Here's what I've got so far.

Please ignore the MSPaintyness of the whole thing. I don't have photoshop or anything better on this machine.
Since our company does a lot of dealing with grocery stores, I've been thinking of this diagram as parts of a grocery store chain...
Company: The parent company of a string of grocery stores. Ex: The company that owns all the HyVee's or Kroger's in an area.
Business: A business location owned by the parent company. Ex: One of the actual grocery store locations.
Everything else is kind of self-explainatory as to what they are. In the diagram, the ones marked with ??'s are the ones I'm really having difficulties thinking about...
Jobs: I don't know if this should be a class separate from Employee or not, or if it should be Employee's parent or what. It's just kind of there right now.
Payroll: I don't know if this should be straight under employee, or a child of the accounting class or just separate on it's own.
Vendor: I don't know if I should include this under inventory or not. Since most of our clients are restaurants at the moment, all their food inventory would come from these vendors. On the other hand, using that same logic, inventory could fall under Accounting.
What's even more tragic, is that the harder I think about those troublesome classes, the more I start to thinking "well, maybe everything should be under accounting".
So really I could just use a little direction in how I should organize everything, b/c I'm getting in my own way on this one, and a fresh pair of eyes could really help me out.
Thanks!
This isn't strictly a PHP question, but since I'll be doing all my work in PHP on this project, and you are all so super duper smart, I thought I'd ask here.
I just started working for a small company as a PHP programmer, and my boss has given me the go ahead to draw up a proposal that would entail revamping part of our software. I'm taking the time to try and draw up how everythin fits together so if/when he gives the go ahead on this, we'll have a clear cut map of how everything settles together.
Unfortuantely, I'm having a hard conceptualizing my class structure, and getting each part in such a way so that it extends the "proper" parent.
Here are the main portions that need to be organized up.
Company, Business, Inventory, Jobs, Payroll, Timeclock, Recipes, Menu, Loyalty, Vendors, AP, AR, Purchasing.
I've got a good idea of how I'd like everything to be organized, but I'm running into some garbage in my own head where I can see item A inheriting from item B OR item C, and since PHP doesn't handle multi-inheritance, I can't just say "oh, yeah, you'll go to both."
Basically I'm psyching myself out, I think.
Here's what I've got so far.
Please ignore the MSPaintyness of the whole thing. I don't have photoshop or anything better on this machine.
Since our company does a lot of dealing with grocery stores, I've been thinking of this diagram as parts of a grocery store chain...
Company: The parent company of a string of grocery stores. Ex: The company that owns all the HyVee's or Kroger's in an area.
Business: A business location owned by the parent company. Ex: One of the actual grocery store locations.
Everything else is kind of self-explainatory as to what they are. In the diagram, the ones marked with ??'s are the ones I'm really having difficulties thinking about...
Jobs: I don't know if this should be a class separate from Employee or not, or if it should be Employee's parent or what. It's just kind of there right now.
Payroll: I don't know if this should be straight under employee, or a child of the accounting class or just separate on it's own.
Vendor: I don't know if I should include this under inventory or not. Since most of our clients are restaurants at the moment, all their food inventory would come from these vendors. On the other hand, using that same logic, inventory could fall under Accounting.
What's even more tragic, is that the harder I think about those troublesome classes, the more I start to thinking "well, maybe everything should be under accounting".
So really I could just use a little direction in how I should organize everything, b/c I'm getting in my own way on this one, and a fresh pair of eyes could really help me out.
Thanks!
