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.
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- Generic Generics in Managed C++
- How to store image outside of the website's ro
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
.aspx pages are for dynamically generating html (and javascript etc.). Either the same small set of .aspx pages should generate output for all the blog entries (stored in a series of fields) or (for performance reasons) pre-generated html could be stored in the db (best) or .html pages.
Generating an .aspx page for each blog entry is generating the tool for generating content. It doesn't make sense for any normal. There will be needless overhead in that system. Without knowing his exact plan, I can still be sure that at least some of the following apply:
There are two broad kinds of CMS publishing platform:
.
A hybrid system were you generate statically file that will be rendered dynamically (.aspx) is to me a non-sense -- it has the disadvantages of both.
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.