简体   繁体   中英

How to migrate winform application to web apsx

everyone, maybe on many occasions you have come across someone who has many winforms applications developed in visual studio. Well, in my case, I have a fairly complete system made in a winforms environment and I need to transfer it to the web since a client changed his entire team to use mac. Someone has a recommendation because I would not like to have to start from scratch to reprogram everything. I also did not bother the customer by asking him to install virtual machines.

In advance, thanks for any suggestions

Converting Winforms to ASPX aka Webforms? Probably not a good idea: Webforms is discontinued. I would prefer Blazor, that is built on ASP.net Core. With outstanding interface performances.

You don't have much of a choice. this really comes down to two systems having VAST different architectures.

Even on the desktop? You can no more convert a complex FoxPro application to vb.net. Or convert a ms-access system to FoxPro. They all would have been built from the ground up with 100's, if not 1000's of little design choices based on the given tool set.

This is kind of like the difference between a car, and say a airplane. They are both machines for transportation. But even things like the seats. One (the car) might have big comfortable seats - power assisted tilt etc. The goal is comfort, and total over all space and weight of that seat is not all that huge of a design goal.

Now, take the design for a seat in the airplane. It has to be lighter, thinner, probably use more fireproof materials. So 100's if not 1000's of SMALL design choices along the way will result in a seat for that car, or the plane.

It just a seat, right? So, since the architecture between the desktop and the web is much like the difference between a car and a helicopter? then little of the 100's if not 1000's of design criteria you used to create that desktop application simply will not apply, and thus the work can't be salvaged.

However, if you had used WPF in place of win forms for the desktop application? Then you can salvage a LOT more, since both the web application and the desktop application will have "mark-up" used to create the form/display in question.

In fact, this is one reason developers will choose WPF over winforms. (it allows easier migration to the web). And for those coming from web development? They will find WPF forms and layout VERY similar to how they do web development.

And the other reason of course is now with css, HTML5 and a whole bunch of other new things for the web? Well, then web developers actually have MORE UI choices then the desktop now., So. WFP is an attempt to leverage many/much of the web based new technologies into desktop development? So while winforms don't support a graphics in a button. WPF does support this - so does the web.

But, ask any WPF developer? The cost + time for WPF desktop applications is a LOT more work. And so is creating web based. Some claim they can develop just as fast with WPF applications for the desktop - that's not what I seen - and NOT even close,, You find for the web. as much as 2 times, and often 3-5 times the cost compared to desktop.

Now to take a huge application and re-write because of a few Mac's? Well, that is crazy. You would setup terminal services, and have those Mac use remote desktop to run that application. Thus, the Mac's don't need VM's or anything.

But, there is no automated conversion system, and like parts, sets and doors from a car? They don't work nor fit on a helicopter. Too much difference of a architecture is at play here.

I guess this would depend on the size, scope and estimated cost of the existing application. But to allow workers at home (remote), people on the road, and that of allowing Macs to use that software? I don't see why terminal services is not a solution - and that can be setup in less then 1 day as opposed to a whole re-write of the given application (to run on a few Macs? - doubt that can justify a re-write).

If you're asking how to take the code you wrote over the years to create Winform-based, rich user experiences and adapt it for the web, then you will be disappointed.

The best you can hope for is to have such a clean separation of concerns in your existing app that it would allow you to salvage all code that's not UI dependent and use it in the backend of a whole new application. Everything else will have to be rewritten from scratch.

If your client still wants to use your Winform-based app in a Mac environment, he'll have to use a VM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM