Sunday, February 11, 2007

ATL Server is much faster than Script

Today I spent about six hours rewriting an ASP page with C++. The existing page was too slow - it took a whoopee 10 seconds to load. It is an ASP page written in VBScript. A lot of database code inside. Theoretically we could optimize the database queries to make it faster; but I decided to rewrite in C++ instead.

It turns out much better result than I expected. I am a C++ programmer. C++ is a much better language in many tasks, but I never thought that it is also useful for creating a robust web application.

An ATL server project includes two parts - a SRF file and a web application DLL. This arrangement makes the separation of presentation (UI) and logic possible. I have not thought about this before; but I can also build logic blocks and UI blocks as well. The SRF syntax is a little bit limited; but it does support the include syntax which allows you to include a static HTML file or another SRF.

No comments: