Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3434752
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:44:13+00:00 2026-05-18T07:44:13+00:00

I recently read an interesting blog post on Anders Hejlsberg’s arguments against AOP. The

  • 0

I recently read an interesting blog post on Anders Hejlsberg’s arguments against AOP.

The first anti-anti argument mentions data binding:

Myth 1. “Aspect-oriented programming is interesting for debugging and instrumentation of code and is not a full-fledged programming discipline.”

Truth 1. Anders probably stopped at the “Hello, world” example.

Although code instrumentation is certainly an important use case of AOP – and the one you would see in every “getting started” documentation – the technology significantly simplifies the work of developers when it comes to implement any non-trivial, real-life application. Just to cite a few real-life scenarios where AOP really helps:

* Data Binding (INotifyPropertyChanged) 

I’m trying to think of how AOP is used in a data binding scenario. I always assumed that binding relied on reflection to do it’s "magic." I’m pretty sure everything you need in a binding scenario is available via reflection. Is AOP being used for a (slight) performance boost?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:44:13+00:00Added an answer on May 18, 2026 at 7:44 am

    It’s not the databinding he’s referring to, but the INotifyPropertyChanged (and similar) part that AOP would really shine.

    Currently, when a class implements INotifyPropertyChanged, properties look like this:

    private bool _isSomeProperty;
    public bool IsSomeProperty
    {
      get{ return _isSomeProperty;}
      set
      { 
        if( value != _isSomeProperty)
        {
          _isSomeProperty = value;
          OnNotifyPropertyChanged( "IsSomeProperty");
        }
      }
    }
    

    Where with decent AOP, they could look like this

    [NotifyOnChange]    
    public bool IsSomeProperty {get; set;}
    

    Makes a big readability difference, especially when the setter for a couple properties has a few actual rules in it.

    Even with generic base classes, Expressions, Reflection, and some tricky implementations, the best you hope for is:

    private bool _isSomeProperty;
    public bool IsSomeProperty
    {
      get{ return _isSomeProperty;}
      set
      { 
        SetAndNotify( x=>x.IsSomeProperty)
      }
    }
    

    And even that’s not as readable (and is less performant as well)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently read a blog post about the Reddit hotness formula . The formula
Recently read this SO Post ...first answer is nutz. Basically it is theoretically impossible
I recently read Ayende's blog post on automatic registration working with XML Configuration. I
I recently read the following overflow post: Hidden Features of C# One of the
I recently read a post about no longer needing to declare ivars as well
I've recently read an interesting thread on the D newsgroup, which basically asks, Given
I recently read Scott Chacon's post Smart HTTP Transport , and I was hoping
I recently read this post: Floating point vs integer calculations on modern hardware and
I recently read the blog posts on Pushing Pixels that describe how to achieve
I recently read a post on The Anemic Domain Model Pattern which caught my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.