Active Server Pages for Dummies

Overview

Active servers aren't busy food service professionals at your local diner -- they're part of a growing new technology for creating dynamic Web sites that are guaranteed to keep visitors coming back again and again. By using simple scripting languages, such as VBScript and JavaScript, you'll soon be writing intelligent and interactive Web pages that are adaptable to popular Web browsers, to specific user preferences, or even to the time of day!

With Active Server Pages For ...

See more details below
Available through our Marketplace sellers.
Other sellers (Other Format)
  • All (15) from $1.99   
  • New (1) from $65.00   
  • Used (14) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$65.00
Seller since 2015

Feedback rating:

(215)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

Active servers aren't busy food service professionals at your local diner -- they're part of a growing new technology for creating dynamic Web sites that are guaranteed to keep visitors coming back again and again. By using simple scripting languages, such as VBScript and JavaScript, you'll soon be writing intelligent and interactive Web pages that are adaptable to popular Web browsers, to specific user preferences, or even to the time of day!

With Active Server Pages For Dummies in hand, you'll become a pro at developing exciting, dynamic Web pages for the Internet or for your own company intranet. Using Microsoft's ActiveX Data Objects to access and manipulate database information simplifies the nightmare of online database management by enabling you to use down-to-earth commands and controls. And you can use Active Server objects to work with forms, access cookies, dynamically change the content of your HTML pages, share information among people visiting your site, and much, much more!

Active Server Pages For Dummies has a surefire way to perk up your Web sites, too: a bonus CD-ROM packed with all the source code from the book, Microsoft's latest Internet Explorer 4.01, HomeSite 3 (an HTML editor that works great for creating ASP pages), and Chili!ASP, an add-on that allows non-Microsoft Web servers to use Active Server Pages technology.

Read More Show Less

Editorial Reviews

Booknews
A book/CD-ROM guide to using Microsoft's Internet Information Server or Personal Web Server to create Web sites. Explores basics first, then moves through advanced topics such as objects, accessing the database, and ASP applications. Includes tips and warnings, lists of sites and sources, and appendices on databases. The CD-ROM contains Internet Explorer and other software, plus examples from the book. Annotation c. by Book News, Inc., Portland, Or.
Ray Duncan

Stupid Is As Stupid Does

