Configuration by convention for MVC

Oct 23, 2013 at 10:59 PM
I have been reading the reference docs and found that run-time configuration by convention is listed in the table as available only for Windows store apps. Is this correct?

I would like to use Unity for IOC in an app where MVC modules are added dynamicly to the application by droping the dlls in the bin folder (with all required contexts included in the assembly).

My goal is to create the base application and then add new functionality on the fly without recompiling the base app, just restarting the app. It think I can do it with configuration information in a file, but I would like to be able to maintain the app easier by following convention.

Is this possible or an I going about this incorrectly?
Oct 23, 2013 at 11:22 PM
No, registration by convention is available in Unity. Windows Store Apps impose restrictions on the the functionality available. See Appendix A - Unity and Windows Store apps from the Developer's Guide.

The scenario you describe sounds like one area where registration by convention can make things easier for you (as long as the application knows how to work with the new types registered). You can read more (if you haven't already) in the Developer's Guide under Registration By Convention.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to
Oct 23, 2013 at 11:56 PM
Edited Oct 23, 2013 at 11:57 PM
Great thanks. I guess I was confused. I was looking at the Unity 3 Reference Docs compiled help file and under the run-time configuration - registration by convention document there is a table in the section Identidying the types to register automatially that doesn't list any web technologies.

I see an exception now in the remarks about the bin folder too.

I will follow the design guide instead and see how it goes.



Thanks!