Switching from a Windows Form to a Web Form

I created a Windows Form executable in .NET 3.5 that uses a DLL to communicate with a machine that scans validations. Ultimately, I will need to switch from an executable to a web form that can do the same. It will be in a few months, but I wanted to start doing research now, since I did not do it before. I will need to use ActiveX to communicate with the device through a web form. I also have not done this before.

I would like to preserve the functionality of my existing executable without rewriting most of it, although I understand that some of them will need to be rewritten. I did an ActiveX study and how to use it, but I wanted to know if anyone had a similar situation. What did you do to convert exe to web program? Are there any good, specific sources that I skip that can point me in the right direction for this situation? Is there any advice you can give from your experience that can help me reduce errors? The company I work for has no one else who has done this before, so I must teach myself everything that is needed for this.

Thanks in advance.

+6
c # activex
source share
4 answers

This divides the separation of concerns and n-level design. We hope your UI level is loosely coupled to your domain model. If so, you can encode the second layer of IU for the Internet. And you do not need to change the model of your domain. Then you can compile for each scenario.

* note - In practical use, I always had to expand my business domain to take into account some problems with the second user interface, but these changes were usually insignificant and indicated the places where I connected too much.


Another option you may consider is to create a web services layer above your business domain code. And then coding a web application that interacts with your domain model through these web service calls. This can have performance implications and will not be my preferred method of achieving this. Although you may find it more manageable if you don't have a well-designed application to start with.

+5
source share

"I would like to keep the functionality of my existing executable without overwriting most of it."

In general, if you extract as much logic as possible into your own / dll assembly, you can reuse this from any user interface infrastructure you want. Just make sure that you are not doing anything in the user interface (drop down dialog boxes, etc.).

+1
source share

Converting winforms to webforms is usually possible, although it is usually a slow development process. Even if you have the cleanest domain in the world, the fact that objects on your web page are thrown away every time means that the web domain level is usually written completely differently at the desktop domain level.

However, in your case, the connection between the device and the server will be more difficult.

Have you looked at xbap? This is basically a way to deploy WPF applications on a web page. This requires your clients to have the correct version of .NET, but it will be the easiest way for you, especially considering that you can host winforms in WPF ...

0
source share

You can take a look at Silverlight 4,

http://silverlight.net/getstarted/silverlight-4-beta/

It contains many features that ASP.NET Web Forms does not have.

If your team can accept something like ActiveX, why not Silverlight 4? The only downside is that SL4 is still in beta.

0
source share

All Articles