Building the SpyNet User Interface

Posted by arlene

In this section we will build a very basic front end that makes a connection to our database, validates a user’s login, and retrieves (searches for) data. Although this is just a start, it will provide the building blocks you need to develop it further for your own needs.

This unlike the others, is more like a recipe: planning the pages, creating a user to access the pages, and so on. Follow the recipe and you will get a cake (well actually a GUI) at the end.

Because we’re focusing on SQL Server 2008 instead of the art of building user interfaces, I don’t give much explanation of the code or development process. I do show you how to turn a basic query against the database into an interactive Web page.

Determining the SpyNet Web Pages

Our interface will be relatively simple, all of about 7-10 pages, and three of these pages will be used for establishing and closing a database connection. We’ll also use welcome and query pages to let the user enter search criteria. Our Web site will have the following pages:

Living the Web 2.0Default.htm—This is the first page that is hit when our Web site is called. This page will be briefly seen by our users.

Login.aspUsed to validate the user’s login information. This page will be seen by our users.

Global.asa—The initial page that holds the database connection information in application-wide variables. It’s a system-only file.

adovbs.inc—The file used to give us constants, provided by Microsoft. We will use a cut-down version because we do not need a full file. This will be an include file and is a system-only file.

Include files are files that contain general functions that we need to use throughout the site. They are called include files because we include them in the page as you would include header files in C++ or Java, or make references like in VB.

Connection.asp—The file used to actually make a connection to the database. This will be an include file and is a system-only file.

ConnectionClose.asp—The file used to close the connection to our database. This will be an include file and is a system-only file.

Welcome.asp—The first page our users will be sent to after successfully logging in. This page will be seen by our users and will act as their home page.

Search.asp—This is where our users are able to perform searches against our database. This page will be seen by our users.

This is the basic structure of our Web site. Now we should take a brief look at the software you will need on your machine.

Setting Up Your Machine to Run the SpyNet Application

Before creating the actual Web pages, you first need to prepare your machine to act as a server by installing some software.

As mentioned earlier, you will need to install PWS. You can find this under the add- ons folder on the Windows 98 CD, or you can download it from

http://www.microsoft.com/windows/ie/pws/main.htm.

Of course, you’ll want to use the files I’ve created so you don’t have to rewrite all the code. The files for the application are on the book’s Web site under Que’s site (www.quepublishing .com). Download those and tuck them away until you need them.

Next you will need to have ActiveX Data Objects (ADO) installed. Luckily for you this is done when you install SQL Server 2000 as part of the Microsoft Data Access Components (MDAC) upgrade. The MDAC upgrade also installs SQLOLEDB for you.

The last thing that you need to have installed is Microsoft FrontPage. This comes with Internet Explorer 5.0, so if you do not have it installed already, just rerun the Internet Explorer setup and select the component from the list.

And that’s it! We are now ready to begin creating our first Web site. So let’s get going. Just remember, if you do not fully understand something you will need to do more research on your own!

Setting Up Our Web Site to Run Under PWS

Before we create our Web site we need to set a place where our files will be saved.

  1. Navigate your way through the file system until you see where PWS has created the standard Web site that comes with the software. This will be something like x: \ Inetpub \ wwwroot \ , where x is your hard drive.
  2. When you have found this folder, create a new folder under this one called SpyNet.
  3. Under the SpyNet folder create two new folders, Includes and Images. Your file system.

The SpyNet folder will hold all our main files for the Web site. The Includes folder will hold our include pages, and the Images folder will hold all our images. As we develop (or copy) each page, I will let you know where they all go so that the site doesn’t break. To begin, put all the images under the Images folder.

That’s about all we need to do now. Let’s start building!

Possibly related posts: (automatically generated)
Building the SpyNet User Interface

5 Responses to “Building the SpyNet User Interface”

  1. Party tools, Hostway’ s support and documentation for phpMyAdmin is limited and furthermore restricted to our implementation. … Hostway Offers

  2. No matter what the field of business, a business without online presence is at a severe disadvantage. … Online Resource

  3. Simply install FileMaker Server software on a dedicated computer and upload your FileMaker Pro databases to the server. … Simply Install FileMaker Server Software

  4. Later that year, 1& 1 expanded its range of products by introducing Paretic, Europe s first affordable and reliable web hosting product for customers on a budget. … Web Hosting

  5. The service features a local server to cache data and deliver HTML, JavaScript and other online applications without the need for the user to hook up to his or her host server. … Active Server Pages

Leave a Reply

LogoAlexa CounterFeedBurner Counter