I just got a .NET Briefing e-mail newsletter in which the author purports to (among other things) take on the OOP-ness of the ASP.NET control architecture. In it, he compares the following two pieces of code (bold mine):
<asp:Repeater ID="myRepeater" runat="server">
<%# DataBinder.Eval(Container.DataItem, "UserName") %></p></ItemTemplate>
<asp:Repeater ID="myPythonRepeater" runat="server">
<%# UserName %></p></ItemTemplate>
The first is the traditional C# way of doing a Repeater, while the second is the IronPython equivalent. The author writes:
That’s quite a bit cleaner and easier, right? As Scott Hanselman likes to put it, that’s just the effect of “syntactical sugar” thrown into the mix to enable developers to type less. Under the covers, data-binding is still going on and you’ll obviously need to wire up a data source . But this is a much easier way to handle data-binding, even if it doesn’t look pure from an OOP standpoint.
Is this really that big of a deal? Sure it’s cleaner, but what does this have to do with theoretical arguments about data decoupling and the new ASP.NET MVC architecture? Not much. Syntactic sugar is a tricky subject to deal with, but regardless, it rests above (in the stack-dependency sense) the deeper issues of decoupling and architecture.