IntroductionPorting existing WinForms, WPF, and Mac desktop applications to the Web used to be very hard and expensive. Because of the difficulties involved in the porting process, most of the existing desktop applications never make it to the Web.
The ones that are successfully ported, are often completely rewritten, which often makes the desktop version obsolete or poses additional efforts for its long-term support.
In this article, we examine the different approaches a company may choose to port its existing applications to the Web. We also present the Blazor-WebAssembly and Nevron Open Vision
for .NET (NOV) as a viable solution for porting existing WinForms, WPF, and Mac desktop applications to the Web. The proposed porting solution retains a fully-functional desktop version, produces a feature-rich Web version, and
leverages the current qualification of your existing team - while at the same time keeping a low porting cost and risk.
| ||||||||||||
Used TechnologiesBefore we examine the different porting approaches, let's first introduce the involved technologies that are mentioned in the article. 3-tier Application Architecture (DataBase, Application, UI) The three-tier Application Architecture organizes the application into three logical and physical computing tiers:
Blazor - WebAssembly Blazor – WebAssembly is a Microsoft technology that lets you run C# code on the client side (i.e. inside the Web Browser). To do so it relies on WebAssembly, which is a W3C standard and is supported by all major browsers (Google Chrome, Microsoft Edge (formerly Internet Explorer), Mozilla Firefox, and Apple's Safari). Blazor – WebAssembly also makes it possible to call JavaScript code from your C# code and vice versa - which is how Blazor – WebAssembly communicates with the browser. Nevron Open Vision for .NET (NOV) Nevron Open Vision for .NET (NOV) is a Nevron Software LLC technology that allows you to develop cross-platform User Interfaces that can operate inside various Microsoft UI technologies like WinForms, WPF, Mac and Blazor WebAssembly. WinForms Windows Forms (WinForms) is a UI framework for building Windows desktop applications. It is a .NET wrapper over Windows user interface libraries, such as User32 and GDI+. It also offers controls and other functionality that is unique to Windows Forms. WPF Windows Presentation Foundation (WPF) is a UI framework for building Windows desktop applications. WPF supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding and documents. WPF uses the Extensible Application Markup Language (XAML) to provide a declarative model for application programming. Mac Xamarin lets you develop fully native Mac apps in C# and .NET using the very same macOS APIs as you would for Objective-C or Swift projects. You can either create your user interfaces directly in C# code, or, thanks to Xamarin's direct integration with Xcode, you can use Xcode's Interface Builder. | ||||||||||||
Approaches for Porting Existing WinForm, WPF and Mac applications to the WebComplete Rewrite to JavaScript/HTMLBefore the introduction of WebAssembly, this used to be the only possible porting option. It involves a complete rewrite of the existing C# code to JavaScript (Application Tier) and a complete rewrite of the Presentation Tier to an HTML-based UI. The following table outlines the pros and cons of this approach:
Usually, this approach is the most expensive option and is only suitable for applications that do not need to continue to exist as desktop applications. It is a very high-risk approach that usually involves the hiring of a new Web development team and usually a complete company restructuring. Hybrid Approach (with Blazor-WebAssembly)With the introduction of Blazor WebAssembly, you can now run C# inside the browser. This is a significant advance in web technology as it allows for code reuse of non-UI .NET libraries in Desktop and Web applications. The Presentation Tier is also possible to be developed in pure C#, but it must be completely rewritten, because the new UI needs to be HTML based. The following table outlines the pros and cons of this approach:
Cross-Platform Approach (with Blazor-WebAssembly and NOV)Blazor WebAssembly made it possible for NOV to run inside the browser. Desktop Applications that used NOV for their user interface can now simply be recompiled for the Web. If your existing application is not based on NOV, but uses some other 3rd party or native UI controls, you must simply migrate your existing Presentation Tier to NOV. This should not be that hard, because NOV includes almost all the UI controls your application may need, such as 70+ widgets (Ribbon, Dockable Command Bars, Buttons, TextBox, CheckBox, DateTime Picker, etc.), Grid, Chart, Scheduler, Gauge, Diagram, Rich Text Editor, etc. The biggest benefit of using NOV is that your application instantly becomes available not only as a web application but also becomes available on other operating systems (such as macOS, if it was only available to Windows previously).
Probably the biggest benefit of this approach is that it is gradual – you are developing your Web application when migrating specific parts of your application UI to NOV. Another notable benefit is that your developers need to know nothing about Web Development, so you can use your existing team to develop your Web and Desktop application versions. The Cross-Platform approach is the approach that we took in developing the MyDraw application. MyDraw has Windows, macOS, and Web versions that all run from a single code-base and are developed by the same team. The MyDraw team only has to focus on the product and not on the details of running the product in Windows, macOS, or Web browsers. | ||||||||||||
ConclusionsFrom our observations, the Cross-Platform approach is the best for products that need to continue to exist as both Web and Desktop solutions, followed by the Hybrid approach for companies with more resources.
The Complete Rewrite to JS/HTML Approach is only suitable for applications that do not need to support a desktop version or need to support older browsers.
| ||||||||||||
About Nevron SoftwareFounded in 1998, Nevron Software is a component vendor specialized in the development of premium presentation layer solutions for .NET based technologies.
Today Nevron has established itself as the trusted partner worldwide for use in .NET LOB applications, SharePoint portals and Reporting solutions.
Nevron technology is used by many Fortune 500 companies, large financial institutions, global IT consultancies, academic institutions, governments and non-profits.
For more information, visit: www.nevron.com. |
We use cookies to allow us to automate the access and the data entry functions of our website and to correlate online ordering information for purchases you may make while at the website (if any), tailor our website to your preferences or interests, or customize promotions or marketing. For full details read our cookie policy.