Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6706409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:31:01+00:00 2026-05-26T07:31:01+00:00

I have been given to develop a web application that can have multiple presentation

  • 0

I have been given to develop a web application that can have multiple presentation layers, currently its on the web but soon to be on desktops and other platforms. So I searched around on how to do it best. I have found that its better to use a layered approach.

I am thinking to have BLL as a web-service which could be accessed by different PLs. The BLL will be accessing DAL for data specific operations.
So far so good, but I was thinking of using ASP.NET MVC for the web app. Now I am a bit confused because the “controllers” essentially contain the business logic, right.
Is it a good option ? If i do follow the same path, using MVC and the above mentioned layers, my controllers wont necessarily contain the BLL but will only be, kinda dummies.

Is it the right way to do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:31:02+00:00Added an answer on May 26, 2026 at 7:31 am

    These are the recommended layers:

    • Presentation (MVC, WPF, Whatever):
      contains only presentation logic (never includes business logic) the controller only handle communication with application/services layer to co-ordinate communication.

    • Distributed Services (Remote Facade):
      as you will have many clients, some of them would be windows apps and others are web apps, it is recommended to create a remote service layer (WCF services or web services) which exposes business layer to consumers (preferable send and receive DTOs).

    • Application Layer:
      a layer which handles the communication with domain layer, and co-ordinate transaction logic and technical services, and if you are using DTOs it translates domain objects into DTOs and vice versa

    • Domain Layer:
      contains entities and value objects, this is the core of business logic designed in terms of object oriented domain objects encapsulating data and logic. it also could contains repository interfaces if using repository pattern. and domain services for logic that does not fit into a single entity.

    • Data Access:
      using ORM like NHibernate or EF or whatever data access techniques to map entities into database tables.

    • Infrastructure / Common:
      infrastructure code and cross cutting technical services like logging

    I will try to give a tiny example about each layer:
    a hypothetical incomplete example say you want to activate a purchase order

    Presentation Layer (MVC):

    public class PurchaseOrderController
    {
      public ActionResult ActivateOrder(int id)
      {
        var response = _orderManagementService.ActivateOrder(id); // Call distributed service (Web Service)
    
        if(response.Succeed)
          return new SuccessActionResult();
        else
          return new FailedActionResult(response.Reason);
      }
    }
    

    Distributed Service Layer (Web Service):

    public class OrderManagementWebService : IOrderManagementService
    {
      private readonly IOrderExecutionService _orderService;
    
      public OrderManagementWebService(IOrderExecutionService orderService)
      {
        _orderService = orderService; // Order Service from application service
      }
    
      public ActivationResult ActivateOrder(int id)
      {
        var response = _orderService.ActivateOrder(id); // Call the application layer to execute the logic
        if(
      }
    }
    

    Application Layer:

    public class OrderExecutionService : IOrderExecutionService
    {
      private IOrderRepository _orderRepository;
    
      public OrderExecutionService(IOrderRepository orderRepository)
      {
        _orderRepository = orderRepository;
      }
    
      public ActivationResult ActivateOrder(int id)
      {
        var order = _orderRepository.GetById(id); // Get the order from repository
    
        try
        {
          order.Activate(); // Call business logic inside the order entity
          return new ActivationResult { Success = true } ;
        }
        catch(ActivationException ex)
        {
          LogFactory.GetLog().Exception(ex); // Call log from infrastructure layer
          return new ActivationResult { Success = false, Reason = ex.Message } ;
        }
      }
    }
    

    Domain Layer:

    public class PurchaseOrder : Entity
    {
      // Properties and fields (Data)
      public int Id { get; private set; }
      public Customer Customer { get; private set; }
    
      // Methods (contains business logic)
      public void Activate()
      {
         if(Customer.IsBlacklisted)
           throw new InvalidCustomerException(...);
    
         if(_lineItems.Count == 0)
           throw new NoItemsException(...);
    
         this.SetStatus(OrderStatus.Active);
    
         .....
      }
    }
    

    Repositories (Data Access Layer):

    public class OrderRepository : IOrderRepository
    {
      public PurchaseOrder GetById(int id)
      {
        // data access code to access ORM or any data access framework.
      }
    }
    

    Infrastrucute:

    public class Logger : ILogger
    {
      public void Exception(Exception ex)
      {
       // write exception to whatever
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been given the task to design and develop a web application for
I have been given a requirement where I need to support multiple databases in
I have been given two different Microsoft Word document that my virus scanner has
I have been given a DLL (InfoLookup.dll) that internally allocates structures and returns pointers
I have been given the task of internationalizing a large client-server application. The remit
I have been given a specification that requires the ISO 8601 date format, does
I have been asked to build an application where I can drag and drop
I have been given the tasks of speccing a mobile application, which will need
I am currently using php and ajax file upload to develop a web application.
For the last three days I have been trying to develop a web based

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.