FubuMVC.Windsor update

111 views
Skip to first unread message

Gleb Chermennov

unread,
Apr 15, 2013, 2:02:47 AM4/15/13
to fubumv...@googlegroups.com
Hey guys, I just wanted to remind that I'm still trying to make FubuMVC work with Castle Windsor, and I had some progress lately, but also some surprising results.
It seems that Windsor can't instantiate a concrete class without knowing about it before you call Resolve - so, each such class should be added through some type of scanning operation. Not sure why they implemented it this way.
So, to register class from another assembly, I did something like:

container.Register(Types
                .FromAssemblyInDirectory(new AssemblyFilter(Environment.CurrentDirectory))
                .Pick()
                .If(t => t.IsClass || t.IsInterface)
                .Configure(c => c.LifestyleTransient()));

This particular problem keeps at least one test from Compliance suite (the one Jeremy provided for us) from passing. I can, of course, hardcode it for the time being, but I'm not sure it's the right thing to do. 
Any ideas?

Gleb Chermennov

unread,
Apr 15, 2013, 5:51:44 AM4/15/13
to fubumv...@googlegroups.com
Also, as I figured from looking in FubuMVC.StructureMap tests, StructureMap can instantiate concrete class without the need to know about it explicitly.

понедельник, 15 апреля 2013 г., 10:02:47 UTC+4 пользователь Gleb Chermennov написал:

Jeremy D Miller

unread,
Apr 15, 2013, 6:27:18 AM4/15/13
to fubumv...@googlegroups.com
*I* don't know how to do it, but I believe that there is a Windsor extension that allows Windsor to build concrete classes that have not been registered yet

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "FubuMVC Development Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fubumvc-deve...@googlegroups.com.
To post to this group, send email to fubumv...@googlegroups.com.
Visit this group at http://groups.google.com/group/fubumvc-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gleb Chermennov

unread,
Apr 15, 2013, 9:36:08 AM4/15/13
to fubumv...@googlegroups.com
That may be, I just haven't look into that closely. On the other hand, if it's another NuGet package - I can't imagine what it's doing other than scanning assemblies and providing an API for that task.

понедельник, 15 апреля 2013 г., 14:27:18 UTC+4 пользователь Jeremy Miller написал:

Matt S.

unread,
May 16, 2013, 2:22:38 PM5/16/13
to fubumv...@googlegroups.com
Sorry I'm late to this party. I ran into this with Autofac, but it had a setting to enable concrete class resolution. I found an old article about a feature (then it was new) added to Windsor. Unfortunately, the article is only available via cache:

The gist is to implement ILazyComponentLoader.Load to either create an instance yourself, or maybe to register it with the container on the fly, then have it resolve it. I have no idea if that would work, but it may be a start if you are still stalled on this.

Gleb Chermennov

unread,
May 18, 2013, 6:56:04 AM5/18/13
to fubumv...@googlegroups.com
Thanks very much, I'll look into it.

четверг, 16 мая 2013 г., 22:22:38 UTC+4 пользователь Matt S. написал:

Mikhail Tripolitov

unread,
Nov 8, 2013, 2:59:40 PM11/8/13
to fubumv...@googlegroups.com
Hi Gleb, did you abandon Windsor integration for FubuMVC?

Gleb Chermennov

