Giter VIP home page Giter VIP logo

skswebmap's Introduction

Salmon King Seafood Reference App (SKS) WinForms C#

SKSAspNetCore

About the App

Salmon King Seafood (SKS) is a reference App create to show some of the migration capabilities of the our WebMap product

This app was originally develop in Visual Basic 6 (VB6).

The VB6 source code of this app can be found here

The VB6 source code was upgraded to a C# Windows Forms Desktop app using the Visual Basic Upgrade Companion tool.

The C# Windows Forms source code of this app can be found here

The C# Windows Forms source code was upgraded to an Asp .Net Core App using our WebMap product. Now you can run this app on any .NET Core platform: Windows, MacOS or Linux.

NOTE: This app was migrated to .NET Core 3.1. If you haven't installed it just go to: https://dotnet.microsoft.com/download/dotnet-core/3.1

Understanding the target code

Mobilize.Net's WebMap product upgrades WinForms desktop apps to a modern Asp.Net Core applications. You can see also see nice video walkthrough of this demo

Those applications will have a:

  • C# BackEnd
  • Angular 8 TypeScript FrontEnd

FrontEnd Code

The WinForms screens are converted to an angular application. Each of the Forms or UserControls are converted into angular components.

The following is an example of the angular components structure for the SKS.

- sks-angular
    - src
        - app
            - components
                - sks
                    - frm-about
                    - frm-action-order-reception
                    - frm-action-order-request
                    - frm-add-product-to
                    - frm-adjust-stock-manual
                    - frm-customers
                    - frm-login
                    - frm-main
                    - frm-order-request
                    - frm-products
                    - frm-providers
                    - frm-reception-approval
                    - frm-request-approval
                    - frm-splash
                    - frm-users-manage

Building front end code

Building front end code is simple:

First make sure you have the angular client installed. If it is not installed, install angular CLI (Command Line Interface) using yarn or npm install

npm install @angular/cli -g

Then from the command line switch to angular source code folder:

cd sks-angular

Install dependencies using

yarn install

or

npm install

And build the source code using:

ng build

Serving the code

For angular, it is very common to use ng serve. This command will builds and serve your app, rebuilding on file changes.

It will use the proxy.conf.json file to redirect backend calls. By default ng serve starts in http:\\localhost:4200 and the provided proxy.conf.json file expects the backend on http:\\localhost:5000

Building the Backend Code

Just open your code in Visual Studio 2017 or 2019 and compile your code. You can also compiled from the command line using:

dotnet build

NOTE: Remember to compile the frontend or starting the ng serve version before starting the application.

One the application is compiled just start the debugger.

or run it using

dotnet run

You should now see a screen like:

SKSRunning

If you do not want to waste a lot of time setting up an environment, you can open this application on Gitpod.

Gitpod is a great company that allows you to get your repo up and runnning hosted on a cloud IDE.

Open in Gitpod

This is cloud environment that shows how this migrated application can be taken all the way from VB6 to a dockerized Linux container :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.