Is it possible to convert a WinForm to a WebForm in .NET?

前端 未结 5 1750
情深已故
情深已故 2020-12-10 15:58

I didn\'t think it was possible but I was just talking to a co-worker who said she had done it before. Is she pulling my chain?

5条回答
  •  忘掉有多难
    2020-12-10 16:39

    Converting a desktop application to a web application has several challenges:

    • Access to hardware
    • Windows API calls
    • Management of the application state
    • Access to the file system
    • Access control
    • Use of desktop-specific UI/UX/controls

    There are options to convert desktop applications in an automated way, these can convert both the UI and the code of the application:

    • http://www.codeproject.com/Articles/9307/Converting-WinForms-Web-Forms-using-CodeDom
    • http://visualwebgui.com/
    • http://www.mobilize.net/webmap2

    Even when using automated migration tools, in most of the cases you will have to perform a significant amount of manual work to get the application working in the same way as the original one.

    Some of these tools will help with different objectives, the first one will help you convert only the UI and to WebForms, the last two ones will generate ASP.NET MVC, one using a custom runtime and set of libraries and the other with common HTML/JS/CSS libraries such as Kendo MVVM, Kendo UI, AngularJS or Bootstrap among others. These tools will provide a solution that will be faster than writing the application in the web from scratch and will provide solutions or at least guidelines to approach the challenges mentioned before. However, there will be some differences from an application that was designed for the Web, simply because the architectures are different and usually the way of writing the code for a desktop application assumes thing that cannot be assumed for a web one.

    Disclaimer: I work for Mobilize.Net, who built WebMAP2.

提交回复
热议问题