Coffeehouse Post

Single Post Permalink

View Thread: I can't believe how much web programming has changed
  • User profile image
    Sven Groot

    I've been toying with the idea of reworking my website, not because I use it particularly often, but because I wanted to have a not too complicated programming project and look at some of the technologies that I've not had any time to keep up with in the past few years.

    When I originally designed my site, IE6 support was still a real consideration. Which meant no transparent PNGs and no CSS niceties like max-width. While AJAX existed, the built-in support in ASP.NET was quite bad (if you recall, it was centered around sending full HTML components). JSON was not in common use yet, so I ended up writing my own custom AJAX library built around .asmx services and client-side XML parsing (which was lots of fun considering IE is the only browser that reliably implements XPath so I couldn't use that). JQuery was still years away.

    Now though, I'm using ASP.NET MVC 4, EF5, HTML5, CSS3, jQuery, Modernizr, knockout.js, and Zurb Foundation. And I can't believe how much this has evolved. Now, if you've got a requirement for the site to look and feel the same on older browsers (particularly anything before IE9), I think you're going to be in a world of hurt. But if you have the luxury of being able to target the modern stuff, it's really amazing how much better things are now.

    The various javascript frameworks are taking care of most of the cross-browser woes that I previously had to deal with myself. I've barely had to write any javascript yet, almost everything that I previously did myself now exists in library form. I'm even getting a whole bunch of new features, like responsive layout.

    I'm really enjoying working with MVC 4. Razor is by far the nicest server pages syntax I've ever used. It's extremely clean, far more readable than regular ASP.NET or the atrocity that is PHP. It's also much easier to generate clean markup than with Web Forms, and the integration of the javascript frameworks is very nice too. The amount of code I actually have to write seems less than a tenth of the old .aspx pages, for the same effect.

    When I last did serious web development work, I used VS2005, so I'm not sure how much of what I'm using now is new to 2012 or existed before. But the javascript support is 1000x better than I remember it being before, as is the HTML editor itself (little touches like how it changes the closing tag if you edit the opening tag). And the page inspector is awesome, especially the way it dynamically updates the view when you're editing a CSS file (would be nice if it could do that for .cshtml files too, but I understand why that would be hard).

    It's also very helpful that for nearly everything I've needed so far, I could just easily find it with NuGet and drop it into the project with minimal effort. It makes it much more painless to use all the different libraries.

    So yeah, I'm impressed how far this has come. I'll never become a huge fan of javascript and will always do something in C# if I can, but it's a lot better than it used to be. I can only hope that legacy browsers will at some point die out completely, and web development might actually be fun for more than the odd project every N years (because I sure as hell still don't want to do this for a living Wink ).