How to handle many different parts?

Topics: General, Writing modules
Dec 29, 2012 at 11:03 PM

Hello,

I'm struggling with an architectural problem and any advice would be appreciated a lot.

Just like most commerce websites, I have Products and ProductBundles. I've seen the same concept in Nwazet.Commerce and how it's done in Orchard. But the problem is that my products have many different properties and characteristics. I have more than 60 type of products like ADSL, PhoneNumber, Onlinebackup, SqlServer,... which could be bundeld in a ProductBundle.

In inheritance world, I could say that I have a Product class and 60 subclasses which inherit from it. But I know that Orchard prefers composition over inheritance. So I should think of parts instead of subclasses. But does this means that I have to build 60 different parts and create 60 database tables for their records?

What is the proper way of doing this?

Regards

Jan 4, 2013 at 8:37 PM
Edited Jan 4, 2013 at 8:38 PM

Hi Cyberdude,

What about creating your 60 types of products as Content Types then, use a Query to get all of the Content Types you just created?

This is just my two cents.

 

Regards,

Frédérick