Tag Soup

Jeff Atwood posts about the exact thing I thought when I saw the MVC tidal wave coming to overtake web forms. It feels like I'm back in the 90's, doing old-school ASP, because of the tag soup.

Don't get me wrong - I'm all about separation of concerns and such, but every time I look at something like MVC, I see all roads leading to web forms. Maybe different web forms, but web forms nonetheless.

  • Too much tag soup? Package stuff up in helper methods.
  • Oh, wait, the helper methods that generate control structures aren't really flexible enough to allow overridden behaviors or wire things up (like validation). Let's make them instance methods on objects.
  • Hmmm, there's sort of an object lifetime to manage here, and wouldn't it be nice if the packaged widget could be a little smarter about handling view data? Like dynamically populating itself based on data and letting me know if the user changed stuff, because writing that every time is such a pain.
  • Hang on, that's web server controls.

Some folks argue they want that "tighter control over the HTML" that the tag soup provides. I, personally, am much less interested in hacking HTML. Let the framework do it for me. I'm more concerned with the business logic anyway.

I've done my share of classic ASP style development in lots of different server side languages, and it always ends up that to get rid of the tag soup, you head towards web forms.

posted on Monday, July 21, 2008 11:12 AM | Filed Under [ Web Development ]

Comments

Gravatar # re: Tag Soup
by Ben Scheirman at 7/21/2008 2:22 PM
The more webformsy (TM) you go, you end up re-creating most of html in a parallel api just for the sake of having the ability to tweak it server side.

Combine that with the fact a number of the controls rendered shitty HTML (ahem asp:Menu) -- sure you can use ControlAdapters but now your complexity has shot up farther than if were to just roll your own.

I think that MVC has a ways to go, and surely some direction in what NOT to do in your views... but I've found that NVelocity is quite nice to read.
Gravatar # re: Tag Soup
by Lucas Goodwin at 7/21/2008 4:13 PM
The thing everyone forgets is that Classic ASP was very good for actually building and rendering your HTML, getting JavaScript to behave, minimizing what you're serving, etc.

Where Classic ASP failed was on the server-side in terms of debugging, access to ISAPI, building abstractions, connecting to DBs, etc. These are all the good aspects of ASP.NET once WebForms are removed.

There's a reason why "Tag" soup is coming back. It's quick, it's easy, and if you make a little effort to keep logic to a minimum, it's a very lite soup as well. And frankly, it's a much easier to maintain than the event system of WebForms.
Gravatar # re: Tag Soup
by Prodis at 7/22/2008 3:41 AM
I don't agree you, Lucas.
Tag soup isn't easier to maintain than Web Forms.
Changes in layout is an example. The "spaghetti code" will be affect always.
The separation of logic view in the code behind is the point.
"Cada um no seu quadrado (Each one in your place)".
Comments have been closed on this topic.