Configuration Files

Jun 9, 2009 at 2:05 PM


in MSCF v1 you could use loose coupling with the ProfileCatalog.xml. Will there be any comparable in the new Mobile Application Blocks?

Jun 12, 2009 at 1:44 PM

Please take a look at the modularity sample that comes with the ContainerModel block.

Configuration via XML is slow, loosely typed, and requires the use of reflection to load modules and initialize them. All of these made for quite poor performance in v1.

For this release, we're moving to a more strongly-typed, compile-safe approach, where instead of defining modules to load via an XML, you do so via a configuration assembly, which links to the actual modules and loads them into the container. This means that the configuration is written in C#, and is very performant.


Please take a look at the sample and let us know what you think.

Jun 12, 2009 at 1:50 PM

I have had a look at the modularity sample. I have to say I love it! You are doing a great job. It is very clean and easy to follow. I don't know who wrote the Container Quickstart but I must say I am very impressed. Thank you for your great contributions to mobile development!




Daniel Lidström

Stockholm, Sweden

Aug 19, 2009 at 1:21 AM

Can the ConfigurationManager be used to write back to the configuration file?  or is it read-only?


Aug 19, 2009 at 2:59 PM

Hi Joel,

Unfortunately, the current Configuration Block implementation is read-only.

This feature hasn't been taken as a high priority yet so it's currently out of scope.

Even though, remember the block is open source, and you can implement the feature by yourself if it worths the effort.

Hope this helps to clarify.

Kind Regards