CJ,英文不错吧,我就不翻成中文再卖给你了。
(主要是翻不好怕大家看不懂
The two branches of the ISAPI, Internet Server Applications (ISAs)
and ISAPI Filters, comprise two different schools of thought on how
programmers can approach additional functionality. ISAs are the more
traditional of the two, leading programmers to develop something
that's more of an external component with special links back into the
server's workings. ISAPI Filters are closer to building blocks, which
can be attached directly to the server, providing a seamless
component that carefully monitors the HTTP requests being directed at
the server. Since each has its own particular way of being dealt with
by the server, I'll look at them as separate entities, and tie
together the common points where they conveniently overlap.
Internet Server API Filter
ISAPI filters are quite different from a traditional CGI program. If
ISAPI DLLs make a server more flexible, ISAPI filters turn a server
into a true contortionist, able to flex whatever way they need to.
They're not just resident with the server, they're part of the server
itself, having been loaded into memory and the server's configuration
ahead of time. They're direct extensions of the server, allowing them
to do tasks that no CGI program could think of doing, such as
enhancing the local logging of file transfers, building in pre-
defined methods of handling forms or searches, and even doing
customized local authentication for requests. You're making the
server evolve into something more powerful, instead of adding pieces
that the server can call for help.
When you create an ISAPI filter, you're creating a linked DLL that's
being examined every time the server processes an HTTP request. The
goal is to filter out specific notifications that you're interested
in, and remove the duties of handling that particular process from
the core functionality of the server. You're essentially saying, "Oh,
don't worry about that when you see it; that's what this filter is
for." This scalability allows you to take a basic server and
customize it to meet whatever needs you might have. You're adding
scalability to the server so that it meets your needs, even if the
original manufacturer didn't anticipate them.
Like an ISAPI DLL, an ISAPI filter has two entry points that must be
present in order to verify that the function meets the current
specification, and that it has a place to receive information from
the server. Unlike an ISAPI DLL, though, an ISAPI filter isn't
something that's spur-of-the-moment in its use-any filters you define
have to be entered in the system registry so that they are literally
part of the server's configuration. Since they're intercepting things
as they happen, the server needs to know about them. In this case,
it's convinced that it always had the ability to do these functions,
it just never used them before.