Recently Microsoft has open sourced it’s entire ASP.NET next version stack on GitHub and I have been closely watching this for a quite a some time to understand how they have created architecture of it and how they organize everything in such a large stack.
I have seen [AssemblyNeutral] attribute in few of interfaces and I was curious why it was required. So I dig into it and learned about it.
Why we need Assembly Neutral Interfaces?
In earlier version of ASP.NET and Microsoft.NET Interfaces are bind to a assembly where it is declared. Let’s say I have written a interface under DotNetJalps namespace for my framework.namespace DotNetJalps { public interface ILogger { DoAmazingStuff(); } }Now after some time this framework is super popular and everybody loves abstraction I have created and now they wants same abstraction so there are two ways we can do this.
- Convenience me to write this abstraction.
- Write implementation themself and maintain that.