LogoLogo
WinForms to WebPowerBuilder to .NETPowerBuilder to Java
  • WebMAP Documentation | Mobilize.Net
  • WinForms
    • Introduction
    • Getting Started
    • Conversion Process
    • Post-Conversion
    • Extend or Modify the Converted Application
      • NoWebMap Forms Winforms
        • How to add a new Form
        • Adding the created form to the migrated App
        • Interacting with the application data
        • Call the custom API
        • Interaction between the no webmap added Form and the WebMap components
      • Adding a component
      • Adding a component dynamically
      • Add a new control model
      • Switching CSS theme
      • Adding new window
      • Conversion Configuration
        • WebMAP configuration file
        • Stub Filter
      • Adding Non-WebMap Angular Forms
      • Adding FrontEnd Handler to a ToolStripMenuItem
      • Changing ToolStripButton icons
      • Adding new items to existing toolbar
      • Adding FrontEnd element properties and JS listeners
      • Adding FrontEnd output handlers
      • Access FrontEnd components
      • Create custom components based on existing WebMap Component
      • Override FrontEnd methods
    • Assessment Mode
    • Errors and Troubleshooting
      • How to resolve broken reference problems with VBUC
    • Portability
    • Glossary
    • Release Notes
    • Internal Demos
    • Known Issues
    • WinForms DCP
  • WebForms
    • Introduction
    • Overview
    • Desktop Compatibility Platform (DCP)
      • Pages and Master Pages
      • GridView and DataList data synchronization
      • HTTP objects
    • Post-Conversion
    • Extend or Modify the Converted Application
      • Adding FrontEnd validator
      • Adding Page
      • Adding MasterPage
    • Designer classes on WebForms Conversion Tool
    • Errors and Troubleshooting
      • How fix Solution when have been added website from filesystem without project file
    • Release Notes
  • PowerBuilder to .Net
    • Introduction
    • Getting Started
      • Conversion Tool
    • Desktop Compatibility Platform (DCP)
      • Data Manager
    • Reports
      • Report Rendering in Modernized Code
      • ReportWatcher Service Configuration
      • Data Manager to RDL Conversion
      • Reporting Service Internals
      • Troubleshooting
  • PowerBuilder to Java
    • Introduction
    • Getting started
    • Post-Conversion
      • Setup PBJava Environment
      • Architecture
      • App Start
    • Glossary
    • Errors
    • Glossary
    • FAQ
      • How to create a new Control
      • How to create a new Screen
      • What is the Mobilize.WebMAP.CoreServices.All?
      • What is the DesignerAttribute?
      • What is the InterceptedAttribute?
      • What is the InterceptedAttribute?
      • What is the ObservableAttribute?
      • What is the Mobilize.Weaving.WebMAPExtensions.All?
  • General
    • FrontEnd
      • Documentation
        • Webforms Angular Components
          • Web Components
            • Base Components
              • BaseValidator Component
            • KendoUI Components
              • CompareValidator
              • CustomValidator
              • RegularExpressionValidator
              • RequiredFieldValidator
              • ValidationSummary
          • Directives
          • AJAX Web Components
            • AjaxCalendar
            • AjaxModalPopupExtender
          • Ajax Interaction Services
        • Client Core
          • WebMap's Client Core
        • Angular Client
          • Introduction
          • WebMap Service
          • WebMap Interceptor Service
        • Base Components
          • Introduction
          • Components
            • Container
            • Control
            • ControlContainer
            • FormsContainer
            • Loading
            • Stub
        • Winforms Angular Components
          • Web Components
            • Base Components
              • Control Component
              • Form Container
              • Grid Component
              • Style
            • KendoUI Components
              • AdoDataControl
              • Button
              • C1TrueDBGrid
              • CheckBox
              • CheckedListBox
              • ComboBox
              • ContextMenuStrip
              • DataGridView
              • DataGridViewFlex
              • DateTimePicker
              • FileDialog
              • GroupBox
              • Label
              • ListBox
              • ListView
              • MaskedTextBox
              • MessageBox
              • NumericUpDown
              • Panel
              • PictureBox
              • PrintDialog
              • ProgressBar
              • RadioButton
              • RichTextBox
              • StatusStrip
              • Stup
              • TabControl
              • TabPage
              • TextBox
              • Timer
              • ToolStrip
              • TreeView
              • WebBrowser
              • Window
            • JQuery Web Components
          • WebMap FrontEnd Architecture
          • Migrated Structure
          • Setup
            • Front-End setup and compilation
            • Components Manual
            • Browser Support
            • Unit Test Manual
            • Development Process
            • Setup AOT/JIT Compilation
          • Decorators
            • Server Event
          • Conventions
            • Application Structure and NgModules
            • Coding
            • Components
            • Data Service
            • Directives
            • Lifecycle hooks
            • Names
            • Services
        • PowerBuilder Kendo Components
          • Base Components
            • base-component
            • column-control
            • controlcontainer
          • Data Manager Componets
            • base-data-manager
            • data-manager-control
            • data-manager-control-base
            • dw-checkbox
            • dw-column
            • dw-complexNumericMaskComponent
            • dw-compute
            • dw-date-time-edit-mask
            • dw-dropdowndatawindow
            • dw-edit
            • dw-edit-mask
            • dw-radio-button
            • dw-simple-numeric-edit-mask
            • dw-string-edit-mask
            • dw-time-edit-mask
          • Window Components
            • basemask
            • graphics
            • w-checkbox
            • w-command-button
            • w-complex-numeric-mask
            • w-date-time-edit-mask
            • w-dropdownlistbox
            • w-group-box
            • w-line
            • w-listbox
            • w-maskedtextbox
            • w-mdiclient
            • w-menu
            • w-multiline
            • w-picture
            • w-picture
            • w-radiobutton
            • w-rectangle
            • w-simple-numeric-edit-mask
            • w-single-line-edit
            • w-statictext
            • w-string-edit-mask
            • w-time-edit-mask
            • w-toolbar
            • w-toolbaritem
            • w-user-object
            • w-window
          • Services
            • DmInteractionService
          • DataManagerEvents
          • FocusManager guide
      • Api Documentation
        • WebMap Silverlight
        • WfNetC1Components
        • WebFormsComponents
      • Guides
        • Setup NPM package registry in the workspace
        • How to Setup WebMap Applications To Run Over SubDomains or WebApplications In IIS
        • Deploy several WebMap Apps in the same Server
        • Update to Angular 16
        • Appearance
          • How to change the CSS
          • How to override the style for a component
        • Component maintenance
          • How link WebMap package to the migrated Application
          • How to resolve broken reference problems with VBUC
          • How to test a local WebMap Components package
          • How to add a new component in a migrated application
          • How to update a component
          • Dynamic Control Support
          • How to add new set of component with a different provider
          • How to test your component in the playground
          • Tools
        • WMLogger
          • How to use the WMLogger's instance
          • How to change log's level
          • How to add log tags
        • Integration test
        • Setup WebMap Applications to Run Front-End And Back-End In Separates Sites
          • Setup WebMap Applications To Run Front-End And Back-End In Separates Sites in Production (IIS)
        • Setup Migrated WebMap Applications To Run Front-end & Back-end In Separates Sites (Only development)
        • Initial Set Up
          • Software to Install
          • Necessary Repositories
      • Errors
      • Version Notes
        • Client Core
        • Angular Client
        • Web Base Components
        • Winforms Angular Components
        • PowerBuilder Kendo Components
      • Licenses
        • Client Core
        • Angular Client
        • Base Components
        • PB Kendo Components
        • WFNet Kendo Components
        • WebForms Components
        • WFNet Access Components
        • WFNet Janus Components
        • WFNet C1 Components
        • Silverlight wms-framework
        • Silverlight i-components
    • BackEnd
      • WebMAP From Scratch
      • Setup
      • DCP: Desktop Compatibly Platform
        • Overview
        • Library Bundles
          • Bundle Library
            • Create an Observable Object
          • Bundle DTO
            • DTO: Data Transfer Objects
              • Creating a DTO
            • Mappers
              • Create Mappers
            • Observable Wrappers
              • Create an Observable Wrapper
            • API/Controllers
      • Architecture
      • Weaving on WebMAP
      • Glossary
      • FAQ
        • How to create a new Control
        • How to create a new Screen
        • What is the Mobilize.WebMAP.CoreServices.All?
        • What is the DesignerAttribute?
        • What is the InterceptedAttribute?
        • What is the Mobilize.Extensions.Logging.RollingFile?
        • What is the ObservableAttribute?
        • What is the Mobilize.Weaving.WebMAPExtensions.All?
      • Licenses
        • PBNet DCP
        • WebFormsDCP
        • WFNet DCP
        • CoreServices
        • CoreServicesCommon
    • Request and Response
  • SCALABILITY
    • Introduction
    • Microservices
    • Containerizing a WebMap .Net Application with Docker
    • Vertical scalability
