I have a VBA utility that connects to a SQL database that I am changing to vb.net.
I want to make proper use of the Object Orientated Programming and have some Questions about Classes.
I have gone through a couple of Tutorials.
I think I understand the Very Basics of OOP.
I also read somewhere that many programmers that have come from a Database (SQL) background fall into a trap of making a Class for each table (I Don't want to fall into that.)
OK - Some Examples
I have 3 sorts of Companies
I have come up with the Following class structure
Looks OK (Well I thought so :))
But from one part of the application (1/3 of the searching) we will be searching on the Combined Companies ie when the user searches then the application will need to search Debtors, Creditors and Prospects in one go.
What is the Best way to tackle this? One "Super" Class? or is there another way?
Products are a Class on their own but what about Suppliers Records?
Product A is one record but there are 6 different suppliers linked to Product A
Are all the Products and the Suppliers one Class?
Or a Separate Class for Products and the associated Supplier Info?
Also with the Products there are different Warehouses and Bin Locations - Are these separate Classes or Bundled in the One Product Class?
Note there are an Unlimited number of Suppliers and Bin Locations for each Product.
Any Help and Advise would be much Appreciated as I want to start it the best way.