Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi,

For my company, I have developed one winform application, that handles Unified COmmunication.
It's been 1 year in development. I Just write global functions in seperate classes, and write the code in either form or class. Now They wanted me to make three seperate copies(UI of each changed) of the same Software. I have changed all UI and everything needed, and made 3 copies. But now, I feel it very difficult to correct any issues, or add any features. I have to change it in my all three copies. How can I solve this. Thanks.
Posted
Comments
Sergey Alexandrovich Kryukov 22-Jun-14 1:22am    
It is not just bad, it is 100% unacceptable.
—SA

Start again, and design it using OOPs principles instead.
It sounds from your description that what you have created is a monolithic application using the C# language instead of a "proper" C# app. And it is very unlikely that you can easily adapt that, as you have seen - that is partly why OOPs was developed and promoted: in encourages modularity and independence rather than the monolithic approach which tends to encourage spaghetti.

Sorry, but if that's what you produced, then that's your bed: you will have to lie on it or bite the bullet and redesign from scratch.
 
Share this answer
 
You must use Layers to have common code in separate places and refer the same every time whenever needed. We must follow DRY (Do Not Repeat Yourself) principal as described here:
http://en.wikipedia.org/wiki/Don't_repeat_yourself

In your case they asked to keep different copies, just because UI is different for those. In this case we may have layers like below:

UI (User Interface) Layer: 4 WinForm Projects for Common UI Controls , Specific UI 1, Specific UI 2, Specific UI 3. All specific projects will have reference of common UI and BL Layer.

Business Logic Layer: Class Library Project: Having all business domain classes.

Data Access Layer: Class Library Project: Having all classes related to data access.

You can have service layer also if needed, above is just general suggestion as I am not aware about exact scenario, so visit below links and take a informed decision:

http://fewagainstmany.com/blog/introduction-to-layered-architecture-part-one
http://en.wikipedia.org/wiki/Software_architecture
http://shareimppoints.wordpress.com/2013/03/05/what-is-3-tiermulti-tier-architecture-and-why-do-you-need-it/[^]

In case of any further query, you are most welcome.
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900