I may not have my terms right here, so please edit for clarity.
Let's say I have code for running a online shop that has a number of different classes/objects associated with it (Order, Customer, Product etc)
Then, I have particular stores, like a Shoe Store and a Pencil Shop, and each implements different aspects of the Base Store.
In an MVC pattern, how do I design an app so that I don't have write a subclass for each object for each type of store? (This would quickly get unwieldy if I had many stores).
For instance, given these modes:
models/baseOrders.file
models/baseCustomers.file
models/baseProducts.file
models/shoeStoreOrders.file (extends baseOrders)
models/pencilShopCustomers.file (extends baseCustomers)
Then I'd like to be able to instantiate an orders model, using shoeStoreModel.file when it's the shoe store and baseOrders when it's the pencil store...
Hopefully this is a clear question, but maybe I'm thinking about this incorrectly altogether... Guidance please!!! Thanks in advance...