File Sytem Object versus MSXML
File Sytem Object versus MSXML
am 16.01.2007 19:04:06 von Patrice
Hello:
I need to dynamically include documents stored in my own website.
The website is coded in ASP.
As far as I know there are two common options: FSO and the MSXML Objects.
Which one of the two would be less of a resource hog for IIS ? Keep in mind
that the documetns I want to include are stored in the server where the
website resides, not on another webserver. Otherwise I'd have no choice but
to use msxml.
Thanks in advance.
Edward
Re: File Sytem Object versus MSXML
am 16.01.2007 19:33:08 von Anthony Jones
"Edward" wrote in message
news:qs8rh.662035$1T2.29971@pd7urf2no...
> Hello:
>
> I need to dynamically include documents stored in my own website.
> The website is coded in ASP.
> As far as I know there are two common options: FSO and the MSXML Objects.
> Which one of the two would be less of a resource hog for IIS ? Keep in
mind
> that the documetns I want to include are stored in the server where the
> website resides, not on another webserver. Otherwise I'd have no choice
but
> to use msxml.
>
I'm not sure why you would think MSXML would figure in any such solution.
FSO is easy enough to use for standard text content. ADODB.Stream is a more
flexible solution that handles both text and binary content fairly well
> Thanks in advance.
>
> Edward
>
>
Re: File Sytem Object versus MSXML
am 16.01.2007 20:17:31 von Dave Anderson
Edward wrote:
> I need to dynamically include documents stored in my own
> website. The website is coded in ASP.
Depending on what you mean by "dynamically include", you could include
Server.Execute() or
Re: File Sytem Object versus MSXML
am 16.01.2007 22:19:18 von McKirahan
"Edward" wrote in message
news:qs8rh.662035$1T2.29971@pd7urf2no...
> Hello:
>
> I need to dynamically include documents stored in my own website.
> The website is coded in ASP.
> As far as I know there are two common options: FSO and the MSXML Objects.
> Which one of the two would be less of a resource hog for IIS ? Keep in
mind
> that the documetns I want to include are stored in the server where the
> website resides, not on another webserver. Otherwise I'd have no choice
but
> to use msxml.
>
> Thanks in advance.
Are you aware of this?
Re: File Sytem Object versus MSXML
am 16.01.2007 23:19:29 von Patrice
Thank you guys for the replies.
1. Yes, I know about includes. The known problem with includes is that one
cannot use variables in them.
2. I didn't know about Server.Execute (Yeah, I know, I am a newbie LOL).
This will be for me the best solution when it comes to dynamically inserting
local documents into my ASP pages.
There are some limitations, of course, like variables not passed back and
forth between documents.
3. I still will use XMLHTTP to fetch some content from other server(s). Some
of the advantages of this over the suggested IFRAME tag are:
a- The content becomes part of your page, making search engines spider it as
if were yours.
b- With IFRAME the inserted page probably won't be spidered, and it would
create an additional scroll bar, which tends to confuse visitors.
Thanks again for the feedback
Edward
Re: File Sytem Object versus MSXML
am 17.01.2007 00:35:39 von Justin Piper
On Tue, 16 Jan 2007 16:19:29 -0600, Edward wrote:
> 2. I didn't know about Server.Execute (Yeah, I know, I am a newbie LOL=
).
> This will be for me the best solution when it comes to dynamically =
> inserting
> local documents into my ASP pages.
> There are some limitations, of course, like variables not passed back =
and
> forth between documents.
You can use the MTxSpm.SharedPropertyGroupManager object to pass =
information between pages. You can pass anything you like from a page to=
=
any page it calls using Server.Execute, and those pages can pass scalars=
=
(but not objects) back. A short example follows:
index.asp:
<% Option Explicit
' A function that will be exposed to the page
Function F : F =3D "index.asp -- F()" : End Function
' Determine the page to execute
Dim page
Select Case Request.QueryString("page")
Case "c" : page =3D "c.asp"
Case "b" : page =3D "b.asp"
Case Else: page =3D "a.asp"
End Select
' Create a shared property group for that page
Dim grpMgr, propGrp, prop
Set grpMgr =3D CreateObject("MTxSpm.SharedPropertyGroupManager")=
Set propGrp =3D grpMgr.CreatePropertyGroup(page, 0, 0, Empty)
' Create a shared property that provides access to F()
Set prop =3D propGrp.CreateProperty("F", Empty)
prop.Value =3D GetRef("F")
Server.Execute page
%>
a.asp, b.asp, c.asp (be sure to change the value of the Page constant fo=
r =
each):
<% Option Explicit
Const Page =3D "a.asp"
' Get the shared property group the page
Dim grpMgr, propGrp, prop
Set grpMgr =3D CreateObject("MTxSpm.SharedPropertyGroupManager")=
Set propGrp =3D grpMgr.CreatePropertyGroup(Page, 0, 0, Empty)
' Get the shared property that provides access to F()
Set prop =3D propGrp.CreateProperty("F", Empty)
Response.ContentType =3D "text/plain"
Response.Write "This is " & Page & vbNewLine
If IsObject(prop.Value) Then
Dim f: Set f =3D prop.Value
Response.Write "Got " & TypeName(prop.Value) & vbNewLine
Response.Write f()
Else
Response.Write "Expected function object but got " _
& TypeName(prop.Value) & vbNewLine
End If
%>
-- =
Justin Piper
Bizco Technologies
http://www.bizco.com/
Re: File Sytem Object versus MSXML
am 17.01.2007 09:31:13 von Mike Brind
"Edward" wrote in message
news:Rbcrh.662595$1T2.472934@pd7urf2no...
> Thank you guys for the replies.
>
> 1. Yes, I know about includes. The known problem with includes is that one
> cannot use variables in them.
>
True, but you can conditionally include files if you know there names, which
I suppose you must do if they reside on your server?
<%
Select Case True
Case a
%>
<%
Case b
%>
%>
....
<%
End Select
%>
If you have loads of them, this approach might not be practical though...
--
Mike Brind
Re: File Sytem Object versus MSXML
am 17.01.2007 15:19:46 von Dave Anderson
Mike Brind wrote:
> <%
> Select Case True
> Case a
> %>
>
> <%
> Case b
> %>
>
> %>
> ...
> <%
> End Select
> %>
>
> If you have loads of them, this approach might not be practical
> though...
Especially since every single one of them must be parsed every time the page
is requested.
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.