data-enabled web sites: classibooks.com & internet database technologies colin fukai april 4,...
Post on 27-Dec-2015
213 Views
Preview:
TRANSCRIPT
Data-Enabled Web Sites:Classibooks.com & Internet Database Technologies
Colin FukaiApril 4, 2000
Gonzaga University
Background Education
Gonzaga University: BBA (MIS, HR) - 2000 My “Internet Credentials”
4 years of web design/construction experience www.ticketswest.com www.cavanaughs.com www.planetquake.com
Contacting Me www.colinfukai.com Colin@colinfukai.com
Introduction Database connectivity and the web
The web is simply a new interface for structured data collections
InternetInternet DB
Web Page
Introduction Cont. Benefits
E-commerce $$$$$ Thin clients, dumb
terminals, and centralized computing (web apps)
Drawbacks Complexity Time & Resources Security
Classibooks.com A “Meeting Place”. Registered users (sellers) post their
used textbooks. Buyers browse the listings and then
contact the seller. Classibooks.com does not sell
anything, it just makes the connection between buyer and seller.
Technologies Database
MS Access Web Server
NT Server 4, IIS 4 Server Side
Scripting ASP
Development Tools Interdev, Visual
Basic
Databases LOGICAL DESIGN! Considerations
Size Complexity Separation of data and processes
Classibooks Database Customer (seller) Post (the book listings)
Web Server Microsoft NT Server 4 Internet Information Server 4 (IIS4) Setting up a site with NT Server 4:
Internet Service Manager Web directory
(Inetpub/wwwroot/yoursite) ODBC Connection (DSN)
Server Side Scripting Code that is executed on the web
server, as opposed to client side scripting that is run on the user’s web browser (e.g., JavaScript).
ASP = Active Server Pages According to Microsoft:
Active Server Pages is an open, compile-free application environment in which you can combine HTML, scripts, and reusable ActiveX server components to create dynamic and powerful Web-based business solutions.
Server Side Scripting Cont. ASP is really just a way to
“dynamically generate” web pages.
It is based on the Visual Basic language which is easy to use and familiar to many programmers.
Provides many powerful built-in capabilities, such as database connectivity.
Server Side Scripting Cont. How does an ASP page work?
USER (Internet Browser)
ASP Page<html><h1>My Site</h1><% Dim myVarmyVar = Time()Reponse.Write myVar%></html>
WEB Serverprocesses ASP page, returns results
Static Web Page
A Simple ASP Page Example
<HTML><HEAD>
<TITLE>ASP Page</TITLE></HEAD><BODY><H1>My TEST ASP Page</H1><P><% Dim myVarmyVar = “Hello World”Response.Write myVar%></BODY></HTML>
A Closer Look at the Code
<%
Dim myVar
myVar = “Hello World”
Response.Write myVar
%>
Variable
Initialize
Output
Tag indicates ASP code
<html>
<head>
<title>Where Am I for sign-in sheets</title>
</head>
<body>
<h1>Type the information to make a sign-in sheet for the New Products seminar.</h1>
<br>
<form action=“Output.asp" method=post>
<p><input value="name of city" name ="City">
<p><input value="date of seminar" name ="Date">
<p><input type="submit" value="Click here to submit the information">
</form>
</body>
</html>
Pass form values to this page
Input
Submit the information
Input.htm
<body>
<h1>Spokane Clothiers
Welcome to the New Products Seminar</h1>
Held In
<%
Dim strCity
strCity = Request.Form("City")
Response.Write strCity
%>
on
<%
Dim strDate
strDate = Request.Form("Date")
Response.Write strDate
%><p align="left">
Please sign in by printing your name at the front desk.
<hr>
</body>
Get data from input box “City” and output it
Get data from input box “Date” and output it
Output.asp
Development Tools Microsoft Visual
Interdev Part of “Visual Studio” Rapid Application
Development for the web
Overview of the Interdev Integrated Development Environment
InterDev Example What do we need to accomplish a
simple page, connected to a database? Win 9x or Win NT IIS or Personal Web Server (PWS) A database and working knowledge of how
a simple DBMS like MS Access works. Time and patience… the tools are more
powerful and simple than ever, but that means more things can go wrong.
Personal Web Server Obtaining &
installing Good for
workstation testing Create a new site Know what default
page name is (default.asp, index.htm)
Interdev Example Cont. Create a new project Create an ASP page Create a database connection Add a “recordset” to the page Set that recordset’s source fields (SQL) Connect form controls (e.g., listboxes) to
the recordset or simply output it as text View page
ASP Issues Connecting to the database
DSN = A file that contains commands for connecting to a database.
DSN or DSN-less? ASP Components
Compiled modules of code that interact with your web site.
Separates business logic from the web pages themselves.
ASP Issues Cont. ASP Components Cont.
Components are written with fully featured languages like Visual Basic or Visual C++.
Modularity, Reusability. How to use a component:
Compile component (.dll) Register component on the web server Create instance of component object in ASP code
to access the component’s properties and methods.
ASP Issues Cont. Sessions and maintaining state
The time a visitor is at your site, and all the actions they perform while there, is called a session.
Sometimes we want to maintain information (the state) about a user as they move from page to page. This is where ASP Session capabilities come in handy.
But, don’t use it. Use cookies or query strings to pass data between pages.
The Alternatives… Chilisoft
(www.chilisoft.com) Run ASP on any web
server, and not just NT
Cold Fusion (www.allaire.com)
Cold fusion markup language
PHPx (www.php.net) It’s free!
ASP Resources msdn.microsoft.com msdn.microsoft.com/asp
Good starting point www.15seconds.com www.learnasp.com www.4guysfromrolla.com
Conclusion Know what you want to accomplish
BEFORE deciding how to construct it. Do not invest in resources that you will
not, practically, need, but do plan for the future – in other words, watch out for “chicken little” salesmen.
Put yourself in the user’s shoes. Functionality and content above
flashiness. Data design as important as site design.
top related