Re: Visual representation of Active Server Pages

Subject: Re: Visual representation of Active Server Pages
From: Lou Quillio <quillio -at- gmail -dot- com>
To: "TECHWR-L" <techwr-l -at- lists -dot- techwr-l -dot- com>
Date: Mon, 28 Mar 2005 14:05:57 -0500


On Mon, 28 Mar 2005 10:00:03 -0800, Amanda_Abelove -at- toyota -dot- com
<Amanda_Abelove -at- toyota -dot- com> wrote:

> An ASP file contains both instructions to the server and the HTML mark up.
> It pulls and populates from the selected database. It also references
> and includes other server-side files to execute or executed by the VB
> script.

That's generally right, but not exactly right.

> An ASP file contains both instructions to the server and the HTML mark up.

Maybe. You can `Response.Write()` everything, including what's
thought of as the static content and markup. When starting out with
server-side script, the usual pattern is to begin with a static HTML
file and substitute VBscript for the dynamic parts. In large
applications (just a big collection of ASP scripts), the entire page
is often VBscript, and should be.

> It pulls and populates from the selected database.

Maybe. Database interaction is one reason to use server-side script,
but it's not sine qua non.

> It also references
> and includes other server-side files to execute or executed by the VB
> script.

Maybe. Again, this is one of the things you *can* do with server-side script.

I make these clarifications only because a scripted web environment is
a little odd to contemplate at first, but it's quite simple once you
get the basic idea. Unlimited programmatics are possible but not
required. A static HTML file can be named `filename.asp`, in which
case IIS will find no VBscript to pre-process and will simply serve
the page.

Having a local webserver makes everything clear; I recommend it. You
can then make a page named, say, `hello.asp`, containing, say,

<p>Hello, world.</p>

Put it on an IIS server. View it in a browser *via HTTP*, something
like `http://localhost/hello.asp`. You'll see what you expect. Now
substitute this for the snippet above:

<% Response.Write("<p>Hello, world,</p>") %>

Reload the page in your web browser. It's the same. View source in
your web browser. There's no VBscript in there, just HTML, same as
before. The server pre-processed the VBscript. Your browser knows
nothing about it and doesn't need to.

Then you might add programmatics, a la:

<%
if (Weekday(date) = 1, "<p>Hello, world. It's Monday.</p>")
%>

Again, the web browser only gets the output, in this case conditional
output based on what the server understands the variable `date` to
mean at the time the page is requested. Transparent to the user.

> This can be a nightmare to reverse engineer for a web service, especially
> if all the business logic is in the ASP pages and not a middle-tier...

Yes, if your task is to document code. But that's true of any code.
If your task is to document the web application from a user
perspective, you can completely ignore the ASP genesis of the pages
and simply deal with the output. I *think* that's what John's been
asked to do. What's thrown him off is that he's been given ASP
source, when what he needs is the working application.

LQ

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

WEBWORKS FINALDRAFT - EDIT AND REVIEW, REDEFINED
Accelerate the document lifecycle with full online discussions and unique feedback-management capabilities. Unlimited, efficient reviews for Word
and FrameMaker authors. Live, online demo:
http://www.webworks.com/techwr-l

---
You are currently subscribed to techwr-l as:
archiver -at- techwr-l -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- techwr-l -dot- com
Send administrative questions to lisa -at- techwr-l -dot- com -dot- Visit
http://www.techwr-l.com/techwhirl/ for more resources and info.



References:
Re: Visual representation of Active Server Pages: From: John Posada
Re: Visual representation of Active Server Pages: From: Amanda_Abelove

Previous by Author: Re: Visual representation of Active Server Pages
Next by Author: Re: Visual representation of Active Server Pages
Previous by Thread: Re: Visual representation of Active Server Pages
Next by Thread: Re: Visual representation of Active Server Pages


What this post helpful? Share it with friends and colleagues:


Sponsored Ads