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
July 30th, 2008 at 12:21 am
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”
July 30th, 2008 at 8:53 am
heh… or Onion Driven Development specialists
July 30th, 2008 at 4:57 pm
I feel the “Onion Architecture” is just one way of using a DSL design. Any comments?
July 30th, 2008 at 5:00 pm
@Gonzalo:
what exactly do you consider a DSL design?
July 30th, 2008 at 5:58 pm
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”
July 30th, 2008 at 6:02 pm
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.
July 30th, 2008 at 8:20 pm
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?
July 30th, 2008 at 8:30 pm
i dunno… you’re right, but it has a bit of an academic ring to it…
August 9th, 2008 at 12:39 am
[...] 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 [...]
October 20th, 2008 at 8:59 am
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”.