I'll just add that I think a lot of folks *are* doing this... you just don't see much of this practice in the world of sample code, magazine articles, etc, because it's just too much extra typing, or extra complexity distracting from the topic at hand, perhaps.
You do see it, from time to time, in articles/samples that deal explicitly with plugin-style architectures. Here's an MSDN Mag article from Dino E, for example: http://msdn.microsoft.com/msdnmag/issues/02/07/CuttingEdge/ Cheers, -Shawn http://www.windojitsu.com/ -----Original Message----- From: Eric Gunnerson [mailto:[EMAIL PROTECTED] Sent: Friday, January 09, 2004 10:06 Subject: Re: Best way to share an interface definition amoung components tier My two cents... Having the interfaces in a separate assembly means one more assembly to load, which does have some additional overhead. It would also (for us at least) make it slightly more expensive to build and provide (each assembly is tracked, has security reviews, etc.). Probably not a big factor, but in general, that would push us towards having the interfaces along with the concrete types, especially since the user would have both on their machine anyway. In your case, I think it makes a ton of sense to factor the interfaces out into a separate assembly, especially if the implementor may not want the other concrete definitions. It helps decouple the different parts of your design, which in general I think is a good thing. It's also nice because it makes sure the interface doesn't show up in multiple assemblies, which can cause some hard-to-troubleshoot bugs. Hope this helps Eric -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Bill Bassler Sent: Friday, January 09, 2004 3:53 AM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] Best way to share an interface definition amoung components tier This might seem like an unusual question but I can't find any advise on the subject. Scenario: I have an interface X. Because the goal of the interface is enforce a protocol that can be implemented by many types it needs to be widely available. I might also have several other interfaces that I want to make available because they need to be commonly implemented. Questions: What is the best way to acheive easy availability of interfaces amoung components? One thought would be to place commonly used interface definitions in their own assembly so that they can be referenced from many components? For some reason, (even in MS Application block code) I tend to see interface definitions deployed in a particular assembly that needs to use it. What if another type wants to implement the interface? Because interfaces are contained in the assembly that implements them another implementor would need to reference that assembly just to get a reference to the interfaces. Suggestions? =================================== This list is hosted by DevelopMentor(r) http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor. http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com