unread,
Nov 9, 2013, 1:13:50 PM11/9/13
to fubumv...@googlegroups.com
I guess you can call it that. I couldn't quite understand how Windsor codebase works - and without that I can't make compliance tests pass. When struggling with that, I realized once again how much I love StructureMap :)
Or may be I'll revisit it someday - don't know.
My best guess my failure is because I don't know Windsor, I can't make the integration work.
If you're interested to contribute, I'd be happy to provide any assistance I can (which, quite frankly, isn't much). 

пятница, 8 ноября 2013 г., 23:59:40 UTC+4 пользователь Mikhail Tripolitov написал:

Mikhail Tripolitov

unread,
Nov 21, 2013, 12:56:45 AM11/21/13
to fubumv...@googlegroups.com
I need help with FubuMVC.Windsor  - I've implemented facility and all complaince tests are green, but I am new to FubuMVC and not absolutely sure it is all fine. 

Could you please advice next steps to check code inorder to contribute FubuMVC.Windsor implementation to the project.

Gleb Chermennov

unread,
Nov 21, 2013, 7:26:09 AM11/21/13
to fubumv...@googlegroups.com
I assume you've read this post by Jeremy https://groups.google.com/forum/#!searchin/fubumvc-devel/Other$20IoC$20tools$20with$20FubuMVC$20Round$202/fubumvc-devel/6G4iKLX9FEk/1U-XO5BcVEcJ
I think you need to add both project to the FubuMVC solution and send a PR. Fubu team uses ripple for dependency management, so you may need to add a few tweaks.
Congrats, by the way - Windsor is a tricky beast (at least for me, it was).

четверг, 21 ноября 2013 г., 9:56:45 UTC+4 пользователь Mikhail Tripolitov написал:

Gleb Chermennov

unread,
Nov 21, 2013, 10:01:05 AM11/21/13
to fubumv...@googlegroups.com
about not being sure - don't worry, whoever is going to review your PR will help you out.

четверг, 21 ноября 2013 г., 9:56:45 UTC+4 пользователь Mikhail Tripolitov написал:

Mikhail Tripolitov

unread,
Nov 21, 2013, 2:49:32 PM11/21/13
to fubumv...@googlegroups.com

OK, will try to do create PR this weekend.

You received this message because you are subscribed to a topic in the Google Groups "FubuMVC Development Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fubumvc-devel/kEHE_PhDOZI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fubumvc-deve...@googlegroups.com.

To post to this group, send email to fubumv...@googlegroups.com.

Jeremy D. Miller

unread,
Nov 21, 2013, 2:52:34 PM11/21/13
to fubumv...@googlegroups.com
Are you going to add it to the main FubuMVC repository, or do you want this in its own?  I could see it going either way.

- Jeremy

Mikhail Tripolitov

unread,
Nov 21, 2013, 3:14:35 PM11/21/13
to fubumv...@googlegroups.com
Hi Jeremy, I followed contribution guide and guidelines so right now my forked fubumvc under https://github.com/tripolitov/fubumvc has FubuMVC.Windsor branch where code is written. I do not want separate repo, unless it is required.

Mikhail Tripolitov

unread,
Nov 29, 2013, 11:58:59 AM11/29/13
to fubumv...@googlegroups.com
Anything wrong with my PR? should write more tests or something?

Matt S.

unread,
Nov 29, 2013, 12:36:01 PM11/29/13
to fubumv...@googlegroups.com
It's a holiday here in the States. It's very likely repo members are mostly offline now through the weekend.

On another note, thanks to both of you for working on this update. 

Jeremy D Miller

unread,
Nov 29, 2013, 1:03:58 PM11/29/13
to fubumv...@googlegroups.com
Sorry, I've been out of town and disconnected.  I looked over it briefly when it came in and thought it looked fine.  I'll try to pull it in tomorrow and potentially release the public nuget shortly.

Thanks for doing this,

Jeremy

Sent from my iPhone

Jeremy D. Miller

unread,
Nov 30, 2013, 9:50:30 AM11/30/13
to fubumv...@googlegroups.com
Mikhail,

I brought the PR in this morning.  The code itself looked fine to me.  I just made some little changes around the edges you might wanna look at:

1.) I added the FubuMVC.Windsor.Tests lib to the rake script by editing the TESTS.txt file
2.) I had to add an author tag to the nuspec (Mikhail, then me because I wrote one whole new method;))
3.) I added this https://github.com/DarthFubuMVC/fubumvc/blob/master/src/FubuMVC.Windsor/BootstrappingExtensions.cs.  Can you look at that and see if there are any other overloads you'd like to add?

Lastly, there's a new issue for adding an end to end test for both Autofac and Windsor that I can take care of early next week.

Thank you again for doing this.  This has been on our wish list for years.

- Jeremy

Mikhail Tripolitov

unread,
Dec 1, 2013, 1:28:15 PM12/1/13
to fubumv...@googlegroups.com
Jeremy, if you come up with any problems around Windsor feel free to assign an issue on me.

No thanks at all - lack of Windsor support stopped me from using FubuMVC, now will try to use it instead of classic asp.net mvc.
Reply all
Reply to author
Forward
0 new messages