Some modifications to the template class for ASP. net1.1 Development

Source: Internet
Author: User
The stringtempletreplet. dll component updates some algorithms. It mainly depends on the values in the static variables in the memory.
Without changing the template. Cache template, cache delegate, cache tag parsing data. However, this will consume more memory.

In order to dynamically change the template, you have to check the file time each time. This consumes a lot of time. Maybe it should be removed in the future
The dynamic template change function provides only one interface for the notification template class to re-read the template file. Cancel this page (retuenstring. aspx -- accept the tag string and return the resolution result)
After all, tags are not made into a scripting language. This function is meaningless. Some people say they don't know how to use this template class here:

The template class is mainly used to read not the whole page template. It mainly refers to the read page fragment template. Read fragments, parse, and display.
In the Web site, such as blog development. Custom Skin page. Or the whole static page news system is being updated.
Is very useful.

The tag function is extended by the tag parsing function. Therefore, the speed of the template class is not only the stringtempletreplet. dll component
The execution speed. The execution time of the tag parsing function is also added. The tag parsing function provided in my example only returns a simple string.
It is to facilitate the name. The template class only provides a stage. And try to make the execution of the template class faster. Tag Parsing
Is the function always executed. Time used. That is the use of people. The regular expression replacement template class has also been written. However, you can perform tag locating analysis on a string of more than 2 million characters. Than pointer Positioning
It is more than 8 times slower. When the template string length is continuously reduced. The gap may be reduced. However, even if the two tags are located at the same time
Same. According to the unchangeable character string, constant replacement of a character string will generate a new character string. Resource consumption is too high. Business. CS can be placed on the ui or logic layer. You only need to inherit the functionlist class. Inherit this class as long
Rewrite the static constructor. Create a tag and a tag execution function in the static constructor.
In fact, an execution label has been written in previous versions. Add the "execute _" mark before the tag name.
{$ Execute _ Tag Name: parameter 1: parameter 2: parameter 3: character 10 $}
In this way, you do not need to override the static constructor. Is executed through reflection. But the speed is slow. It was canceled later. After all, for the template class
Speed is critical. I don't have a fixed location for you to download. In the past, the compressed file was supposed to be a GIF image. To Netease's personal data. However
Later, Netease detected the image. This makes everyone unable to proceed. I'm looking for a new location. The Image Location varies. Now is the http://www.93913.com/Edit_html/UploadFile/20065/200652205536669.gif as long as the picture has not been deleted. You can change the image at this location to the templet.rar file (Sorry, the image is deleted. I am too busy to launch the project team phase II project. The boss is under too much pressure. I can't take it anymore. After reading the mailbox, I can't find it. Thank you for reminding me)
Link
/Files/vitality2007/templateweb.rar
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.