Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4079710
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:50:12+00:00 2026-05-20T17:50:12+00:00

I’m maintaining an application that was copy-pasted for each new customer ( …yeah, I

  • 0

I’m maintaining an application that was copy-pasted for each new customer (…yeah, I know). If a new customer wanted some new functions which the others didn’t need, only his code part was changed. The Solution also includes a sort of “common.dll” where all code is put that is the same for all customers.

The underlying MSSQL database for each customer is slightly different. All have more or less the same tables but some customers have for example additional columns or new tables for the custom specific functions.

As “typed datasets” (ADO.NET C# 2.0) are used in the Visual Studio solution for each customer there is always a specific solution (file) and in it a specific typed dataset (eg. “XyDataSet.xsd”). In the solutions I have helper classes eg. for handling orders. One of the methods in this class could be “GetOrder(string orderId)” which uses the customer specific DataSet to retrive an order (as typed DataRow).

As you see I have “GetOrder” methods in each solution for each customer as there might be little differences in the order table like maybe additional columns. So if a change is needed to the general “GetOrder” functionality I have to change it in all projects which is of course a maintenance nightmare.

Do anybody of you see a way in which this “architecture” could be improved? Or maybe with the currently underlying different DB schemes there isn’t much to improve in the higher application level?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T17:50:12+00:00Added an answer on May 20, 2026 at 5:50 pm

    It is very difficult to answer this question completely, but I would start thinking this way:

    Database level:

    • Find what is common and have that as a database schema.
    • Find what is addition and have that in separate tables, indicating in that table which (from common schema) is the owner of the row and its corresponding value. e.g.

      Orders {OrderID, CustomerID, etc.} (this is owner table)
      OrderExtensions {ExtensionID, ExtensionName, ExtensionValue} (this is extension table for Orders)
      OrderExtensionsToCustomers {CustomerID, ExtensionID} (this shows which extension is available for which customer)

    Data-access-layer level:

    • Database level design should be implemented here.

    Domain-model layer level:

    • Some manipulations with features (for UI layer) should move to here.

    UI layer level:

    • From here something should be moved to database layer, e.g. UI elements which appear only for some customers, think of them as a “feature” (extension) activated for specific customers only, so they are visible only for them.
    • Personally I would go farther by abstracting the “feature” term, making it loadable dynamically. This is achievable easily if you are comfortable with using reflection. If this can be achieved, then it will give you the privilege of having a little code in domain layer – not all the code for all customers put together, but loaded dynamically for specific customer upon request when needed.

    Final picture:

    • Customer accesses the UI interface, in fact the specific page.
    • Database queried for UI features available for the current customer (e.g. additional buttons, etc.).
    • Database returns definitions of each feature for the customer.
    • Each feature is loaded dynamically and added to the page (e.g. to the special placeholders for features).
    • When feature needs to act, it passes the request to the domain layer, which in turn loads the “processor” part for the feature, maybe also dynamically, or just finds the implementation which feature needs to call.
    • Call is routed to the database and the common information gets saved to common (owner) tables, while additional (extension) information is saved to other (extension) tables.

    I know it is a long answer, but I hope this makes sense 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.