[Date Prev][Date
Next][Thread Prev][Thread Next][Date
Index][Thread Index]
RE: Webserver interface
- To: <ukha_d@xxxxxxx>
- Subject: RE: Webserver interface
- From: "Dan Hoehnen" <dhoehnen@xxxxxxx>
- Date: Fri, 25 Aug 2000 07:52:45 -0400
- Delivered-to: rich@xxxxxxx
- Delivered-to: mailing list ukha_d@xxxxxxx
- Mailing-list: list ukha_d@xxxxxxx; contact
ukha_d-owner@xxxxxxx
- Reply-to: ukha_d@xxxxxxx
> > I am assuming that HS has methods in its COM interface that can
provide
> > you with the status of each device. I also assume that HS has
methods
that
> > you can call to execute commands (on, off, etc.). If this is
true, then
I
> > think this approach will work. It would only require you to
write a
> > dll (so PWS users could use this) and then write some ASP pages.
>
> that would be the hard bit - I know little or nothing about ASP - in
fact
> all I do know is that it essentially defeats the object of the
> HTTP protocol i.e send information back to the user a bit at a time,
text
first, then
> images etc so that the page is 'useable' immediately. But the
> same could be said of VBScript/Java etc.
As someone already pointed out, that is not a correct assesment of how ASP
works. But, you did say you know little about it, so you covered yourself
well :) Let me tell you very quickly what ASP does and then provide an
example. ASP (Active Server Pages) allows you to put VBScript code in a
web
page that is executed by the web server, not the client browswer. The code
is executed by the web server as it is sending the page to the browser.
So,
using ASP, you can check the status of things in vbscript and then
dynamically build the web page that is being sent to the browser so that
the
web page contains current information.
I think you are thinking of doing this yourself with your own web server,
but just using your own format for special text in the web page that your
web server will replace with current data.
A very simple example would be to display the current date and have it
update each time the page was loaded by the browser. Like this:
<html>
<body>
<% =Date %>
</body>
</html>
Everything between <% and %> is considered ASP and it's almost just
like
writing code in VB. The Date function is the same as in VB. The equal
sign
before it is something unique to ASP and simply means "display the
value of
this". If you did a view/source from the browser on this page you
would see
something like:
<html>
<body>
Friday, August 25, 2000
</body>
</html>
Here is more complicated example from the Comfort Web InterfACE. This code
is in the middle of html in the middle of a table. It is a loop that
generates 1 row in a table for each security zone the user wants to see
(the
web page allows the user to select zones 1-8, 9-16,....., or all zones).
There is asp code I have left out that runs before this that gets each zone
name, state and whether it is bypased or not. These values are then used
within this loop to display current info. You may need to change the font
size/type to see this well.
<% 'loop for each zone to display %>
<% For i = CInt(ZS) To (CInt(ZS) + CInt(ZPP) - 1) %>
<tr>
<td width="19"><% =CZ %></td>
<td colspan="4" bgcolor="#CCCCFF"><%
=CZoneName(CZ) %></td>
<td width="83"><a
href="security.asp?api=aces:cda:75,<% =CZ
%>">BYPASS</a></td>
<td width="97"><a
href="security.asp?api=aces:cda:76,<% =CZ
%>">UNBYPASS</a></td>
<td colspan="1" bgcolor="#FFFFCC"><b>
<input type="text" name="status<%=i%>"
size="8" value="<%
=CInState(CInputs(CZ)) %>">
</b></td>
<td colspan="2" bgcolor="#FFFFCC"><b>
<input type="text" name="bypassed<%=i%>"
size="5" value="<%
=CBypState(CBypass(CZ)) %>">
</b></td>
<td colspan="1" bgcolor="#FFFFCC"></td>
</tr>
<% CZ = CZ + 1 %>
<% Next %>
Now, I know you want to write your own web server for fun and learning, and
I am the same way about some of the things I do, so I understand. So, I
won't go on any more about ASP. I just wanted to point out that you can
probably already do what you want using either PWS or IIS and ASP. But, as
you said, what's the fun in that?
Dan
> >You would not have to write a web server. Then, anyone that
> knows asp and
> html can easily make
> > their own pages.
>
> But with /my/ webserver I have full control over it. I can strip out
the
> cr*p I don't want/use and you can still use VBScript/Javascript with
it to
> achieve similar results to the ASP/HTML combo. The other thing is in
these
> days of 24x7 access available to all it's difficult to know who you
can
> trust. Programs can have backdoors etc. and the only way to be
> *sure* that
> this isn't the case is to write you own, and the only way eveyone else
can
> be *sure* that you aren't doing it is to release the source. I mean
you
> wouldn't want the programmer of an internet interface to your life
support
> system to be able to turn it off without your consent - Before anyone
> mentions it I know that you shouldn't use X10 for critical stuff!!
:-))
>
>
> A.
>
>
>
> *********************** DISCLAIMER ****************************
> This message is intended only for use by the person
> to whom it is addressed. It may contain information
> that is privileged and confidential. Its content does
> not constitute a formal commitment by Lombard Odier.
> If you are not the intended recipient of this message,
> kindly notify the sender immediately and destroy this
> message. Thank you.
> ********************************************************************
>
>
>
>
>
-------------------------- eGroups Sponsor -------------------------~-~>
Free @Backup service! Click here for your free trial of @Backup.
@Backup is the most convenient way to securely protect and access
your files online. Try it now and receive 300 MyPoints.
http://click.egroups.com/1/6348/9/_/2065/_/967204359/
---------------------------------------------------------------------_->
Home |
Main Index |
Thread Index
|