We have a client for whom we've designed a web application with a corresponding database backend. Web app is written in .NET 4.5, DB is SQL Server 2014 running off Windows Azure.
The web app is your usual interface for managing data, with pages to display, access, and manipulate that data.
We now have another client who is interested in our product, however, has their own specifications for the same general functionalities, with some overlap.
I'm in the process of trying to decide how best to approach this question from a design perspective. As I see it, I have two options:
A) The first option of course, is to write a brand new solution for the new client. I can take much of the existing code, and then adapt the remainder to fit, along with the database backend.
B) The second option is the one that I'm here to ask about. Essentially, as I see it, there are three major modifications I need to make: to the dashboard display of the data, to the visualization of the full spectrum of data for a specific functionality, and to the page where this data can be modified. The way I'm considering doing this is as follows:
For the dashboard, I'll be using a stored proc with a SELECT statement. The WHERE filters will be the same, the only difference will be the columns returned through the FROM clause. So, I'm thinking of having a second table, which will just have the column names and a flag for visible. In the .NET code, I'll loop through all the columns returned by the SELECT statement, and compare them with the records returned by a query on that second table, and set the visibility accordingly.
For the visualization, I'll have a similar setup, except instead of table columns being hidden, itt'l be .NET controls. So same argument, for the given page, I'll have records in a table that return whether a given control is visible or not.
Finally, for the modification page, I'll use the same setup as for the visualization, except that the UPDATE procedure will have inputs for all the table columns, and only those which are relevant for the particular client's configuration will be used.
The last part of this configuration will be having separate CSS pages for the visual display, but that's not really too big of a concern.
The concern I have with this approach is whether this will scale well or not, as we add more clients with their own specifications. What I want to avoid is having a nightmare of a code mess to deal with in the future.
For anyone who has had similar issues, have you any comments on my proposed idea? Any better ways of handling this?