Powered by GitBook
On this page
  • Compile and Run the Converted Application
  • Output Folder Contents
  • Converted Application Request and Response
  • Step 1: Send the Request
  • Step 2: Process the Request and Create Response
  • Step 3: Process the Response
  • Compile and Run the Converted Application
  • System Requirements
  • Step 1: How to Build the UI Code
  • Step 2: How to Build the Business Logic Code
  • Step 3: How to Run the Application

Was this helpful?

  1. WinForms

Post-Conversion

WebMAP: WinForms to Web is a tool designed to convert .NET Framework apps based on C# and Windows Forms to a modern web architecture. Post-Conversion documentation for WebMAP WinForms.

PreviousConversion ProcessNextExtend or Modify the Converted Application

Last updated 10 months ago

Was this helpful?

With a brand new WebMAP: WinForms to Web converted application, let's dive into the necessary steps to have your application up and running.

Compile and Run the Converted Application

Compiling and running your converted application is the highlight of the whole process, but before we get right into it, you need to make sure your computer compiles the following requirements.

System Requirements

Before you start running the converted you will need:

  • Node.js LTS ( or ).

  • Visual Studio 2022, .

    Your installation of Visual Studio, must include the following settings:

    • Go to Workloads tab and turn on ASP.Net and web development, see the following example:

