Gail Fraiteur of PostSharp on Roslyn Source Generators, Microsoft, and AOP
-
An interesting, at times philosophical, essay: [^]
Quote:
Microsoft’s love-hate relationship with AOP Microsoft has had a long love-hate relationship with aspect-oriented programming. As all large corporations, Microsoft has the psychology of a dragon with many heads – each with its own eyes, mouth and brain. No wonder they are not always synchronized. On one side, many teams have added AOP-ish features into their own product: Microsoft Transaction Server, later renamed COM+ Custom behaviors in WCF Interceptors in Unity Action Filters in ASP.NET MVC and ASP.NET MVC Core These teams didn’t just add these features because they were fun, but because they were useful. In all these technology stacks, aspects can be applied only at the boundaries of a component because the technology brokers the call between the client and the component. Neither the compiler nor the runtime engine was involved there, only the service host. Another example of technology that vitally needs aspect-oriented programming is WPF. The amount of code required to implement INotifyPropertyChanged, dependency properties or command is colossal. This is why INotifyPropertyChanged is cited as a use case of source generators. Because it’s so useful.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
-
An interesting, at times philosophical, essay: [^]
Quote:
Microsoft’s love-hate relationship with AOP Microsoft has had a long love-hate relationship with aspect-oriented programming. As all large corporations, Microsoft has the psychology of a dragon with many heads – each with its own eyes, mouth and brain. No wonder they are not always synchronized. On one side, many teams have added AOP-ish features into their own product: Microsoft Transaction Server, later renamed COM+ Custom behaviors in WCF Interceptors in Unity Action Filters in ASP.NET MVC and ASP.NET MVC Core These teams didn’t just add these features because they were fun, but because they were useful. In all these technology stacks, aspects can be applied only at the boundaries of a component because the technology brokers the call between the client and the component. Neither the compiler nor the runtime engine was involved there, only the service host. Another example of technology that vitally needs aspect-oriented programming is WPF. The amount of code required to implement INotifyPropertyChanged, dependency properties or command is colossal. This is why INotifyPropertyChanged is cited as a use case of source generators. Because it’s so useful.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
BillWoodruff wrote:
Another example of technology that vitally needs aspect-oriented programming is WPF. The amount of code required to implement INotifyPropertyChanged, dependency properties or command is colossal. This is why INotifyPropertyChanged is cited as a use case of source generators.
Winforms controls are no better in this regard. I've made source generators for it before, but nothing aspect oriented, because none of microsoft's frameworks aside from COM+ really gives you anything like proper AOP
Real programmers use butterflies