I need a Web framework to build my site. I am proficient in C++ and C# and Microsoft SQL Server 2005. I work on Windows XP Professional 90% of the time and I like the .NET Framework very much.
Based on all this, I should have chosen ASP.NET (2.0) for my product’s Web site, yet I didn’t. Note that I have already built a (small) site with ASP.NET 2.0 so the experience is my own, not something that I have read on the Internet.
In this post, I’ll list the pros and the cons of ASP.NET 2.0. First, the good things about ASP.NET 2.0:
- The underlying framework (.NET Framework a.k.a. Framework Class Library or FCL) is great – it’s the same class library I use for the desktop product so I “know it” already (I put quotes because you can never really know a huge framework like that)
- The tools support is excellent, plus I use the same IDE as I use for my desktop product: Visual Studio 2005
- The debugging experience is flawless
- If you don’t know HTML, getting a decent site up fast is trivially easy
- Graphical preview of the site’s look while in the IDE is almost perfect
- There is Intellisense everywhere and the IDE can check compliance with various HTML/XHTML versions; the Intellisense even adapts to the schema chosen, so if you pick XHTML 1.0 Transitional you’ll get errors for each element or attribute that is not allowed
- There is a big community around it and many, many third party products to complement what Microsoft has offered us with the ASP.NET
- The internationalization support is way better than anything I’ve seen, on any platform
- There is a small Web server bundled with the IDE so you don’t need to have a “real” Web server on your development machine
- The documentation is good and the latest MSDN library is now free for anyone to download
- There is a free edition of Visual Studio 2005 (Web developer) and a free edition of SQL Server 2005 (Express) so technically it costs nothing to develop for this platform
Now for the list of what’s not so good:
- The deployment is confusing and the fiasco with the new project management is irritating; instead of using the same build engine (MsBuild) as for the other types of project, Microsoft decided to “innovate” and gave us Web Site “project”, only to subsequently give us Web Application project (as an add-on), plus the Web Deployment project (are you confused yet?); some of these add-ons simply do not work as advertised and generally things get really confusing with so much choice
- The SQL Server Express 2005 user instances feature is great, but the deployment has a tragic flaw – the idea is that you’ll simply put your database in the App_Data folder and xcopy it with the rest of your Web project (or deploy it using one of the several ways, see previous point), but this does not work; something needs to be registered somewhere, the easiest thing to do is to install Management Studio Express 2005 and attach the database at least once (!?!)
- While the general architecture of the ASP.NET pipeline is great, the UI generation is sub-optimal at best; if you do know HTML, you’ll end up fighting against the framework more than using it to get things done - just one example: instead of getting less markup in your “template” code than when using plain HTML, you end up having more markup; this applies mainly to the “customized” UI – if all you’ll do is to have labels on the columns of your data table (for example) identical to the names of the columns in the database and you’ll never customize any styles, then the generated markup is short and nice
- More on the UI generation – the Controls are a nice idea, but the markup they spit out is mostly hideous and not CSS friendly; Microsoft knows that and they’ve been working on Control adapters (I have even deployed one, the Tree control’s output was very ugly and bloated using tables), but this is a patch of something that should have been done properly in the first place and only complicates deployment even further; additionally, the control adapters project appears to be dead, with no updates since end up April so I can assume this to be just yet another CYA (cover your ass) side-project and not an honest effort
- The skins feature is nice but ends up putting all the styles inline, instead of in a CSS file where it can be shared (and cached by browser); additionally, the editor for skins which are nothing more than stripped down ASP pages does not support Intellisense unlike the rest of the IDE; fortunately, you can safely ignore skins and make a pure CSS site that is still skinable
- There is no object-relational mapping (ORM) layer per se, but there is a good support in the shape of ObjectDataSource that allows you to treat many things as data sources and then bind all of your UI to the ObjectDataSource; it almost works – try the most trivial, yet very frequent thing like inserting a row into a table which has an auto-incrementing id column (which may or may not be a primary key at the same time), then try to get back that id – it’s gonna get too complicated for such a simple thing
- The data adapters’ (the layer supporting the data sources) editor is very rude and will often overwrite the markup you’ve added or changed yourself (the underlying format is XML and is human readable)
- When things work, great; when they don’t, the documentation does not help – if you don’t do things the way the designers anticipated, prepare yourself for a lot of frustration, mainly because you’re trying to tweak something that should be trivial; I have previously posted two examples of this here and here
- While there’s a lot of code to assist you, there is no real framework to be used (a la MVC or something similar); in other words, the framework is mostly physical (lots of classes for a lots of uses) instead of logical, trying to guide you (and yes, even punish you when you do something stupid)
In general, looks like ASP.NET has been built mainly for Intranet applications and in-house developers or beginners. If you don’t care about the way the pages will end up internally (including the size), will work on IE and the rest be damned and just want to get the results quick, by all means choose ASP.NET. If you do care about standards, page size and using the framework instead of fighting it, you’ll have to look elsewhere. That may well be Ruby on Rails, but more on that in the next post.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5