locked
service layer coding/deployment suggestions? RRS feed

  • Question

  • User-1623675128 posted

    Hi,

    We are going to develope a app with layared architecture whih has typical UI -> Service Layer-> Business ->Data in a project;

    1. Since its going to be single project as all developers are working the Service Layer should be called from UI as DLL ref or Proxy since its going to be a WCF services?
    2. While doing the depliyment how to deploy the WCF which is inside the project which has UI with it as a separate services in IIS sothat other apps can use it?

    May be these are basic but just want to know how it will b done in general.

    Thanks

    Thursday, November 21, 2013 11:16 PM

Answers

  • User-1509636757 posted

    It will be more easy if you try to have a separate WCF project in your application architecture. This way, WCF servcies can be hosted in IIS as a separate virtual directory.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 22, 2013 2:17 AM
  • User-1067017023 posted

    We are going to develope a app with layared architecture whih has typical UI -> Service Layer-> Business ->Data in a project;

    1. Since its going to be single project as all developers are working the Service Layer should be called from UI as DLL ref or Proxy since its going to be a WCF services?

    Make 2 Visual Studio Solutions:

    The first an ASP.NET application (or Windows Forms application, depending on what your UI is). In this application, put your UI and all presentation components

    The second solution would be your middle tier. In this, put your data access classes, business logic classes, and the WCF service and data contracts (all these should be separate projects). The WCF layer should serve as the interface to your business classes, and dll references of the business layer should be added to it.

    When you have sufficient functionality in your middle tier, host your WCF layer in a windows service or in IIS (or whichever other way).

    Now in your UI solution, add a service reference, and point it to the address of yur WCF service. That will add the proxy to your UI project. All communication with the middle tier should be through the proxy, never add dlls of the business layer to the UI.

    Ringoo

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 22, 2013 5:39 AM

All replies

  • User-1509636757 posted

    It will be more easy if you try to have a separate WCF project in your application architecture. This way, WCF servcies can be hosted in IIS as a separate virtual directory.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 22, 2013 2:17 AM
  • User-1067017023 posted

    We are going to develope a app with layared architecture whih has typical UI -> Service Layer-> Business ->Data in a project;

    1. Since its going to be single project as all developers are working the Service Layer should be called from UI as DLL ref or Proxy since its going to be a WCF services?

    Make 2 Visual Studio Solutions:

    The first an ASP.NET application (or Windows Forms application, depending on what your UI is). In this application, put your UI and all presentation components

    The second solution would be your middle tier. In this, put your data access classes, business logic classes, and the WCF service and data contracts (all these should be separate projects). The WCF layer should serve as the interface to your business classes, and dll references of the business layer should be added to it.

    When you have sufficient functionality in your middle tier, host your WCF layer in a windows service or in IIS (or whichever other way).

    Now in your UI solution, add a service reference, and point it to the address of yur WCF service. That will add the proxy to your UI project. All communication with the middle tier should be through the proxy, never add dlls of the business layer to the UI.

    Ringoo

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 22, 2013 5:39 AM