Question

I am trying to apply the onion architecture by J. Palermo, but I have a few things I am struggling with.

I have a few parts and I don't know exactly where to put these.

  • I have a plugin engine which reads a directory and determine what things to load en to do
  • Have some resource files with translations which are used in several projects. Where should I put these files?
  • I have some attributes which are used throughout the system. Where to put these?
  • I also have two 'base' controllers, some default results and views. Where should I put these?

All those items are used in several projects so I want to put the items at a central point.

My current solution structure looke like this:

  • Project.Core (contains the domain objects and interfaces of the repositories)
  • Project.Infrastructure (is the implementation of the core)

I am using MVC2.

Was it helpful?

Solution

I don't think it's something that the Onion architecture would solve by itself. What I would do, is to put all these items in one or several projects, within another solution and build Nuget packages allowing me to deploy them everywhere I would need them. This way I would have deployed items like your base controllers in your MVC project and plugin/translation stuff in your Infrastructure project.

That way, whenever you'll need to have those elements available in your newly created projects, you'll just have to deploy the package again.

Those items will become independent, stored in a central point (a new sln) and will have it's own release cycle!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top