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

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 5, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 5, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 5, 2025

      In MCP era API discoverability is now more important than ever

      June 5, 2025

      Google’s DeepMind CEO lists 2 AGI existential risks to society keeping him up at night — but claims “today’s AI systems” don’t warrant a pause on development

      June 5, 2025

      Anthropic researchers say next-generation AI models will reduce humans to “meat robots” in a spectrum of crazy futures

      June 5, 2025

      Xbox just quietly added two of the best RPGs of all time to Game Pass

      June 5, 2025

      7 reasons The Division 2 is a game you should be playing in 2025

      June 5, 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

      Mastering TypeScript: How Complex Should Your Types Be?

      June 5, 2025
      Recent

      Mastering TypeScript: How Complex Should Your Types Be?

      June 5, 2025

      IDMC – CDI Best Practices

      June 5, 2025

      PWC-IDMC Migration Gaps

      June 5, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Google’s DeepMind CEO lists 2 AGI existential risks to society keeping him up at night — but claims “today’s AI systems” don’t warrant a pause on development

      June 5, 2025
      Recent

      Google’s DeepMind CEO lists 2 AGI existential risks to society keeping him up at night — but claims “today’s AI systems” don’t warrant a pause on development

      June 5, 2025

      Anthropic researchers say next-generation AI models will reduce humans to “meat robots” in a spectrum of crazy futures

      June 5, 2025

      Xbox just quietly added two of the best RPGs of all time to Game Pass

      June 5, 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

    Google’s DeepMind CEO lists 2 AGI existential risks to society keeping him up at night — but claims “today’s AI systems” don’t warrant a pause on development

    June 5, 2025
    News & Updates

    Anthropic researchers say next-generation AI models will reduce humans to “meat robots” in a spectrum of crazy futures

    June 5, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Minecraft friendly ghasts and Vibrant Visuals are rolling out to players

    News & Updates

    A User Researchers’s Guide to Thinking About the Job Market

    Web Development

    Build a Forum With Laravel: He Likes Me Not

    Development

    Introducing Gemini 2.5 Flash

    Artificial Intelligence

    Highlights

    CVE-2025-5712 – SourceCodester Open Source Clinic Management System SQL Injection

    June 5, 2025

    CVE ID : CVE-2025-5712

    Published : June 6, 2025, 3:15 a.m. | 29 minutes ago

    Description : A vulnerability has been found in SourceCodester Open Source Clinic Management System 1.0 and classified as critical. Affected by this vulnerability is an unknown functionality of the file /appointment.php. The manipulation of the argument patient leads to sql injection. The attack can be launched remotely. The exploit has been disclosed to the public and may be used.

    Severity: 7.3 | HIGH

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

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

    April 29, 2025

    CVE-2025-5634 – PCMan FTP Server NOOP Command Handler Buffer Overflow

    June 5, 2025
    APT29 Deploys GRAPELOADER Malware Targeting European Diplomats Through Wine-Tasting Lures

    APT29 Deploys GRAPELOADER Malware Targeting European Diplomats Through Wine-Tasting Lures

    April 20, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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