Output Folder Contents

Using HelloWorld as an example, the structure of the folder consists of:

  • helloworld folder: the main project folder.

      • src folder.

        • app folder.

          • components folder: contains all the angular components generated from the converted UI.

          • app.component.css: it is the stylesheet used by the app.component

          • app.component.html: it is the HTML associated with the app.component

          • app.component.ts: this is the startup angular component of every migrated application

          • app.module.ts: this module includes all the sub-modules of all the application. e.g. You have two project (csproj): project1.csproj and project2.csproj. This will yield two sub-modules: project1.module.ts and project2.module.ts

          • hello-world.module.ts: this module includes all the components of the hello-world csproj.

        • assets folder: contains all the images of the application.

        • index.html: it is the page that launches the angular startup component: app.component <app-root></app-root>

        • package.json: this is a json file that contains the list of javascript packages required by the application.

  • HelloWorld.sln: la solución del proyecto.

  • nuget.config: contains the package sources for the app.

  • PageObject.xml: file with the summary of all the elements contained by each of the forms of the application.

Converted Application Request and Response

Using the HelloWorld example application, let's follow the process that occurs when you click the button Click Me to understand the communication between the FrontEnd and BackEnd of your converted application.

The Click of the button will trigger a sequence of steps that can be summarized in the following

Now, let go into detail for each step.

Step 1: Send the Request

When you click the Click Me button to start the whole process it will:

  1. Call WebMAPService to perform the following actions:

    1. Gather the Changed models to be synchronized with the back-end's observable models.

    2. Create and send the HTTP POST event with the gathered deltas.

  2. The WebMAPService creates the following JSON and send it to the back-end.

{
  "Changed" : [],
  "Actions" : [{
    "Arguments" : null,
    "Name" : "Click",
    "ReceiverId" : "a1c4236c-ca1e-4550-9789-2c17d12e6f50"
  }]
}

