Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
| Search | Today's Posts | Mark Forums Read
General .NET For 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 17th, 2004, 05:27 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Single or Multiple application.

Hi..

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 ?

Thanks,
Gibs.

  #2 (permalink)  
Old May 17th, 2004, 03:34 PM
Registered User
 
Join Date: May 2004
Location: , , USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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).

Hope that was helpful.

Manish Jadhav


  #3 (permalink)  
Old May 17th, 2004, 03:44 PM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

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.


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
  #4 (permalink)  
Old May 17th, 2004, 10:27 PM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

  #5 (permalink)  
Old May 19th, 2004, 10:48 AM
Registered User
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What kind of If..Else test are you doing?
Does these test need Config file values?

Can you send a sample code

Jonathan
jlarouche@dev-id.com

  #6 (permalink)  
Old May 23rd, 2004, 07:24 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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.

Peter
-------------------------
Work smarter, not harder
  #7 (permalink)  
Old May 25th, 2004, 03:05 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok this is one e. g.

Suppose there is a function calculate Tax,
For region A, Info field has 3 subfields, A,B, C
A and B can be collected in a TextBox, C can be collected in a dropdown.

For region B, Info field has 1 subfields, A. This can be collected in a checkbox.

For region C, Info field has 2 subfields, A, B. This can be collected in a checkbox and a TextBox.

How can we show this behavior without having an if. else block ?

Only some pages have these kind of difference in UI




  #8 (permalink)  
Old May 25th, 2004, 07:54 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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).


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple views of single table jatatman ASP.NET 3.5 Basics 1 June 2nd, 2008 01:34 AM
Representing multiple items with a single value? Donny Bahama Classic ASP Professional 1 January 16th, 2006 09:32 PM
multiple selects -single where clause collie SQL Server 2000 3 January 21st, 2005 01:27 AM
ASP.Net Single Single-on with Oracle Application S guhanath Oracle 0 October 6th, 2004 05:05 AM
Multiple domains on a single IP qazi_nomi Classic ASP Basics 24 September 22nd, 2004 06:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.