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
  • 1. Send the Request
  • 2. Process the Request and create the response
  • 2.1 Parse the JSON request via FormattingService
  • 2.2 Process the request via EntranceService
  • 2.3 Create the response via DeliveryService
  • 3. Process response and refresh component
  • Summary

Was this helpful?

  1. General

Request and Response

PreviousCoreServicesCommonNextIntroduction

Last updated 4 years ago

Was this helpful?

This chapter will explain in detail what happens when someone triggers a request from the client side and waits for the server side's response. This chapter will be using the .

Say you want to know in detail what happens when a user clicks the Click Me button and the label refreshes the text from My First Sample to Hello World.

A WebMAP request/response passes through the following main steps that are shown as the image below.

So, when the user clicks on the button, front-end prepares the deltas to be synchronized with back-end's observable models and launches a request. Then the back-end processes the request by applying the changes coming from the front-end and calls to the corresponding user code. Then it builds the response and sends it back to the client. Finally, the front-end processes the response and refreshes the label.

Now, let go into detail these main steps.

1. Send the Request

  • Click the Click Me button to start the whole process.

  • 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.

  • 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"
      }]
    }
    1. Changed array: since there is no models that were modified, the array is empty.

    2. Actions array: contains the list of actions that should be processed on the back-end.

2. Process the Request and create the response

Now that the request has arrived at the back-end, it will pass through some middlewares orderly.

The request passes through ExpiredSessionMiddleware to verify if the session has already expired, then RequestQueueMiddleware to enqueue the request if the server is already processing some other requests coming from the same session; if no requests are in the queue, then it will proceed to the next middleware. The CoreServicesMiddleware initializes all the services required to process a request. And finally,InboundMiddleware will process the request and create the response for the request.

The InboundMiddleware is the key responsible for processing any kind of request coming from the client side, so let's expand in detail about this middleware.

2.1 Parse the JSON request via FormattingService

First of all, the InboundMiddleware gets the information of the request, decodes this information and creates a Request object that contains the list of list of Changed DTO models and the list of Action. Then, this Request will be used by the EntranceService.

2.2 Process the request via EntranceService

The EntranceService will process the list of Changed DTO models and the list of Action. An is an action sent to the server in a request to be executed. Each Action contains a ReceiverId (the Identifier of the sender), Name (the Event Name) and Arguments (the arguments of the event).

  1. Process the Changed DTO models: In order to synchronize the list of Changed DTO models with the corresponding observable models, the service use MapperService to invoke ApplyChanges of each Mapper associated with the Changed model.

  2. Process the list of Action: In this case of clicking a button, the ReceiverId is the id of the Button, the Name is "Click" and with no arguments. Given this Click Action, the service will invoke the following user code:

    private void button1_Click(object sender, System.EventArgs e)
    {
      this.label1.Text = "Hello World";
    }
  3. While the action is executing, the TrackingService is tracking all the Observable Models. If an observable's property has been modified, the TrackingService will register the observable into the trackable array. In this example code above, the label1 will be registered.

2.3 Create the response via DeliveryService

The DeliveryService creates the response back to the client side by means of the next steps:

  1. The TrackingService retrieves all the tracked observable models.

  2. The MappingService takes those models and instantiates the corresponding Mapper to start calling one by one the Map method. For example, in this case, since label1 has been modified. The MappingService instantiates LabelMapper, calls the Map method and returns the Mobilize.Web.DataTransfer.Label.

  3. The DeliveryService will finally, create the Response object. And populates the objects Added, Changed, Removed properties array. For example, the label1's new modified text should be inside the Changed array.

  4. Finally, the FormattingService will format the Response into a JSON object.

3. Process response and refresh component

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 observable models with each of the models in the Changed array. And finally, the components should be refreshed and show the new Hello World text.

Summary

  • You leaned in detail what happens when someone triggers a request from the client side and waits for the server side response.

  • You learned how WebMAP Back-end services process the request.

  • You learned how WebMAP Back-end services create the response.

HelloWorld Sample