General .NETFor general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.††If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category.
** PLEASE BE SPECIFIC WITH YOUR QUESTION **
When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
Help me to take a decision. I have a running application. Now we want to have the application for one more location. There will be some minor changes in the application for the new location. changes are there in the presenation (Some page may need additional control), content and the business rules. Overall I can say some 25% difference will be there between the 2 application. How should I approach ? should I replicate the application to a different server and make the changes or use the same application with parameters ? Considereing the future maintance and enhancement , which will be the good approach ? Any links which talks about this ?
I would recommend you to use some sort of setting from a configuration file (web.config for web apps and app.config for windows apps). Read this setting when the application loads up and the use it all over the application to do different things. That way, you maintain the same code base ... an the behaviour of the application is also easily configurable (by editing the setting in the config file - which is an xml file).
The only problem with doing that is if the application is distributed to others- meaning it's at the client site- they could change a simple file to get functions they did not pay for- that is, if it is distributed.
configuration file is fine. But what I am concerned is, I have to do a lot of If else statement in the application. Won't this make the application a little complex and dirty ? Or is there anyother better way other than if..else ? I want to have the application to enhanced without much difficuilty also.
P.S my changes in the behaviour has nothing to with the culture or language.
Welcome to the mean and dirty world of application customization!
Unfortunately, depending on what kinds of things you need to customize, you have to write a lot of conditions. I work with applications that are heavily customized and I find that probably 60% of the code in the application is simply for the customization and only 40% is actually *doing* something. That's the nature of the beast.
As Hal mentioned, if this is a distributed application you might want to avoid the use of simple-to-modify setting. An option could be to have some kind of flag/setting that is embedded into the application code so you can do a customized build of the app in a way that a user couldn't change it.
One piece of advice I will give: Work with a single application that is built to handle customization. It might be a little harder at first, but when you start having to add features or fix bugs, it's MUCH easier to manage in a single (though more complex) application.
You are going to have to program something to perform customization. Either you use some simple logic, or you have to delve into something far more complex (which will still be implementing some kind of conditional logic).