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

  • SEARCH
  • Home
  • 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 876121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:22:57+00:00 2026-05-15T11:22:57+00:00

I have a question regarding n-layer architecture. I thought long and hard before asking

  • 0

I have a question regarding n-layer architecture. I thought long and hard before asking this question as there’s a lot of similar questions here already… however, after literally a day and a half looking at it and reading these other answers I’m still unsure. The variety of seemingly similar terminology and different approaches has me confused.

If I had a BLL and a DAL in different class libraries, one way to communicate between the BLL and DAL would be to utilise an interface, kind of like a DTO defined in another separate DLL that was referenced by both BLL and DAL. My domain model entities in the BLL would implement this interface and so would any ORM generated objects in the DAL. To save my business entities I could then pass them to the DAL which would accept them fine because they implement the shared interface. I could also pass objects back to the BLL that implement this interface. This seems reasonable as both BLL and DAL then only need to be aware of the basic interface, not each others concrete implementation.

My question is what is what’s the best method for creating the object on the other side? For example if I had a Person object in the BLL that implemented IPerson, and a PersonDataObject or whatever in the DLL that also implements IPerson, I pass Person to a method in the DAL which takes a parameter of IPerson, then in the DAL I’d have to reconstruct a PersonDataObject to persist. Is this even the best method?

Sorry I probably haven’t explained this all too well as I’m pretty confused. A best practice for dummies answer would be much appreciated.

  • 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-15T11:22:58+00:00Added an answer on May 15, 2026 at 11:22 am

    Generally speaking, objects in the BLL will consume the interfaces – not implement them:

    For example if I had a Person object
    in the BLL that implemented IPerson,
    and a PersonDataObject or whatever in
    the DLL that also implements IPerson

    Taking a “Person” as an example: think about the different data operations associated with a person (Getting all the data for a single person, a collection of shallow data for many persons, CRUD operations, searching, etc) – then design interfaces along logical groupings (see the Interface Segeragtion Principle).

    The interfaces might represent operations from a BL centered perspective – or a “service” based one.

    Anyway, to answer your specific question…

    I define my equivalent of DTO’s in a Common assembly, and the Data Interface in a separate one as well – so I have 4 assemblies: BL, Data Access Inteface definition, the Interface Implementation and Common; all assemblies reference the common one.

    I’m working in C#.Net, I define the DTOs as structs (but you could use classes); and all the properties of these are readonly – you feed data into them in the constructor – this way the DTO’s are effectly ‘dumb’ envelopes of information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.