0

I am currently working on a project for my employer to update the existing warehouse management system from a desktop application to a web application. After some thorough research, I had concluded to use ASP.NET for its familiarity and use of the .NET framework. The existing program is written in C#. I am currently programming the update in ASP.NET with C#. My question is is it possible to just use the existing written C# code in the update, keeping same functionality? I understand their may be some rewriting of syntax to fit with current standards. Any information would be most helpful.

3
  • Yes/no. If the existing project is high quality code you can leave the domain and data layer untouched and just rewrite the view layer and io layer to use a browser and http respectively. If the existing project is mediocre rewrite it entirely. Sidenote: avoid asp.net webforms and use asp.net mvc Commented Dec 5, 2011 at 3:37
  • As pointed out below, it is quite possible. You may find that the existing code doesn't really handle running as a library however. It all depends upon the original application's design. Commented Dec 5, 2011 at 3:40
  • So for a program such as this what do you guys recommend, forms or MVC? Commented Dec 5, 2011 at 14:55

4 Answers 4

2

Yes, it is.

ASP.Net is just a (very large) C# library.

However, the code will need to be UI-independent and somewhat thread-safe.

Sign up to request clarification or add additional context in comments.

Comments

1

Most certainly, you should be able to leverage some, most or all of the functionality. But very likely, you'll have to restructure the code so that it can be used as a library. More importantly, you can't really do this restructuring (refactoring) without some "safety-net" -- unit tests serve that purpose.

But yes, it can be done.

Comments

1

Yes it might be possible, but it really depends on how its written, it's quite possible that the web style lifecycle won't suit the current design.

Fundamentally though, existing C# code can be used. If you have the source, then just package it up into a library. If it's really intermixed with windows code, then its going to be a bit more painful, eg, if it pops up message boxes etc.

Comments

1

The aspx file has a backend cs file which contains the server side code. Your existing c# code can go here and the logic will be same. You will have to restructure it though.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.