So, I'm working on an e-commerce application, and my client wants to create categories and products ... obviously. Now, say, a customer will have about 100 categories and 20,000 products.
The client needs the ability to create category properties that make sense for filtering .... so in the category of hard drives there may be such properties as:
While the category Projectors may have properties such as:
- Brightness
- Contrast
- Native permission
My question is how to solve the problem of resolving dynamic properties of custom properties, but the ability to use these properties to search, filter and send reports?
Creating a separate table and object for each category is impossible, since I have no idea which categories they will create (i.e. HardDriveProperties, ProjectorProperties).
I thought that maybe I could create an extra column in the database and serialize the custom properties as JSON, but that would still require me to create a specific property object for each category to deserialize the JSON or the general ProductProperties list .... which, I think it can be quite expensive to work.
How do others solve this problem?
source share