>Just one more little thing to clarify on the topic of Interfaces. I know now that I need to keep them in a separate project. And then reference the assembly of this project in those classes where the interfaces are used.
>
>So I will create a project MyInterfaces in the MyCompanyFramework Solution Folder.
>
>But my question is, is it a good practice to create a separate project for Interfaces of different layers of the application? E.g. UIFormsInterfaces, BIZInterfaces, DALInterfaces. Or simply keep all interfaces in one project?
>
>Again, thank you for any suggestions.
My 10c:
Most of the time you can (and probably should) define the interface in the same assembly as the classes that implement it. If you have a situation where you cannot do this then it implies that you somewhere have two assemblies that have a dependency on each other. In 'layered' architecture that's not ideal.
Where you *do* need seperate assemblies for interfaces then the decision on how these will be divided up will again depend on the applcation. If, for the sake of argument, you have a couple of assemblies that might be required to work together in another solution then placing interfaces that they (and they alone) depend on in a single soluton wide assembly would not be a good idea. If that's not the case the I don't see much wrong with a global 'inftrastructure' assembly.
Bottom line is that I don't think there is any consensus on best practice - it will depend on your environment.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only