微软提供的功能强大的ASP-HTML转换工具.它将常用的ASP脚本转换为HTML从而减轻服务器的负担
您现在的位置: 学网 >> 网站开发 >> ASP教程 >> ASP技巧 >> 正文
学网教程

原作者:微软提供的功能强大的ASP-HTML转换工具.它将常用的ASP脚本转换为HTML从而减轻服务器的负担

[ 来源:xue5.com | 作者:原作者 | 时间:2005-5-15 | 去论坛]
Cutting Edge A Client-side Environment for ASP Pages
这是一个由微软提供的功能强大的ASP-HTML转换工具.它将常用的ASP脚本转换为HTML从而减轻服务器的负担

下面是官方的英文原版介绍资料

ASP is a Web technology that relies specifically on capabilities of Microsoft?Internet Information
Services (IIS). For this reason, very few commercial products have attempted to provide an ASP-to-HTML
converter. The problem with such converters is that you must work in conjunction with the Web server to
trigger the ASP parser and find the intrinsic objects available. When you double-click on an HTML page
from the Explorer shell, you simply ask the browser to retrieve and render the source code of the file.
However, when you double-click on an ASP file from Explorer, you cannot ask the browser to translate it
into HTML.


Practical Reasons for an ASP Converter
OK, so an ASP-to-HTML converter might not be the tool that thousands of programmers dream of every night.
However, I can envision at least a couple of scenarios where such a tool would be very handy. The first
scenario was mentioned by Robert Hess in the April 2000 Web Q&A column. Suppose you have several pages
that require some interaction with a database on a frequently visited Web site. Writing them as ASP pages
looks like the perfect solution. However, if the database is not very volatile and the page output is not
highly dependent on the user's input, you could easily resort to plain old HTML for better performance.
For example, a list of suppliers is probably the kind of data that you would update only a few times a
year. Why rebuild that list on the fly each time it's requested, when a static HTML page would incur less
overhead?
An ASP-to-HTML tool could be used as a kind of batch compiler for ASP pages. You write them as server-side
resources, and then when you realize they are not particularly dependent on runtime conditions, you can
transform them into static HTML pages with either the .asp or .htm(1) extension.
While I'm on the subject, let me point out a significant improvement in the management of scriptless ASP
pages that's available with IIS 5.0. Until IIS 4.0, all resources with a .asp extension were subject to
parsing, whether or not they contained script code. With IIS 5.0 this drawback has been eliminated as IIS
checks for <%...%> blocks before loading the ASP parser.
An ASP-to-HTML converter would also be handy when you need to view ASP pages offline. For example, a
client recently asked me about the possibility of using a single development environment for building both
Web sites and CDs. I first considered using static HTML pages that could be viewed over the Web or in a
local browser, but the idea was soon dismissed given the complexity and the amount of content involved.
Also, my client could not guarantee any particular software configuration on the user's machine, and

1
学网·特别声明:
本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。本站所有文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题,请联系编辑人员Xababy#Gmail.com,我们尽快予以更正。
设为首页 - 收藏学网 - 关于学网 - RSS订阅 - 版权申明 - 友情链接 - 联系学网 - 网站地图 - 投稿学网
学网·2004-2008版权所有
© CopyRight 2004-2008 WwW.Xue5.CoM.Inc All Rights Reserved
合作、建议、联系::cainiaoo.cn#live.cn QQ:329700200,1103290

学网_致力于提供优质免费的电脑学习教程
陕ICP备05000834号