Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Top 3 reasons not to develop a "blog system" that generates aspx files on the fly

In this question the OP implies that he wants to base the blog system he is developing on automatic creation of .aspx files, one for each new blog entry. In my answer to his question (which is related to something else), I told him that I would discourage him from using such an approach, but without giving any real reasons. He is now wanting reasons why it is not a good idea, and I'm using this question to see if the community can come up with a compelling enough list of reasons for him to use another approach, such as one using a dbms, code-reuse, url-rewriting, MVC, and what not.

like image 954
Klaus Byskov Pedersen Avatar asked Mar 10 '10 17:03

Klaus Byskov Pedersen


1 Answers

Generating separate ASPX files for each article is inefficient use of server resources:

  • every new aspx file will get compiled to a DLL. This means an additional execution time overhead for compiling the article + memory overhead through recreation of a new AppDomain that contains this new DLL

  • it's possible to configure ASP.Net to compile all ASPX files in a single DLL file, but that would be even worse: ALL articles will have to be recompiled every time a new article is generated

A more acceptable solution (but even then, not the one I would recommend) would be to generate static .html files.

like image 159
ckarras Avatar answered Sep 18 '22 15:09

ckarras