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

      Top 10 Use Cases of Vibe Coding in Large-Scale Node.js Applications

      September 3, 2025

      Cloudsmith launches ML Model Registry to provide a single source of truth for AI models and datasets

      September 3, 2025

      Kong Acquires OpenMeter to Unlock AI and API Monetization for the Agentic Era

      September 3, 2025

      Microsoft Graph CLI to be retired

      September 2, 2025

      ‘Cronos: The New Dawn’ was by far my favorite experience at Gamescom 2025 — Bloober might have cooked an Xbox / PC horror masterpiece

      September 4, 2025

      ASUS built a desktop gaming PC around a mobile CPU — it’s an interesting, if flawed, idea

      September 4, 2025

      Hollow Knight: Silksong arrives on Xbox Game Pass this week — and Xbox’s September 1–7 lineup also packs in the horror. Here’s every new game.

      September 4, 2025

      The Xbox remaster that brought Gears to PlayStation just passed a huge milestone — “ending the console war” and proving the series still has serious pulling power

      September 4, 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

      Magento (Adobe Commerce) or Optimizely Configured Commerce: Which One to Choose

      September 4, 2025
      Recent

      Magento (Adobe Commerce) or Optimizely Configured Commerce: Which One to Choose

      September 4, 2025

      Updates from N|Solid Runtime: The Best Open-Source Node.js RT Just Got Better

      September 3, 2025

      Scale Your Business with AI-Powered Solutions Built for Singapore’s Digital Economy

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

      ‘Cronos: The New Dawn’ was by far my favorite experience at Gamescom 2025 — Bloober might have cooked an Xbox / PC horror masterpiece

      September 4, 2025
      Recent

      ‘Cronos: The New Dawn’ was by far my favorite experience at Gamescom 2025 — Bloober might have cooked an Xbox / PC horror masterpiece

      September 4, 2025

      ASUS built a desktop gaming PC around a mobile CPU — it’s an interesting, if flawed, idea

      September 4, 2025

      Hollow Knight: Silksong arrives on Xbox Game Pass this week — and Xbox’s September 1–7 lineup also packs in the horror. Here’s every new game.

      September 4, 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:

    <span class="hljs-keyword">if</span> (SomeMethodReturningBoolean())
    {
        <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;
    }
    

    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:

    <span class="hljs-keyword">this</span>.PreRender += <span class="hljs-keyword">this</span>.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

    ‘Cronos: The New Dawn’ was by far my favorite experience at Gamescom 2025 — Bloober might have cooked an Xbox / PC horror masterpiece

    September 4, 2025
    News & Updates

    ASUS built a desktop gaming PC around a mobile CPU — it’s an interesting, if flawed, idea

    September 4, 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

    Rust compie 10 anni: storia di una rivoluzione che sta cambiando il mondo della programmazione di sistema

    Linux

    Forget Back to School Deals — Lenovo’s Clearance Sale is Where You’ll Find Amazing Discounts on Laptops, Mini PCs, and More, While Supplies Last

    News & Updates
    Power-hungry AI will devour Japan-sized energy supply by 2030

    Power-hungry AI will devour Japan-sized energy supply by 2030

    Artificial Intelligence

    CVE-2025-4919 – Mozilla Firefox Out-of-Bounds JavaScript Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    CVE-2012-10050 – CuteFlow PHP File Upload Vulnerability (Arbitrary Code Execution)

    August 8, 2025

    CVE ID : CVE-2012-10050

    Published : Aug. 8, 2025, 7:15 p.m. | 6 hours, 9 minutes ago

    Description : CuteFlow version 2.11.2 and earlier contains an arbitrary file upload vulnerability in the restart_circulation_values_write.php script. The application fails to validate or restrict uploaded file types, allowing unauthenticated attackers to upload arbitrary PHP files to the upload/___1/ directory. These files are then accessible via the web server, enabling remote code execution.

    Severity: 0.0 | NA

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

    Chinese Hackers Exploit Trimble Cityworks Flaw to Infiltrate U.S. Government Networks

    May 22, 2025

    Last week in AI dev tools: Cloudflare blocking AI crawlers by default, Perplexity Max subscription, and more (July 7, 2025)

    July 7, 2025

    Rilasciato LXD 6.5: Novità e Miglioramenti nel Gestore di Contenitori e Macchine Virtuali di Canonical

    August 4, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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