Don't sweat it :)
Use whatever works for you. It's good to use OOTB stuff, but if you have
needs that are better met with OOB solution, go for it.
Krzysztof
On 03/03/2011 7:19 PM, Xavier wrote:
Ok, now it's much more clear: because a component registration could
be complex (ex: http://blog.ploeh.dk/2010/01/26/IWindsorInstaller.aspx)
it needs to be encapsulated and therefore done by the component itself
with an installer.
But, in my case, it's so simple (the plugin is self-contained) that
i've never seen the need to delegate the registration to the
component. I know: it's not an good reason because i don't know what
will happen in the future...
On 3 mar, 07:13, Dmitry Kryuchkov<[email protected]> wrote:
By my opinion, encapsulation and single responsibility principle
matter much more than just 1 dependency, which your application
already has. But it is just my opinion, you can have your own.
On Mar 3, 2:29 am, Krzysztof Ko¼mic<[email protected]>
wrote:
There's no right or wrong here. Do your plugin classes have
dependencies, configuration, non-standard needs?
Installer will let you account for all of that. It lets you encapsulate
that requirements in the plugin assembly. With the other approach you're
dumbing it down to just a single class.
On 03/03/2011 8:29 AM, Xavier wrote:
2 interfaces (IPlugin + IWindsorInstaller) vs 1.
i don't want to bother, just to understand if i'm wrong. Anyway...
On 2 mar, 12:05, Krzysztof Ko¼mic<[email protected]> wrote:
So?
On 02/03/2011 8:59 PM, "Xavier"<[email protected]> wrote:
Why do you think it's "much" better ? If i'm not wrong, the plugin has
to implement an installer and therefore there is a new dependency
between the plugin and Windsor.
Isn't it just an alternative ?
Thxs
On 1 mar, 16:20, Dmitry Kryuchkov<[email protected]> wrote:
I think container.Install(FromAssembly.InDirectory(new
AssemblyFilter("your_directory"))); looks much better.
On Mar 1, 6:17 pm, Xavier<[email protected]> wrote:> I'm using Windsor
in such a scenario
- i'm filtering DLL in a specific folder based on their name
- then load each assembly:
foreach (var assembly in assemblies)
{
try
{
_container.Register(
AllTypes
.FromAssembly(Assembly.LoadFile(assembly.FullName))
.BasedOn<IPlugin>()
);
}
catch (Exception e)
{
if(_log.IsErrorEnabled)
_log.ErrorFormat(@"An
error has occured while loading assembly>> > {0}\n{1}",
assembly.FullName, e);
}
}
Regards
Xavier
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.> To post to this group, send email to
[email protected]
.
To unsubscribe from this group, send email to
[email protected].> For more options, visit
this group at
http://groups.google.com/group/castle-project-users?hl=en.
- Masquer le texte des messages précédents -
- Afficher le texte des messages précédents -- Masquer le texte des messages
précédents -
- Afficher le texte des messages précédents -
--
You received this message because you are subscribed to the Google Groups "Castle
Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.