The Inquisitive Coder – Davy Brion's Blog

Trying to walk that thin line between intelligence and ignorance

Onion Architecture?

Posted by Davy Brion on July 29th, 2008

Jeffrey Palermo describes the Onion Architecture in this great post. If you haven’t read it yet, read it now. If you don’t like it, you just might be in the wrong business :)

The only thing i don’t like about it is the name… honestly, onion architecture? I once referred to an architecture as being comparable to an onion, in the sense that as i went through the layers and got exposed to the internals, i got more and more tears in my eyes. You don’t want people getting thoughts like that when you’re describing your preferred architecture. We really do need a better name for this :)

Don’t look at me though… i suck at coming up with good names :)

10 Responses to “Onion Architecture?”

  1. Nathan Says:

    Ha! I completely agree. Wonderful architectural description, awful name. Reading the header of the post you assume you’re about to read a description of how NOT to design a system, and are quite surprised to learn it is the opposite. Plus, onions don’t have a core, just layers. Peel the last layer and your hands are empty. Even so, it’s hard to come up with a better name.It is hard to imagine the name catching on. I can’t really picture reading resumes with “Experience building onion based systems” or “Solid understanding of onion architecture”

  2. Davy Brion Says:

    heh… or Onion Driven Development specialists

  3. Gonzalo Says:

    I feel the “Onion Architecture” is just one way of using a DSL design. Any comments?

  4. Davy Brion Says:

    @Gonzalo:

    what exactly do you consider a DSL design?

  5. Gonzalo Says:

    Basically when you create your apps to solve a specific problem. This will make your design base on a specific “Domain Model” and creates “Domain Services” the DB or storage source become “external”

  6. Davy Brion Says:

    ah ok… i thought you were talking about Domain Specific Languages

    i do agree that the Onion architecture is a way of doing Domain Driven Design, and that there are certainly other ways of doing so.

  7. Jan Van Ryswyck Says:

    The book “The Pragmatic Programmer” talks about an orthogonal architecture, and this is just derived from plain old OO design reinforced by Eric Evans DDD. Onions kinda smell and make you cry if you want to peal them, so maybe “orthogonal architecture” fits the bill?

  8. Davy Brion Says:

    i dunno… you’re right, but it has a bit of an academic ring to it…

  9. So you want to learn NHibernate - Part 0.5, Prerequisites (or NHibernate = Marijuana.NET) | The Freak Parade Says:

    [...] Onion Architecture Part 1, Part 2 and Part3 The name, perhaps, is rather silly, but Jeffrey Palermo does a very nice job of describing how an ideal DDD architecture should be [...]

  10. steinjak Says:

    I just felt that somebody ought to mention Cockburn’s Hexagonal Architecture here, which I feel is somewhat related to this. When trying to structure an architecture according to those principles, we ended up doing basically the same thing as in the “Onion architecture”.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>