Search code examples
asp.net-mvcdomain-driven-designsoaonion-architecture

Onion architecture for middle tier/backend services


I am currently working on Onion Architecture from J.Palermo. I have some trouble in implementing it in my case. Is this architecture appropriate for 'business less' web sites, aka mashup of services ?

Here is my case :

We have many backend services (in WCF), each one exposing isolated Business Data (Marketing, Account, Offer, CMS ...). Our many MVC WebSites 'just' consume these services for rendering pages. All business logic is in the service, and web site is limited to presentation logic. There are no db access in the web site. However some business data can be merged to a composite entity for presentation (such as linking a content page to an offer). I think to put this logic under a service layer.

Edit : Should I create a domain model for mapping backend/middle tier service results/actions ? Maybe the Business logic here is just to merge data from different sources ?

Thanks,


Solution

  • If all the business logic is in the WCF services I'd struggle to see the point of a core project with a domain model (what would it do?). I'm assuming you are not adding a layer of business logic on top of these services to combine multiple operations? If not I'd say the onion architecture is not appropriate in this scenario.