Author: Qing Apple Computer Studio
Number of clicks in this article: 351
This article is compiled manuscript.
You just release the latest huge ASP application to the Internet. The file is correctly uploaded to the server, and the link with the application is also
Good work. Before celebrating the victory, you want to run some stats in the performance of the application to find out how good it is. result
However, it is found that applications that have worked well in the development environment actually run very slowly.
For those who use Microsoft software for a long time, DNA represents the distributed Internet structure, which is another very popular
n layer of application structure of the first letter abbreviation. Microsoft is committed to the development of distributed applications developed on the Internet.
Based on this idea, it is not surprising that it will be popular, stateless, and compatible applications in the future.
The above is a typical icon used for the N -layer environment. Web class (IIS application) is not necessary, because ASP can be directly from the expression layer
Or a component dialogue between the business rules layer. Because most applications are written by ASP separately, a reasonable problem is:
Why turn the code into the COM component?
In my opinion, ASP is only used to express layer code, so I chose to access business rules or data in any form of data
They are all installed in the COM component. Under normal circumstances, I have divided the application code into each component from the beginning, but usually you cannot choose
Choosing the structure to be processed, so code transmission is a practical problem. In a N -layer application, you must try your best to make the non -express code
Moles from ASP as soon as possible.
Perhaps you are not currently programming N -layer programming, so the appropriate time for transplant code is when the performance performance is beginning to weaken. Usually, this refers to
Your boss said that "the program is a bit slow today" and "You were fired". Once the user starts to complain, it is too late.
The second policy of using the transplant code is that when you have enough similar code (such as all data access), you can put it in a file
(.inc) to ensure a COM component. How many programs are enough? This question is raised well! When writing a small MTS component, I
It is enough to create a COM component when it is found that there is a program. But there is only one program COM component very rare, so for this
The problem needs to be judged. If the code you write is long enough, you will start development. When you encounter ASP's "dark noodles"
After that (AKA COM component), you will feel its power.