I'm building an infrastructure for several websites. I want to make a generic/abstract infrastructure for managing web services.

Lets say I want to give the user the ability to translate a text.. I want to have several web services available, sorted from best to worst - if the first fails then the second one kicks in.

I want to make it as dynamic as possible.

What best practices do you think of? And why?

I was thinking of some service locator mutation with a common dll with all interfaces, a directory for each service type with dlls that each introduce a different service for the same porpose (I can give each one a score to sort by).. A service locator class will know to use reflection to find those dlls on Application_Start or somewhere else.. Is it a good start?

有帮助吗?

解决方案

Thanks to HighCore I've looked into Managed Extensibility Framework (MEF) and it seems to answer a big part of my needs.. The others are pretty simple to implement..

I found some great and simple information here: http://randomactsofcoding.blogspot.co.il/2009/11/working-with-managed-extensibility.html?m=1

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top