CodeSOD: The Pirate’s Code

This post was originally published on this site

The Daily WTF

We’ve talked about ASP .Net WebForms in the past. In this style of development, everything was event driven: click a button, and the browser sends an HTTP request to the server which triggers a series of events, including a “Button Click” event, and renders a new page.

When ASP .Net launched, one of the “features” was a lazy repaint in browsers which supported it (aka, Internet Explorer), where you’d click the button, the page would render on the server, download, and then the browser would repaint only the changed areas, making it feel more like a desktop application, albeit a laggy one.

This model didn’t translate super naturally to AJAX style calls, where JavaScript updated only portions of the page. The .Net team added some hooks for it- special “AJAX enabled” controls, as well as helper functions, like __doPostBack, in the UI to generate URLs for “postbacks” to trigger server

To read the full article click on the 'post' link at the top.