Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

21. Tour on the WCF service and WinForms apps

Eric Fleming edited this page Jul 18, 2019 · 3 revisions

Scenario

The diagram below explains the simple scenario of the original legacy applications.

image

Let's have a quick experiment with the legacy version of the application to get a lay of the land. After you've pulled the repo, you'll notice that there are two projects: a WinForms project and a WCF service. Let's look at each of those.

WinForms

The WinForms app is a two-pane application. On the first pane, you can see all of the items in the catalog and their prices. We can filter on their item type and brand. In the second pane, we can select dates on a calendar, an item in our catalog, and see what the stock availability will be like for that date.

WCF Service

The WCF Service exposes a contract and handles interacting with the underlying data layer. This underlying data layer consists of catalog items, their associated brand and type, and also the status of whether or not the company is running any discounts.

The important thing to note about the WCF service is that it can be configured to interface with a SQL database or it can use a mock database. You must toggle this by opening up "Web.config" in the project explorer. If you have a database stood up (in a VM or locally on your machine), you need to add a connectionString. Otherwise, you need to uncomment the line that sets using mock data to true.

Deploy the Application

After you've chosen whether you want to connect to a database or use mock data, click deploy. You'll be greeted with the application (shown below). Feel free to click around and get a feel for how the app works.

Next Steps

Continue on to learn about adding docker support to the application: Docker Support

Clone this wiki locally