Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Ninject does not require that the assemblies are referenced! You can tell the <code>Kernel</code> to load all modules from the assemblies that match a certain pattern - see the <code>Load()</code> overloads! Using this mechanism you map the can expose your features as Modules as @Daniel Marbach suggested in the place where each feature is implemented. I do not like these huge modules defining every binding for an assembly. I'd rather have each in a specific small module for a certain feature.</p> <p>This also allows one to enable/disable/replace implementations without recompilation of the other assemblies (at least in case you have the interfaces in separate assemblies).</p> <p>So basically you have:</p> <ul> <li>One or more web tier assemblies: containing the controllers, views and bindings for the web tier. Each of the assembly references some assemblies that define the interfaces it depends on.</li> <li>One or more assemblies that define the interfaces for the dependencies of the web tier.</li> <li>One or more business logic assemblies implementing all or some of the interfaces required by the web tier. Referencing some assemblies that contain the interfaces of the objects they depend on. Containing the modules that define the bindings for the components they provide.</li> <li>One or more assemblies that define the interfaces for the dependencies of the business logic tier.</li> <li>One or more assemblies that implement the the dependencies of the business logic tier and possibly some of the web tier (e.g. data that is directly provided with out the business logic). Containing the modules of the components they provide.</li> <li>One bootstrapper loading the modules of these assemblies using <code>kernel.Load("*.dll")</code> or similar.</li> </ul> <p>The advantage of this is:</p> <ul> <li>No reference from the web tier to the business logic tier and data tier</li> <li>No reference from the business logic tier to the data tier</li> <li>Each layer is replaceable without any impact on the others</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload