WebMAP version 4.0 represents a tremendous effort by our development team over the last 12 months to make WebMAP even better, using over 1M lines of actual customer code to identify areas of improvement. The number 1 goal was increased automation to reduce the amount of post-migration work that is necessary moving from C#/.NET to web (using either KendoUI or AngularJS and Bootstrap). These transformations are HARD, as I've pointed out in other blogs. Many things you can do easily on the desktop just don't have good equivalents in a web architecture. For example, one hard problem was handling modal operations like dialog boxes (these become very different in a browser world where the user has a "Back" button).
Our three primary improvements with this release:
- Increased automation
- Improved app performance
- More maintainable generated code.
There are a lot of very granular improvements here, from simple support for more of the .NET API surface area to C# language issues. Here are the biggest improvements:
- Support for asynch (ie modal) operations via serialized lamdas
- Support for controls from Component One and Microsoft
- Support for form lifecycle events (create, activate, destroy)
- Support for DataSet and DataTable binding
- Automatic generation of UserControl widgets on HTML pages
- Improved handling of persistent C# objects
- Roslyn integration for improved object typing.
Improved application performance
The two big areas of improvement here involve initial app start up (ie load time) before user input can be accepted, and responsiveness to user events (ie form submittal). Here we benefit from having a consulting services organization internally that actually uses our own tools on large, real-world customer applications. Rather than work from purely theoretical patterns we get to throw the tools at customer code, see where things can be improved, and put those improvements back into the tools.
In the case of performance, we found with a customer project that large, complex viewmodels created extremely long messages between the client and server, partially from the algorithm we used to serialize the data and partly from the way we identified individual sessions. Optimizing all that has dramatically reduced the reponsiveness of the app on the clients side. On the server side, we made a number of optimizations including how much metadata we create, the way we handle surrogates and collections, and some improvements to the MVC architecture. All this adds up to both client-side and server-side improvements, particularly with big, rich applications.
How big an improvement? Of course, it varies depending on the app, the code behind an event, etc. But internal testing of populating a large grid (20k records) from a data source--a typical performance hog in any application--sped up by orders of magnitude, measuring the delta between WebMAP 3.0 code and WebMAP 4.0 code.
|Test||WebMAP 3 (KB)||WebMAP 4 (KB)||WebMAP 3 (mSec)||WebMAP 4 (mSec)||Size Reduction||Time Reduction|
|Button Click||2,100,000||(cache fetch)||5520||2||N/A||99.96%|
You can see from the table above that some serious performance gains have been achieved. In the first example, the button click was serializing a lot of information (much of it redundant) and required over 2 seconds for a round trip. By selectively caching instead we were able to speed up the process from 5 seconds to 2 milliseconds. Similarly with the request to fetch data to populate the grid (19k items), we reduced the amount of net traffic and the round trip time to an imperceptible amount (3.4 seconds to 152 milliseconds). The third test was loading a form with the grid in a new window.
When you migrate with WebMAP we keep your business logic intact, wrapping it in the MVC pattern. Our C# source-code helper classes make it possible to keep your familiar code intact and still bring a modern web application architecture without using plugins or runtimes. As we've increased our automation these helper classes have gotten richer and more complex, so we bit the bullet and rewrote them for this release. You'll find them easier to follow and understand (helpful when debugging or enhancing your code), and perhaps most importantly we have decoupled the client-side JS frameworks (currently Angular or Kendo) from the core classes. This means at some future point you could replace the existing JS framework with something different, like React or Knockout.
Try it yourself
You can check out WebMAP 4.0 here and assess/migrate your own app (no size limit). It needs to be C# with Winforms (we currently don't support WPF). If you have something different (VB.NET, PowerBulder, Silverlight, etc) drop me a line and I'll hook you up with one of our engineers to walk you through a potential migration to HTML.