DISQUS

Community Page on DISQUS

what is this?

Jump to original thread »
Author

The UpdatePanel is evil

Started by Glenn Slaven · 3 months ago

How’s that for an inflammatory title?

Let me prefix this post with a brief disclaimer.  I like Microsoft’s .NET platform.  C# is a great language to work in, it’s flexible & powerful.  Plus, the .NET framewo ... Continue reading »

4 comments

  • I totally agree with you. They are great tools, but you should invest some time to understand how these tools work behind the scenes.
  • I've recently started working in C# and ASP.NET after years of using PHP, Perl, Java and Python on mostly UNIX platforms.

    Honestly, I like ASP.NET a lot. The basic templating system, that lets you manipulate the ASP.NET document at the DOM level is fantastic.

    The Web Controls, however, are retarded. They make ASP.NET seem like an advanced incarnation of 1990's web construction rather than the kind of modern framework application that good programmers are building in Ruby, PHP, Java and other languages -- it's like they're trying to compete with Cold Fusion, not the living languages that people are using now.

    I 'd love to have something that works like Web Controls, but the viewstate concept just isn't compatible with the modern approach that people call MVC: real internet applications need the ability to display different 'views' based on form input and database results -- to carry information through a series of related forms. Viewstate is completely incompatible with that, not to mind the browser back button. Reliable applications keep ~most~ form state in hidden variables, or implement something that has the same semantics: there's a very limited amount of stuff that you can keep in session scope if you want to make apps that really work.

    Perhaps Microsoft's MVC framework for ASP.NET will improve the situation, or perhaps somebody will make something that looks a lot like the web controls but that actually works.
  • Very good point. However, I have to disagree that UpdatePanel is evil. It just have to be used carefully, like you mentioned. The tool that can really help you with ASP.NET Ajax is Web Development Helper. It really rocks! Check the description here http://www.jankoatwarpspeed.com/post/2008/04/21...
  • Whenever I hear "X technology makes Y functionality too easy", I cringe. It's ease of use is not the problem; in fact, that is its great value. The fact that the implementation is hidden from you is the problem. In fact, that's my problem with many MS tools/frameworks/etc.: they make it easy to get started, but they don't give you the option to dig into the internals to solve the really tricky problems. With the UpdatePanel, I believe you can dig into the javascript files if you're really interested, but I'd much rather have a handy debugger visualizer that showed me exactly what was being sent and received in each ASP.NET AJAX request.

    And on your point of "you're doing it wrong" by setting the visibility, your blanket statement is not accurate. If the div contains ASP.NET validation controls, you need to set the visible property on the div. If you just change the display style, you'll end up with a validation control hidden but preventing (possibly) the page from being posted. That's a very bad and confusing thing.

Add New Comment

Returning? Login