Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      In-House vs. Outsource Node.js Development Teams: 9 Key Differences for the C-Suite (2025)

      July 19, 2025

      Why Non-Native Content Designers Improve Global UX

      July 18, 2025

      DevOps won’t scale without platform engineering and here’s why your teams are still stuck

      July 18, 2025

      This week in AI dev tools: Slack’s enterprise search, Claude Code’s analytics dashboard, and more (July 18, 2025)

      July 18, 2025

      I ditched my Bluetooth speakers for this slick turntable – and it’s more practical than I thought

      July 19, 2025

      This split keyboard offers deep customization – if you’re willing to go all in

      July 19, 2025

      I spoke with an AI version of myself, thanks to Hume’s free tool – how to try it

      July 19, 2025

      I took a walk with Meta’s new Oakley smart glasses – they beat my Ray-Bans in every way

      July 19, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The details of TC39’s last meeting

      July 19, 2025
      Recent

      The details of TC39’s last meeting

      July 19, 2025

      Simple wrapper for Chrome’s built-in local LLM (Gemini Nano)

      July 19, 2025

      Online Examination System using PHP and MySQL

      July 18, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Top 7 Computer Performance Test Tools Online (Free & Fast)

      July 19, 2025
      Recent

      Top 7 Computer Performance Test Tools Online (Free & Fast)

      July 19, 2025

      10 Best Windows 11 Encryption Software

      July 19, 2025

      Google Chrome Is Testing Dynamic Country Detection for Region-Specific Features

      July 19, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»CodeSOD: Conventional Events

    CodeSOD: Conventional Events

    April 16, 2025

    Now, I would argue that the event-driven lifecycle of ASP .Net WebForms is a bad way to design web applications. And it’s telling that the model is basically dead; it seems my take is at best lukewarm, if not downright cold.

    Pete inherited code from Bob, and Bob wrote an ASP .Net WebForm many many ages ago, and it’s still the company’s main application. Bob may not be with the company, but his presence lingers, both in the code he wrote and the fact that he commented frequently with // bob was here

    Bob liked to reinvent wheels. Maybe that’s why most methods he wrote were at least 500 lines long. He wrote his own localization engine, which doesn’t work terribly well. What code he did write, he copy/pasted multiple times.

    He was fond of this pattern:

    if (SomeMethodReturningBoolean())
    {
        return true;
    }
    else
    {
        return false;
    }
    

    Now, in a Web Form, you usually attach your events to parts of the page lifecycle by convention. Name a method Page_Load? It gets called when the load event fires. Page_PreRender? Yep- when the pre-render event fires. SomeField_MouseClick? You get it.

    Bob didn’t, or Bob didn’t like coding by naming convention. Which, I’ll be frank, I also don’t like coding by naming convention, but it was the paradigm Web Forms favored, it’s what the documentation assumed, it’s what every other developer was going to expect to see.

    Still, Bob had his own Bob way of doing it.

    In every page he’d write code like this:

    this.PreRender += this.RequestPagePreRender
    

    That line manually registers an event handler, which invokes the method RequestPagePreRender. And while I might object to wiring up events by convention– this is still just a convention. It’s not done with any thought at all- every page has this line, even if the RequestPagePreRender method is empty.

    [Advertisement]
    Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleWith 5 min EV-charging and $9M revenue, Nyobolt secures $30M to scale high-power battery tech
    Next Article The Return of the UX Generalist

    Related Posts

    News & Updates

    I ditched my Bluetooth speakers for this slick turntable – and it’s more practical than I thought

    July 19, 2025
    News & Updates

    This split keyboard offers deep customization – if you’re willing to go all in

    July 19, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    GTKTerm – serial port communication software

    Linux

    CVE-2025-46375 – Apache Struts Deserialization Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-46626 – Tenda RX2 Pro AES Key Reuse Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-6844 – Simple Forum SQL Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    T-Mobile launches high-speed home internet service – see if you can get it

    June 3, 2025

    Customers can choose from four plans, and each includes a Wi-Fi 6 router, unlimited data,…

    CVE-2025-46378 – Apache HTTP Server Unvalidated User Input

    April 24, 2025

    CVE-2025-4909 – SourceCodester Client Database Management System Directory Traversal

    May 19, 2025

    RoboCat: A self-improving robotic agent

    May 13, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.