Under the Covers: Architecture at AnandTech and the Performance of ASP.NET
- Posted in
- IT Computing
Architecting www.anandtech.com
In a previous article about our migration, we discussed briefly what we did to move to ASP.NET. In this edition, we'll go into a bit more detail specifically on the development side.AnandTech consists of a few different applications that make the entire site operate. The main website (www.anandtech.com) serves the articles that we write - this was the first application that we migrated. The migration of the main website was fairly straightforward; we simply ported our ColdFusion code into ASP.NET, learning new syntax as we went. We made use of the code-behind techniques for which ASP.NET is known as we ported parts of the application. And, we wrote a web API similar to our old ColdFusion site to handle back-end logic. Each time that a request begins, we have an init class, which handles instantiating the framework for the page request. The page inherits the web-based API and can then execute methods for the various operations in the pages. This is not much different than most web-based applications of this size.

One thing that we took for granted in our old ColdFusion website was debugging output. ColdFusion has a fairly unique feature that allows you to expose debugging output for a page request. This output consists of the various web-based variables, form, URL and the contents of cookies. It also outputs the SQL syntax submitted to the RDBMS and the various method calls made to any functions in the application. This type of debugging output is extremely helpful when troubleshooting a problem or even when tuning an application, as you can see clearly what the page is doing and how long it's taking to perform each individual method call or query to the database.
So, during our development of the API, we wrote a debug class, which tied into our database class and the OnRequestEnd event from the Global.asax part of the .NET framework. Essentially, it tracked query calls and variables and outputted the data in the OnRequestEnd event of the page request.

Originally published at https://www.anandtech.com/show/1555 (Wayback Machine).