Changed array: since there are no models that were modified, the array is empty. Actions array: contains the list of actions that should be processed on the back-end. ReceiverId is the identification of the component interacted with.

Step 2: Process the Request and Create Response

The BackEnd will:

  1. Receives the JSON request: decodes this information and creates a request object call Data Transfer Object (DTO), this will contain the list Changed of the click.

  2. Process the DTO request: applies the changes defined in the DTO and keeps track of the component state. In this case, it will change the state of the label with the new text.

  3. Create the response: creates a response based on the changes made to the components, transforms it into a JSON, that can be interpreted by the Front-End, and sends the response to the UI.

For a more in-depth explanation of all the components of the Back-End, take a look into the section:

Step 3: Process the Response

Now, that the response has arrived back to the client-side.

{
  "Added" : [],
  "Changed" : [
  {
    "Text" : "Hello World",
    "Visible" : true,
    "Id" :  "a2fb1871-2576-4dbe-9203-17dc4b13427a",
    "MapperId" : "lbl",
    "References" : {}
  }
  ],
  "Removed" : [],
  "Actions" : []
}

The WebMAPService will process the JSON above, and synchronize the Front-End's observable models with each of the models in theChangedarray. And finally, the components should be refreshed and show the new Hello World text.

Compile and Run the Converted Application

Compiling and running your converted application is the highlight of the whole process, but before we get right into it, you need to make sure your computer complies with the following requirements.

System Requirements

Before you start running the converted you will need:

Step 1: How to Build the UI Code

Install the Angular, if you haven't already. Please open Command Line or PowerShell as an administrator and type the following command.

npm install -g @angular/cli@16.2.14

Update the npm configuration's registry key. This is required to resolve Mobilize's packages and should be done only once. Please follow the next setup guide:

Go to the converted application's folder, then go to the folder of the main project and then to the folder with angular in the name. Open the CommandLine pointing to this location. It should look as in the case of HelloWorldDemo.

C:\HelloWorld\helloworld\helloworld-angular>_

Run the following command to install all the packages and their dependencies to run the UI. This step should only be done once.

npm install

The last command will build the UI and should be run after any change done to a component inside the angular folder.

npm run build

Now the user interface is ready!

Angular Project

As an additional option for building the UI you have the Angular Project, this is an option selected before the conversion under Conversion Settings > Conversion Results. This feature is exclusive for projects whose the Target Framework is .NET Core.

This generates a new csproj file located in the angular folder of the converted solution. This new adds the option of building the UI directly in Visual Studio without the need to writing the previous commands in console.

To build the UI directly from the Visual Studio solution right click the new angular project and select Publish.

Then click the Publish button and set up the bin folder.

This will execute the compilation steps found in the project's definition.

After the Web Publish is successful the UI will be ready!

The user can verify the build was successful manually as well by checking the wwwroot folder at the base directory or the node modules inside the angular folder.

Step 2: How to Build the Business Logic Code

Open the solution of the app using Visual Studio 2019. Compile your solution and resolve any errors if necessary.

Before compiling the code, please make sure you have installed .NET Core and the necessary .NET Framework versions in order to compile the code.

Step 3: How to Run the Application

For the final stride open the solution in Visual Studio, right click the main project select Set as Startup Project and click Run button in visual studio.

Your first WebMAP: WinForms to Web application is up and running!

The output folder for the converted app should be similar to the one from the following image:

helloworld-angular folder: contains all the code related to the UI, for more information visit .

Logs folder: you'll find the logs related to the conversion and any error that might have occurred, for more information visit .

Stubs folder: any element that was not converted will be generated as a stub, for more information of what a stub is visit .

( or ).

.

Visual Studio 2022, .

HelloWorld
Workspace and project file structure
Error and Troubleshooting
Error and Troubleshooting
BackEnd
Node.js
latest
stable
Angular 16
Build Tools for Visual Studio 2022
Setup NPM package registry in the workspace
latest
stable
Build Tools for Visual Studio 2022
HelloWord demo folder content
HelloWorld Click Me
Set Startup Project
Converted HelloWord running