I find the "Dummies" and "Idiots" series thoroughly repugnant, and have always been resolved that I would never give any of these titles free publicity with a review. Each "Dummies" book spits in the reader's eye with the title on the cover, and then continues to insult the reader's intelligence from the first page to the last with inappropriate familiarity, dorky jokes and cartoons, lame puns, and hackneyed subheadings. Since when is the reader a "Dummy" or an "Idiot" just because he or she wishes to learn more about a topic? (Though I must admit that the book "Windows-95 for Dummies" did give me a few chuckles... the title had a certain inner truth that I'm sure was completely lost on the publisher.)

So here you find me, in an inexplicable turn of events, reviewing Active Server Pages for Dummies. To what shall you attribute this wanton betrayal of a deeply-felt credo, this spineless surrender to the forces of the Dark Side, this embrace of the precipitous decline of Western Civilization, this abandonment of the inmost self to the inexorable disintegration of traditional moral values? The main reason is that most of the other introductory books on Active Server Pages are so poorly written that a book called Active Server Pages for Dummies can actually look pretty good by comparison. As a consolation prize, it gives me an opportunity to bash the publishers about the ears a bit.

The first few chapters of Active Server Pages for Dummies are a fairly generic introduction to VBScript for non-programmers, with a dash of Javascript thrown in for variety. The middle portion of the book introduces the reader to components, objects, the structure of an Active Server Page (ASP) application, and database access. The useful tips scattered through the book are convincing evidence that the author actually has some practical experience with ASP in a non-toy environment. The last section of the book and the CD-ROM contain the source code for two example ASP applications: a chat room and a classified ads server.

Aside from the obnoxious and sophomoric attempts at humor, this book is basically sound and delivers the most value among the entry-level books on ASP that I have encountered thus far. Programmers should bypass this book and go directly to Wrox Press's Professional Active Server Pages 2.0.--Dr. Dobb's Electronic Review of Computer Books

Read More Show Less

Product Details

  • ISBN-13: 9780764501906
  • Publisher: Wiley, John & Sons, Incorporated
  • Publication date: 2/1/1998
  • Series: For Dummies Series
  • Edition description: Older Edition
  • Edition number: 1
  • Pages: 384
  • Product dimensions: 7.40 (w) x 9.20 (h) x 0.95 (d)

Table of Contents

Introduction

I Know Who You Are....
Why Active Server Pages?
How This Book Is Organized
Part I: Getting Started
Part II: Speaking Like a Native
Part III: Getting to Know Your Objects
Part IV: Accessing the Database
Part V: Really Cool ASP Applications
Part VI: The Part of Tens
Part VII: Appendixes
ASP Me (No) Questions....
On the CD
Margin Icons

Part I: Getting Started


Chapter 1: So What's an Active Server Page?

Boring, Dumb, Static HTML
Forms and CGI
Server APIs
Lofty ASPirations
ASP as Easy as 1, 2, 3
What Does an ASP Page Look Like?
How Is ASP Different from Client-Side Scripting?
How Is ASP Different from ActiveX Controls and Java Applets?
The World of Internet Development

Chapter 2: Just How Easy Is ASP?

Everything You Need to Get Started
About Your Language, Young Man....
No Development Environment? What a Pain in the ASP!
Creating and Testing Your ASP Pages
Where to work
We're clear for liftoff: Creating the launch page
Get Your ASP in Gear: Creating Your First ASP Page
Modifying, Retesting, Creating New Pages, and Converting Old Pages
How Does It Work?

Part II: Speaking Like a Native


Chapter 3: Understanding VBScript Basics

Getting Started with Programming and Scripting
What is a programming language?
What is a scripting language?
What are all of those strange words?
Power -- In Time....
Delimiters -- Keeping Your Tags and Your Code Apart
Keep Your Comments to Yourself
Up Your Case!
As I Was Saying: Line Continuation
Creating and Using Variables
Making your own variables with objects you can find around the house
Can you use a variable you didn't create?
Forcing the point
Displaying variable values
Don't string me along....
Cantankerous Constants
How Functions Function or How to Get a Date
Let the Arguments Commence!
Rolling Dice and Cutting Cards -- Using Functions in Formulas with Rnd and Int
Common Commands and Functions
Doing Math
Rnd and Randomize
Int and Round
Other math functions
String Manipulation
FormatCurrency, FormatDateTime, FormatNumber, FormatPercent
InStr
Len
LCase, UCase
LTrim, RTrim, Trim
Space, String
Left, Mid, Right
Dates and Times
Date, Time, Now
Weekday, WeekdayName
Other Date/Time Functions

Chapter 4: Real VBScript Programming

Decisions, Decisions, Decisions: Using If..Then
IF you want cool Web pages THEN use conditionals
Inequalities: A fact of life
Creating compound If..Then statements
Lies! All lies! Or...what to do if it isn't true
Multiple conditions
Developing your nesting instincts
Get Off My Case!
When Should You Use Select Case Instead of If..Then..ElseIf?
Loop the Loop
Counting with For..Next
Watch where you Step
Nesting loops
Doobee-Doobee-Do..Loop
Exit, stage left
Arrays
Using For Each..Next with arrays
The Array function shortcut
Dynamic arrays
UBound
Multidimensional arrays
Creating Your Own Subroutines and Functions
Creating subroutines
Creating functions
A better random number function
Calling subroutines and functions

Chapter 5: JScript for Geeks

Who Should Read This Chapter?
What Is JScript?
JScript and ASP
Delimiters
Picking your parlance, locating your language, choosing your chatter
Here's What You Can't Do
No compiler
No preprocessor
No pointers
No structures or unions
No constants
No classes or inheritance
No operator overloading
No variable number of arguments
No goto statement
One Thing You Can (Finally!) Do: Strings
Common Comments
Be Gentle. He's Case Sensitive.
The Terminator (Of Lines)
Variable Vagrants and Smooth Operators
I declare! These variables have no type!
Types for the typeless
Scoping it out
Casting out the demons of coercion
Operator? I'd like to make a call....
Conditionals and Loops
if..else
switch..case
for..next, while, do..while
break, continue
Arrays
Creating Functions
The eval Function

Part III: Getting to Know Your Objects


Chapter 6: Objects, Objects Everywhere!

Okay, So What's an Object?
Getting the Patter Down
Using Objects
Using Scripting Objects
VBScript Objects
To err is human....
Other VBScript-specific scripting objects
JavaScript Objects
Arrays as objects as arrays as....
Strings as objects
Converting a string to upper or lower case
Finding the index of a string within a string
Dissecting strings
JavaScript does math
Got a date? All the girls love a JavaScript geek....
Scripting Objects Available to Both VBScript and JScript
What's a Dictionary? Look It Up!
Creating a Dictionary in VBScript
Creating a Dictionary in JScript
The FileSystemObject and its Drives, Folders, and Files
Getting drive info with VBScript
Getting drive info with JavaScript
The Drive object's properties
Show files in root in VBScript
Show files in root in JavaScript
Islands in the TextStream
Start up the ScriptEngine...we're goin' to town!

Chapter 7: Using Server Objects

An Application, or Just a Bunch of Pages?
Using ASP Server Objects
The Server object
The input object: Request
Using cookies
Accessing cookie values
The cookieless
The output object: Response
The Application and Session objects
The Global.asa File
The application and session events
Creating objects in Global.asa
Server-Side Includes
How to do it
What it's good for

Chapter 8: Creating ASP Applications

Creating New Web Applications
Creating new Web applications with PWS
Creating new Web applications with IIS
Your Web application's Default page
A Guest Book: Creating and Responding to Forms
The Default page
The Guest Book form
Responding to the form
Listing the visitors
Creating a Radio: Music to Surf By
Creating the MIDI music
The Default page
The Radio page
The Tuning page
A Personalized Welcome Page with Cookies
Changing the Guest Book form
Changing the Guest Book processing page
Changing the Listing page
The new Default page
Customizing a Page Based on the Date
Web Site Roulette with Redirect
The Power of ASP

Chapter 9: Using the Included Server Components

A Rose by Any Other Name...Is Confusing!
So What Is a Server Component?
The Components Included with Your Server
Browser Performance Anxiety
Creating a new server component object
The other way to create a new server component object
Putting the Browser Capabilities Component to work
The inside story: How the Browser Capabilities Component works its magic
Just What the World Needs: More Advertising
The rotator schedule file
Using the Ad Rotator Component
That Fresh Site Feeling with the Content Rotator
The content schedule file
Using the Content Rotator Component
Linking Your Content
The Tools of the Trade
Counting Page Hits
Counting Other Things
Remembering Who You Are with MyInfo
A Whole World of Server Components

Part IV: Accessing the Database


Chapter 10: Accessing a Database from ASP

Creating a New Database and Table
For the Do-It-Yourselfer
YAMA: Yet Another Mysterious Acronym -- Creating an ODBC DSN
What's ODBC?
What's an ODBC Data Source Name?
How do I create a DSN?
SMMA: Still More Mysterious Acronyms -- Using the DAC to Get to Your ADO
Including ADO Constants
Connecting to a Database
From the Database to the Web Page
Executing SQL
Displaying the results
Getting Exactly the Information You Want
Today's menu
Planning for the next few days

Chapter 11: Updating the Database

Diving Deeper with the Connection and Recordset Objects
Opening a Connection and a Recordset -- Revisited
Connect, disconnect, connect, disconnect -- is this really a good idea?
Cursors and other people with soapy mouths
Freely moving around a Recordset
Holding your place with bookmarks
Change your data filters at least twice a year
Other Recordset properties and methods
Updating the Database
Putting your records in a headlock
Editing and updating records
Adding new records
Deleting records
Catching Database Errors
The Errors collection
The Errors object
Error handling tips

Part V: Really Cool ASP Applications


Chapter 12: The Café: Creating a Real-Time Chat Room

The Blueprint for the Café
Sharing information between visitors
Updating the browsers with new information
Putting together the pieces
Building the Café, Brick-by-Brick
The login page: Default.asp
The frames page: cafe.asp
Saying something: Say.asp
Displaying the conversation: cafeconvo.asp
Who's here? Find out with users.asp
Playing in the Café
Making It Better

Chapter 13: Classy Classifieds

Planning to Create Classy Classifieds
What classified ad categories will I use?
What pages will I need?
What technical issues are left?
The Home Page: Default.asp
The Header Include File: Header.inc
Adding An Ad: PlaceAd.asp
The Category Listing: Category.asp
Displaying the Details: Detail.asp
Confirming the User: Confirm.asp
Editing an Ad: EditAd.asp
Deleting an Ad: DelAd.asp
Searching for Ads: Search.asp
Displaying the Results of a Search: Results.asp
Making It Better

Part VI: The Part of Tens


Chapter 14: The Ten Best Places to Look When You Have a Question

RTFM: Read the Flippin' Manual!
Books
Magazines and Newsletters
Newsgroups
List Servers
Online Forums and Web Sites
Microsoft Web Technical Support
Microsoft Telephone Support
ASP Nerds
User Groups

Chapter 15: The Ten Coolest Web Sites for ASP Developers

The EdgeQuest Active Web Site
ActiveServerPages.com
15 Seconds
The Official Microsoft SiteBuilder Network
Unauthorized SiteBuilder
Windows NT ActiveX Server Bulletin Board
The ASP Hole
ASP Developers Site
ASP Developers Network
Online Version of WebWeek Newspaper

Chapter 16: Ten Interesting Things That Server Components Can Do for You

Make It Easy to Send and Receive E-Mail from ASP
JavaPOP3.Mailer
Mail Components
xPop3 and xSMTP
Security
ASPLogin
AuthentiX
Managing Files
SA-FileUp
AspInet 2.0
Execute Applications from ASP
ASPExec 2.0
Make Money with Internet Commerce
PCAuthx
CCard
Access Information on Your UNIX, AS/400, or Mainframe Computer
ARPEGGIO Live!
TeleSCOPE
Charting and Reporting
Chart FX Internet Edition
Chili!Reports Enterprise Edition
AspChart
Accept Database Queries in English
English Wizard Web/Server
Browsing from the Server
xBrowser
ASPHTTP
Other Interesting Stuff
AspBible Bible Component
Strings Component
AspPager

Part VII: Appendixes

Appendix A: Introducing Microsoft Visual InterDev
Features of Visual InterDev
How Is Visual InterDev Different from Microsoft FrontPage?
The Project
The Workspace
Creating a Quick Classy Classifieds
Creating the Classy Project and Workspace
Adding a database connection
Trying it out
Appendix B: A Crash Course in Database Basics
What's a DBMS? What's a Database?
Tables, Rows, and Columns
Primary Keys and Surrogate Keys
Relationships between Tables
Speaking Database-ese: SQL
Appendix C: Creating Databases and Tables in Microsoft Access
Creating the database
Creating a new table
Entering data into the new table
Appendix D: About the CD

Index

License Agreement

Installation Instructions

Book Registration Information

Read More Show Less

First Chapter

Chapter 1
So What's an Active Server Page?

In This Chapter

  • Beyond static HTML
  • Advantages of Active Server Pages
  • How ASP works
  • What an ASP page looks like
  • Differences between ASP pages and other Internet technologies

What's the big deal about ASP? It doesn't really let you do anything you couldn't already do before, right? So why bother learning yet another new thing? There are way too many new things to figure out already!

To answer these questions, in this chapter I show you what your non-ASP options are for creating interactive Web pages. Then I show you exactly what ASP is all about and how it works.

Boring, Dumb, Static HTML

Think about how a simple Web page works.

  1. You click on your favorite site's name under the Favorites menu in Internet Explorer -- perhaps it's called "Lots Of Fun." (No, this isn't a real one. I just made it up.) The URL associated with "Lots Of Fun" is

    http://www.lotsoffun.com/default.htm

  2. The browser looks for lotsoffun.com and finds the actual server machine on the Internet.
  3. After it finds that machine, it requests that the machine send over the page named default.htm.
  4. The server finds that page and sends it to the browser.
  5. When the browser gets the page, it looks at what's inside. It reads all the HTML tags and then converts them into a beautiful (or ugly, as the case may be) formatted page.

This is how the World Wide Web was originally conceived. A pretty simple idea. But it provided for a very easy way to access information and gave the page designer quite a bit of flexibility in laying out a page.

Forms and CGI

But the communication for static HTML works only one way. There is no way to send information back to a Web server. To fix this problem, forms and CGI were created. Forms are HTML tags that allow Web page creators to include controls like edits, check boxes, and radio buttons in their Web pages. That way, the user can enter information. It also provides a Submit button that sends the information off to the server.

But now the server has to be smarter, too. It can't just get requests for pages and send out pages. The server has to know what to do with this form information when it gets it. That's where CGI comes in.

CGI stands for Common Gateway Interface. CGI makes it possible for the Web server to talk to another application that can handle the form information when it's sent back. Often these CGI applications are written in a language called Perl. When the CGI application receives the form information, it can save it to a text file, store it in a database, or do whatever else the Web site administrator wants it to do.

This system works great for simple guest books and the like. But if you want to make your Web pages really interactive, you may start running into trouble.

The problem with CGI is that if five people are submitting form information at the same time, five different copies of the CGI application have to be running on the server to handle them. If a hundred people are submitting form information at once -- you guessed it! -- a hundred copies of the application run at the same time. This is a great way to make a popular Web server fall to its knees and crawl.

Server APIs

Because of the problems with CGI forms slowing everything down, server APIs were born. API stands for Application Programming Interface. Microsoft's server API is called ISAPI. It stands for the Internet Server Application Programming Interface (clever, no?).

Like CGI, ISAPI allows the Web server to communicate with other applications running on the server machine. But ISAPI is much more efficient than CGI. It doesn't launch a separate program each time someone sends back information from a form. And it allows the application developer a lot more flexibility in how the server responds to the browser.

But ISAPI doesn't solve all the problems. You still have to write separate computer programs that have complex interfaces to your Web server and that work closely with your Web pages. ISAPI isn't very intuitive, and it's difficult to create and maintain. Because of these problems, few businesses go to the trouble of creating truly engaging, interactive Web sites. Creating great Web sites with ISAPI just takes too much time, and most companies can't afford to dedicate a group of expensive programmers to the task of making their Web sites really, really cool.

Lofty ASPirations

Active Server Pages (ASP) solves all the problems associated with CGI and server APIs. In addition to being just as efficient as ISAPI applications, ASP is simple to learn and easy to use.

With CGI or ISAPI, you had to write a computer program in a language like Perl or C that had complex interface code connecting it to the server. Then you had to compile the application and associate it with the appropriate Web pages.

With ASP, you simply write your code in the HTML page itself. The HTML tags and the code are side by side. You write the code in a simple scripting language that is easy to learn and easy to use. Then you save the page to your Web site and it's ready to go. No compiling and no complex interfacing!

As you can imagine, ASP makes it much quicker and easier to create highly interactive Web sites. It also makes your pages easier to maintain and update in the future.

ASP as Easy as 1, 2, 3

So what happens when an ASP page is requested by the browser? It works like this:

  1. You choose a Favorite or click on a link in your browser to go to an ASP page (you can tell you're going to an ASP page because ASPs have an .asp extension, instead of an .htm or .html extension).
  2. The Web server locates the page and looks at it.
  3. Since it is an ASP page, the Web server executes the page. In other words, it goes through the page looking for any code you have written and runs that code.
  4. After the code runs, all the ASP code is stripped out of the page. A pure HTML page is all that is left.
  5. The HTML page is sent to the browser.

This arrangement has lots of advantages:

  • It is easy to write and maintain because the code and the page are together.
  • The code is executed on the server, so you have a lot of power and flexibility.
  • The code is stripped out before it is sent to the browser, so your proprietary applications can't be easily stolen.
  • Because only pure HTML is sent back, it works with any browser running on any computer.

Say it again, with redundancy

You may have noticed that I occasionally refer to an "ASP page." You're probably saying to yourself, "Now wait a minute. Isn't that an Active Server Pages page?" My response: "Yup. It shore is."

You see, when I was on my pilgrimage to the English Gurus, I asked them about the redundancy of "ASP page." This is what they said: Since ASP refers to a technology, the phrase "Active Server Pages page" is, in fact, correct, and not redundant at all. The first "Page" is part of the phrase which describes the technology. The second "page" is the actual noun you're talking about. The Gurus never lie.

What Does an ASP Page Look Like?

If you're like me, you can only hear someone describe something for so long before you want to see it yourself. The code below shows you what a real, live ASP page looks like.


<html> 
<head>
<title>My Home Page</title>
</head>
<body>
<h1>My Home Page</h1><p>
<% If Time >= #12:00:00 AM# And _
Time < #12:00:00 PM# Then %>
<h2>Good Morning! </h2><p>
<% ElseIf Time >= #12:00:00 PM# And _
Time < #6:00:00 PM# Then %>
<h2>Good Afternoon! </h2><p>
<% Else %>
<h2>Good Evening! </h2><p>
<% End If %>
<h2>I'm happy you could stop by...</h2><p>
</body>
</html>

Most of this should look familiar. I've identified a title for the page and used a first level head to display My Home Page at the top. But then comes the weird part. What are <% and %>? In ASP these are called \delimiters. They set off the code from the rest of the HTML tags. That way you'll always know which is which. If it is inside the \delimiters, you know its code. Otherwise, it's got to be HTML.

It's not too hard to guess how this page works, even if you haven't done much computer programming. This code is written in VBScript and is very English-like. Time is a VBScript function that returns the current time (on the server's system clock).

So first I check to see if the time is between 12:00 a.m. and 12:00 p.m. If it is, the HTML after the Then is sent back to the browser:

<h2>Good Morning! </h2><p>

A note for client-side scripters

If you've written client-side scripts in VBScript or JavaScript, you're used to seeing code in a Web page that looks like this:


<HTML> 
<SCRIPT LANGUAGE="VBScript">
<!--
Dim Net, Gross, Tax ' Create three variables
Gross = 30000 ' Gross income
Tax = 4000 ' Taxes owed
Net = Gross - Tax ' What's left...?
-->
</SCRIPT>
</HTML>

The SCRIPT tag isn't generally used when you create server-side scripts. The <% and %> \delimiters are much more convenient.

Also note that there is no reason to use the HTML comments (<!-- and -->) around the scripting code. ASP code is processed on the server and is stripped out before it is sent to the browser.

The next line is a continuation of the If..Then statement. It begins ElseIf. In other words, "If that didn't work, try this." It checks to see if the time is after 12:00 p.m. and before 6:00 p.m. If it is, this HTML is sent back to the browser:

<h2>Good Afternoon! </h2><p>

Finally, Else is a catchall. If none of the other conditions worked, send this HTML back to the browser:

<h2>Good Evening! </h2><p>

The End If lets you know that the If..Then statement is over. The next line of HTML is displayed, no matter how the If..Then condition worked out:

<h2>I'm happy you could stop by...</h2><p>

Notice that five lines of HTML are in the page. The first and last are always displayed. But only one of the middle three is displayed, depending on the time. Suppose the time is 7:00 p.m. and you go to this page. Your screen would look like Figure 1-1.

If you chose View-->Source from the Internet Explorer menu, you'd see the HTML below.


<html> 
<head>
<title>My Home Page</title>
</head>
<body>
<h1>My Home Page</h1><p>

<h2>Good Evening! </h2><p>

</body>
</html>

As you can see, all the VBScript code has been stripped out. And only the appropriate HTML line in the If..Then statement was sent. From looking at this, you'd have no idea that this was anything more than a simple HTML page that always says Good Evening!

For more information on If..Then and all the other VBScript commands, see Chapters 3 and 4.

How Is ASP Different from Client-Side Scripting?

You've probably seen all the books on the market teaching JavaScript and VBScript. How are these different from ASP?

Before ASP, you could use JavaScript and VBScript in your Web pages to do client-side scripting. Client-side refers to the browser and the machine running the browser, as opposed to server-side where the Web server is running. ASP is a way of doing server-side scripting.

Client-side scripting works a little differently:

  1. You choose a Favorite or click on a link in your browser to go to an HTML page that includes client-side scripting code.
  2. The Web server locates the page and sends it back to the browser.
  3. The browser interprets the HTML tags and, at the same time, executes any client-side scripting code that it comes upon.
  4. Some code isn't executed immediately -- it waits until the user does something like clicking on a button before it runs.

Client-side scripting and server-side scripting are similar in that they both allow you to write code right alongside your HTML and have that code executed when the page is requested. And often you can do the same thing using either client-side scripts or server-side scripts. There are some important differences, though.

  • Client-side scripts are executed by the browser after the page has been received from the server. Server-side scripts are executed by the Web server before the page is sent.
  • Client-side script code is downloaded as part of the page and can be seen from the browser by simply viewing the source for the page. This means that it is easy to steal others' scripting code.
  • Client-side script can only run on browsers that support scripting and specifically support the scripting language that you've used. For instance, if you used client-side VBScript in your Web page and someone accesses it using Netscape Navigator (which only supports JavaScript), the script will not execute at all. With server-side scripting, you don't have to worry about the browser's capabilities because only pure HTML is finally sent to the browser.

The good news is that you don't have to pick between client-side scripting and server-side scripting. You can use both! Even in the same page. In fact, there are some techniques for using them together that are very effective.

For instance, imagine you are selling music CDs from your Web site. The user fills out a form to order three CDs. He has to give his name, address, phone number, social security number, and so forth. When the user clicks the button to submit the form, you use a client-side script to check to make sure that he's filled in all the information. You can even check the phone number and social security number to make sure the number of digits is correct. When everything looks good, then you can send it off to the server. After it gets to the server, you can use an ASP page to save the order in your database.

Of course, you could check to make sure everything was filled in and looked good in your ASP page. But that means the user would have to wait for the bad data to be sent to the server, evaluated, and a message returned to the browser. Doing all that stuff on the client-side, before the data is sent, is much quicker and makes a lot more sense.

How Is ASP Different from ActiveX Controls and Java Applets?

You don't have to read much about the Internet before you see the words Java and ActiveX kicked around. They are two of the hottest topics in the Web development world. How is ASP different?

The concept of Java applets was created by Sun Microsystems. ActiveX controls were created by Microsoft. Both are small programs that are downloaded as part of a page, just as a graphic would be. But when they are received by a client machine, they are executed in the browser and the result is displayed on the Web page. Simple ActiveX controls or Java applets may provide a control that the user can use to enter information, like a listbox. More complex controls or applets may allow you to explore 3-dimensional VRML worlds, or view an animation, or see live video as it is broadcast from a Web site.

Client-side scripts are often used to coordinate several controls or applets on the page so that they work together. Using these technologies together, you can create something that works like a multimedia application or a game.

Java applets are written in Java, and ActiveX controls can be written by using Visual Basic, C/C++, Java, or other languages. They allow the site developer to create complex programs that couldn't be created by using scripting alone.

You may wonder, if there are controls and applets that supplement scripts on the client-side, are there also controls or applets on the server-side that supplement ASP? The answer is yes. Server components are the topic of Chapter 9.

The World of Internet Development

The Internet is still a very young platform for application development. The growth of interest in the Internet, both for personal and professional use, has been staggering. This interest is bound to make the Internet a central focus of almost all major new development in the future.

But today we're still in the early stages, and the standards and development environments and tools aren't nearly as well-defined as they are for stand-alone application software like word processors and spreadsheets. This is both good news and bad news. The pioneers always have the biggest opportunity to leave their mark on the future. But they also often have to work with very crude tools.

ASP, Java, and ActiveX are the forerunners of the tools of the future, and they are the tools that will begin to turn the promise of a truly exciting, interactive Internet into a reality.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)