Only been using SM for a couple of months but seems sensible to me.
Actually while you're making breaking changes I thought I should bring
up the fact that I've found is that the fluent interface(s) can be a
bit inconsistent in places. I'm guessing this is because different
parts of it have evolved separately but because they look different
I've gotten lost a few times which is a pity because once you find the
correct path through the fluent interface you get beautiful results. I
could probably provide some examples (didn't think to note them when I
noticed them), but if its just me who thinks it then it can't be a
real issue.
On Sep 14, 8:34 pm, Jeremy Miller <
jeremydmil...@yahoo.com> wrote:
> I've come to the conclusion that StructureMapConfiguration is an
> abomination and I'm seriously considering eliminating it, but before I
> do anything radical, I want some feedback from you, the users.
>
> Proposal:
>
> * Eliminate StructureMapConfiguration in favor of:
>
> ObjectFactory.Initialize( x => {
> x.PullConfigurationFromAppConfig = true;
> x.IncludeConfigurationFromFile("some file name");
> x.AddRegistry( new WebRegistry() );
>
> });
>
> ObjectFactory.Configure(r => {
> // where "r" is a Registry object and you have the whole range of
> ForRequestedType() stuff for configuration
>
> });
>
> WHY?
>
> * People are getting confused about StructureMapConfiguration v.
> ObjectFactory. StructureMapConfiguration stuff only takes effect
> before the very first call to ObjectFactory, then it's quietly
> ignored. It's a mess.
>
> * I'm having to duplicate some code between Registry and
> StructureMapConfiguration that is smelly
>
> * I think the Registry approach is smarter anyway
>
> * Stuff like
> "StructureMapConfiguration.ForRequestedType<IFoo>().TheDefaultIsConcreteTyp e<Foo>()"