PDA

View Full Version : Spring.NET Newbie Questions


jlopp
12-12-2006, 02:48 PM
Our team has gotten approval to redesign an out-dated application and its framework, and I am really interested in utilizing Spring.NET. However, I have a couple questions that I could not find answers for in the docs.

1) We are designing for a dynamic modular architecture and I was wondering what is the Spring.NET best practice for the XML configuration files. Specifically, does each module load its own config file or is there one big config file? I guess I was hoping that each module can have its own config file, but the framework manages one application context that loads these config files at runtime. I do not know if that is possible or not even encouraged.

2) I am new to AOP and DI, but I love it! I am having a hard time envisioning how these can be used in certain aspects to our system. Is it recommended to combine these with the command pattern? Also, each of our forms will have a proxy, so the form is dependent on this. However, each proxy can have different method calls so each interface will be different. If we use DI in that case, it really isn't "pluggable" like the examples.

Aleks Seovic
12-28-2006, 07:00 PM
Hi,

1) In a plug-in framework built on top of Spring, you will typically have a single root context that provides some common services to all modules, and then one child context per module/plug-in, so I guess the answer is yes -- you can set it up so each module has its own config file.

How exactly you load modules and instantiate their contexts is up to you, but typically it ends up being a thin layer on top of Spring. If you can provide more information about what exactly you are trying to do I can probably be more specific and provide you with some guidance.

2) DI and AOP are generally useful. They can certainly be combined with Command pattern, but they are not tied to it and can be used in other places as well. I didn't really understand your last question about forms, their proxies and interfaces, so if you can provide some more details I'll try to answer it.

Regards,

Aleks