Onion Architecture Project Structure RRS feed

  • Question

  • User195343576 posted

    I am looking to understand and implement the Onion Architecture. After reading a few articles and looking at examples I have a vague idea on how to structure everything but need help to clear up some of my confusion.

    Onion Architecture

    Based on different examples and articles I Have read I created the above structure. One of my main confusion comes when I look at "02-Service: Services Interfaces". Lets take the IUserService.cs. I assume this interface would contain different signatures like RegisterUser(), LoginUser(), BanUser(), ModifyUser(), ChangeAuthenticationLevel() and so on? Is this correct? If not what other examples would we find? And are these considered Domain Services or Application Services?

    Sunday, July 20, 2014 8:06 PM


  • User521424079 posted

    Hi Alex,

    Please refer the following kb article:

    Onion Architecture is a specific type of solution architecture that was first introduced to me by Jeffrey Palermo. Over the years nearly every project I’ve worked on used a traditional layered architecture under the guise of loose coupling. Yet in every case as the project progressed we realized more and more that our layer abstractions weren’t actually abstractions at all. We were still building our application on top of a specific technology, which is sure to change over time. Additionally, when we needed to add a new feature to the UI, the developer is completely free to put the code for his feature in any layer he chooses — from the presentation layer on down, or perhaps in the dreaded “Shared/common/utility” project.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 22, 2014 2:26 AM