The first 1.0 release of ASP.NET introduced a way of building web sites that was very different from classic ASP. Developers that had grown up with script embedded in HTML that executed on demand were suddenly faced with a full blown object oriented web framework. For enterprise developers like me who had been chaffing at the awfulness of VB script, it was a revelation. But for many casual web designers working on simple sites, the new complexity was overwhelming.
Take my friend Roy for example. He’s a successful freelance web designer/developer. Typically he takes requirements from small businesses and knocks out small sites usually with a simple backend database. His programming chops are limited to simple control structures; “what more do you need than an ‘if’ statement?” He has no interest in learning object oriented programming. He sees it as academic and over complex. I have no doubt that Roy would epically fail if he was tasked with building the kind of large scale enterprise applications that I work on. But he doesn’t do that; instead he has many satisfied small business customers that really like his quick, pragmatic and cost-effective approach.
Soon after ASP.NET was released he used it to build a web site for a business idea he had. Rather than his usual ‘few days’ turnaround, he spent weeks trying to get a handle on the new model. He just about managed to make it work, but he was enormously frustrated. He never touched ASP.NET again. To this day he codes his sites using classic ASP. He’s mostly abandoned Visual Studio and instead works with Dreamweaver. As far as he is concerned Microsoft lost their way with ASP.NET.
Many small web design shops felt the same way. At around the same time the LAMP stack was really taking off. PHP was just like classic ASP, but better. If used with a tool like Dreamweaver, the web design experience was excellent. For an ‘if statement’ man like Roy it offers a far more compelling alternative than complex object oriented world of ASP.NET. The word on the street was that PHP rocked and ASP.NET sucked.
Microsoft was listening, and they panicked. With the release of Visual Studio 2005, in a desperate attempt to keep the scriptable template market, they removed the classic ASP.NET web project and replaced it with the abomination known as the ‘web site’. Rather than give the Roys what they really wanted: a better classic ASP; they created a monster.
The ‘web site’ project type tries to pretend that .NET is a scripting environment by implementing on-the-fly page-by-page compilation and removing namespace conventions. It tries to pretend that a site is just a bunch of files by removing the MSBuild project file and doing strange things with the solution file. If you mistakenly chose to use the web site project type for enterprise application development (and you had no choice for a while) you soon found yourself in a world of pain. Just try having a separate unit testing project, or doing CI.
The loud and clear WTFs coming from the enterprise developer community meant that Microsoft quickly resurrected the original Web Application project type, first as a patch and then as part of SP1. But they couldn’t quite bring themselves to admit what a huge mistake web-site was, so there it sits, waiting to snare the naïve developer. Don’t be fooled, if you are building serious web applications use Web Application. If you want scripted templates, use PHP.