Title: BMIS 289: Spring 2003 Gonzaga University
1BMIS 289 Spring 2003Gonzaga University
- Class 1Course ASP Introduction
2Course Introduction
- Syllabus
- Programs
- Quizzes
- Exams
- Final Project
- Time Requirements
- Web/Email
- Check daily
3Programming Models
- Linear Programming
- Command line driven input/output (IO)
- Linear execution path
- GUI Programming
- Graphical user interface
- Event driven
- Internet Programming
- Client/Server model
- Not platform-dependent
4Linear Programming Example
- Code is executed synchronously - one line at a
time. - User inputs one line at time.
- Often run on mainframes.
- The user interface is strictly two-dimensional
5GUI Programming Example
- Code executes asynchronously multiple lines can
execute at the same time. - Code is written to respond to events
- A button is clicked, a window is opened, a time
has been reached, etc. - Visual user interface
6Internet Programming
- A melding of linear and GUI programming.
- The core logic and data of the program resides on
a centralized server. - Users access the program via a rich GUI interface
(Web) on a personal computer.
7The Internet The Web
- The Internet is a collection of numerous
networking protocols and applications designed to
work on a global scale. - The World Wide Web, or the Web, is one of those
applications. - The Web was designed to give the Internet a more
user friendly interface, similar to how the
Windows and Macintosh interfaces were designed to
make PCs more user friendly.
8Basic Web Architecture
- The web is made up of two basic elements
computer hardware and software. - Hardware
- Servers computers that deliver the content (in
the form of web pages) to the users. - Clients computers that receive information from
the server and display it to the user. Like a PC. - Software
- Protocols computer communication rules used to
deliver the information (TCP/IP, HTTP) - Browsers computer programs that display and
interact with the information received via the
protocols (Internet Explorer, Netscape).
9Web Pages
- Most people view the web via web pages.
- These pages are the interface to a web site.
- They contain text, images, sounds, and video for
displaying data. - They contain input mechanisms such as text boxes,
check boxes, and buttons for obtaining input. - The majority of web pages are static and written
purely with HTML.
10Static Web Pages
- HTML Hypertext Markup Language
- HTML is the computer language used to write a web
page. It is NOT A PROGRAMMING LANGUAGE. - HTML describes how data looks and is presented,
it does not actually do anything with the data. - For example, you could not do arithmetic with
HTML. - Because HTML is not a programming language the
data it presents cannot change unless some person
physically edits the HTML file, hence HTML files
are static.
11A Simple HTML Example
- A simple page of HTML code might look like this
lthtmlgt ltheadgt lttitlegtTestlt/titlegt lt/headgt ltbodygt lt
h1gtHello!lt/h1gt lt/bodygt lt/htmlgt
12The Client/Server Model
- Static web pages are delivered based on the
client/server model of networking. - The static web pages are stored on a host
computer called a server. - Another computer, called a client, contacts that
server and request the page.
13How A Static Page Is Served
- Developer writes HTML page and places it on the
server (ex via FTP). - Browser (client) requests the HTML page from the
server. - Server receives request and locates HTML file on
its hard drive. - The HTML pages contents are sent to the client
over the network (LAN, Internet, etc). - Browser process received HTML and displays it.
14Basic Request/Response (Fig. 1)
Developer creates HTML page and then stores it on
the server
1
Server
2
Client Requests Web Page
4
Web Page Sent To Client
3
5
Client renders web page
Server locates web page on its hard drive
15How Do Protocols Figure In?
- Lets consider the previous diagram and see where
the protocols we discussed earlier (TCP/IP, HTTP)
fit in. - TCP/IP provides the rules that govern how the
browser and server communicate with each other on
the Internet and how data gets from one end to
the other. - HTTP provides the rules for how data is
transferred between the client and server (and
vice/versa) on the Web.
16Protocols Sending From Server To Client (Fig. 2)
The client and server connect via the TCP/IP
protocol
TCP/IP
Server
HTTP
Static HTML page
Data is sent via the HTTP protocol
17Advantages Of Static HTML
- Easy to learn, use, and understand.
- Even non-programmers can use HTML to create web
pages. - With the use of WYSIWYG editors development can
be simplified even further, to the point where it
is similar to word processing. - HTML and HTTP do what they are intended to do
very well - The language and protocol was designed to present
information quickly in an appealing and organized
manner.
18Disadvantages of Static HTML
- Its static. The files content does not change
unless a person physically edits the file. - Often this process involves retrieving the file
through FTP, editing it, and then uploading back
to the server with FTP again. - HTML cannot actually process data. In other
words, it cannot execute code by itself. - Cumbersome. The more information you need to
present the more pages you have to write.
19Dynamic Web Pages
- Writing a large web application that needed to
process user inputs and output meaningful
results, like Amazon.com, would require thousands
of static HTML pages and scores of people to
constantly update them. - A more efficient solution is a dynamic web page
a page that changes its appearance, output, etc.
based on user inputs and does not require
constant manual updating.
20Dynamic Web Pages
- A dynamic web page is a mixture of HTML and code.
- The code manipulates the HTML and the information
contained within it. - Example
- User inputs their birthday, via a browser, into
an HTML form. - The dynamic web page calculates the number of
days that have passed since the inputted date. - The resulting value is output as normal HTML in
the users browser.
21How Dynamic Web Pages Work
- Client browser requests page
- Web server processes the server-side code in the
requested page. - Inputs are read in, values are calculated, data
is retrieved from (or added to) databases, etc. - The results of the processed code are then
combined with the HTML in the file. - The results are sent back to the client as a
normal HTTP stream of data (just like a static
HTML page)
22Dynamic Web Pages (Fig. 3)
TCP/IP
1
2
Server ProcessesServer-Side Code
Static HTML returned
4
3
Results combined with HTML and one page is created
HTTP
23Example Dynamic Web Page
- lthtmlgt
- ltheadgt
- lttitlegtTestlt/titlegt
- lt/headgt
- ltbodygt
- lt
- Hours GetCurrentHours
- if Hours lt 12 then
- print ltH1gtGood Morninglt/H1gt
- elseif Hours gt12 and Hours lt 17 then
- print ltH1gtGood Afternoonlt/H1gt
- else
- print ltH1gtGood Eveninglt/H1gt
- end if
- gt
- lt/bodygtlt/htmlgt
24Advantages of Dynamic Pages
- Because code is actually run in response to a web
page request, a dynamic page can perform almost
any action a normal linear or GUI program could
perform. - The number of pages that needs to be maintained
for a given web site/application is greatly
reduced. - The code behind the web page can take advantage
of other technologies like databases, security
software, etc. to aide it in presenting
meaningful and correct output to the user. - Platform independence because all the code is
run on a remote server, if the clients understand
HTTP and HTML they can use the application.
25Disadvantages of Dynamic Pages
- More complex than simplistic, static HTML
pages. - Programming knowledge required
- Server/Database administration
- More resource-intensive
- Server must process code in addition to sending
HTML back to the client. - Security Concerns
- Instead of strictly viewing static content, users
are now interacting with the servers resources
and data. - Anyone with access to the network where the web
application resides could conceivably gain access
to it and its resources.
26Applications of Dynamic Pages
- E-Commerce
- Amazon.com, etc.
- E-Business
- Business to Business
- Intranets
- Internal HR systems, etc.
- Thin Clients
- Ticketing systems
- Cheap network PCs, powerful servers.
- Web Services
- Application Service Providers (CRMs, Data
Processing, etc.)
27ASP (Active Server Pages)
- ASP is a dynamic web page technology created by
Microsoft. - It runs primarily on Microsoft platforms (Windows
98, NT 4, 2000, XP). - It utilizes several different programming
languages (VbScript, Jscript, PerlScript).
28ASP IIS
- ASP requires a Microsoft server product called
IIS in order to run. - IIS Internet Information Server.
- IIS is freely included with all Microsoft server
operating systems (NT, 2000, XP). - It is freely downloadable in the form of Personal
Web Server for running on workstation operating
systems (98, NT 4 Workstation). - IIS and ASP are different programs, but ASP must
have IIS (or a derivate of it) in order to
function.
29Alternatives To ASP
- CGI (Common Gateway Interface) Perl.
- PHP Pre-HTML Processor, Linux.
- JSP Java-Server Pages.
- Cold Fusion
- Strict JavaScript (Client-Side only)
30ASP.Net
- Microsoft recently released its next version of
ASP called ASP.Net. - The ASP we are using is now, generally, referred
to as Classic ASP or ASP 3.0. - ASP.Net has several features that make it more
powerful and developer friendly than its
predecessor. - ASP.Net is not widely in use yet, and most
existing ASP applications are written in classic
ASP.
31Class Topics
- Up to the midterm
- Programming fundamentals and their corresponding
constructs in ASP. - Web programming fundamentals
- ASP object model
- HTTP, Cookies, Sessions
- After the midterm
- ASP and Data Access
- Advanced ASP topics
- Security
- Final Project
32Next Class
- Send and email to cfukai_at_gonzaga.edu with this
information
- Name
- School/Major (ex School Of Business/MIS)
- Email Address
- Have you had previous programming experience? If
yes, what languages? - What would you most like to learn in this course?
33END