CodeSOD: Conventional Events Note

CodeSOD: Conventional Events

The author criticizes ASP.Net WebForms' event-driven lifecycle as an outdated and flawed approach to web application design. Pete inherited a legacy application built using this framework by a former developer, Bob. Bob's code is characterized by excessively long methods, redundant code, and a custom, poorly implemented localization engine. Bob frequently used unnecessary and inefficient conditional return statements. WebForms typically rely on naming conventions for event handling, a practice Bob disregarded. Instead, Bob manually registered event handlers in every page, even when unnecessary. This approach, while avoiding naming conventions, lacked consistency and efficiency. The author shares a dislike for coding by convention but points out Bob's method was even worse. The overall legacy code is a significant problem for the current team.