Crystal translation-yesky
How to optimize and buffer storage?
Based on the first request of the script, runtime compiles the code and caches the compilation result to copy (back up). Whenever the script has
The stored copies can be called up and used. This result greatly enhances the system performance, because after the first request, the code can run faster from the compiled version.
Someone may ask, "How does it know when I made changes ?" Microsoft has answered this question. Runtime monitors source files through the file system.
When the initial source file changes, it automatically pulls the compiled version from the high-speed buffer storage backup. Therefore, when the next requirement comes, it will be re-compiled
Compilation. This means that the system will automatically compile the code, and programmers will no longer have to worry about manual compilation.
Caching
For most system developers, they must develop some "caching" to speed up the system. Whether the ASP page is output to the HTML file format
Network connection speed is very slow. Or from a slow reference to the internet link, to the recordset status and the e-mail token on the roaming form, or even
The Database Dynamic-driven menu is not actually completely dynamic-driven. You cannot waste a lot of time for each customer's request. When creating a website, generally,
A small amount of data will not change continuously, but because they are not dynamic in the true sense, it does not mean to complicate the code, where are they? So, you
You need to develop some caching
The basic caching activity is to first select the appropriate data for storage. Then you need to place them in the application-level variables in the program. However
To identify the code. Then, you have to decide how long the data will be stored and write the program to clear the caching in time. However, if you clear the caching
Then, the program used must have the function of restoring data.
A caching System is established in ASP. NET. This makes the entire system more object-oriented than before, so that the caching System can also store objects. Because
This can be called at any time, regardless of the time of caching. You can set the data storage time as needed to create various types of environments. File System
You can even link a detailed project to a file, so that when the file changes, the linked project will be stored at the same time.
ASP. NET also stores output data. Is ASP. . NET script results in a backup, so when someone calls it, it does not even need to run
Line. The correct output result is already being sent. It mainly works based on query strings. If the parameter cannot match the stored parameter
The page is redirected to the storage version.
Sometimes, it is a little tricky to determine what needs to be stored Based on the site, but at least it is not needed now.
Faster and easier development
Any development platform will provide you with a solid-state environment. In ASP, although the performance of this environment is excellent, it is actually useless.
ASP. NET, before you write your first line of code, this environment is ready for you. In the past, programmers had to focus on designing perfect programs.
Complex annoying work, now this environment has been completed for you.
Object-Oriented model
When your code runs faster than ever before, you have a real event model and can control it. In the past,
If you want a program to run earlier, you have to put the program in front of the page, instead, at the back of the page. This method is often not used
So you have to build your code in a variety of ways to achieve the desired effect. This "spaghett-code" problem can be solved by using a large number
For example, page_load
Each page-level object has its own event model and has Server events that can be activated. Similar to Button_Click or
The Listbox_Change routine can process standard forms and handle a large amount of relatively simple daily work on your behalf. It is also possible to read code,
This means that even if a program encounters a problem six months later, you can find your previous settings and debug them in time.