I would like to create an ERP website which can serve with difference companies. The website will have the following functionality
- Product Listing & Product Detail
- Shopping Cart & Online Payment
- Shipping Address & Delivery Tracking Status
- Sales Order, Purchase Order & Invoice Listing
- Login with different roles e.g. Sales Representative, Customer and Administrator
It is an ERP website (B2C and B2B) and it is used by difference companies and vendors.
Developed using Angular, ASP.NET Core Web API and SQL Server.
For example, each companies will have slightly difference in the product listing page.
Approach #1: ProductListing.aspx
contains many if-then-else statement to serve for difference companies in the same page
if CompanyA then
do something
if CompanyB then
do something
if CompanyC then
do something
Approach #2: duplicated the codes with difference files, it aims for separate difference business rule and logic
ProductListing_CompanyA.aspx
ProductListing_CompanyB.aspx
ProductListing_CompanyC.aspx
Approach #3: ProductListing.aspx
but include/embedded difference components and each components will contains difference business rule and logic of the companies. But if-then-else statement still appear everywhere in the page.
Which way is the best to solve out this case ? Example 1, 2 or 3 ? or have you got any other better way to do it ? Thanks !
Peter is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.