Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 

Slides:



Advertisements
Similar presentations
17 HTML, Scripting, and Interactivity Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and.
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
DT228/3 Web Development WWW and Client server model.
Session 13 Active Server Pages (ASP) Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
Understand Web Page Development Software Development Fundamentals LESSON 4.1.
Server-Side vs. Client-Side Scripting Languages
1 Chapter 12 Working With Access 2000 on the Internet.
Chapter Concepts Review Markup Languages
Tutorial 6 Working with Web Forms
Introduction to Web Database Processing
Introduction to Web Application Architectures Web Application Architectures 18 th March 2005 Bogdan L. Vrusias
Introduction to Web Interface Technology (CSE2030)
Active Server Pages Chapter 1. Introduction Understand how browsers and servers interacted when the Web was young Understand what early Internet and intranet.
Python and Web Programming
WWW and Internet The Internet Creation of the Web Languages for document description Active web pages.
Mgt 240 Lecture Website Construction: Software and Language Alternatives March 29, 2005.
COMPUTER TERMS PART 1. COOKIE A cookie is a small amount of data generated by a website and saved by your web browser. Its purpose is to remember information.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Beginning Active Server Pages Barry Sosinsky Valda Hilley Programming.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Chapter 9 Web Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Using Data Active Server Pages Objectives In this chapter, you will: Learn about variables and constants Explore application and session variables Learn.
9-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Object-Oriented Application Development Using VB.NET 1 Chapter 12 Web Forms, HTML, and ASP.NET.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
ASP.NET 2.0 Chapter 5 Advanced Web Controls. ASP.NET 2.0, Third Edition2 Objectives.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
Creating Web Applications Using ASP.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Programming with Visual Web Developer Chapter 9.
Tutorial 10 Programming with JavaScript
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
1 Welcome to CSC 301 Web Programming Charles Frank.
1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster
JavaScript - A Web Script Language Fred Durao
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Introduction to JavaScript CS101 Introduction to Computing.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
Client-side & Server-side Scripting ©Richard L. Goldman August 5, 2003 Requires PowerPoint 2002 or later for full functionality.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
ASP – Web Programming Class  Ravi Anand. ASP – Active Server Pages What is ASP? - Microsoft Technology - Can Run using IIS/PWS/Others - Helps us create.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Project 1 Introduction to HTML.
Web Forms, HTML, and ASP.NET
Section 17.1 Section 17.2 Add an audio file using HTML
Chapter 27 WWW and HTTP.
Presentation transcript:

Active Server Pages

 In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular  What first-generation Internet/intranet applications brought to the browser/server relationship  Why Active Server Pages were created

 In this chapter, you will learn:  The role of scripting languages  How a Web application works  The role of the Web server  How to create and test a simple Active Server Page application

 The relationship between your browser and a distant server was pretty simple  You requested a Web page via your browser, the server received your request, and the server sent back the page that you wanted  Through experience, we learned that the third part of the URL is the folder path, and that it indicates the precise folder on the Web server in which the Web resource is stored

 The last part of the URL, specifies the Web resource we requested  As we cruised around, we became very familiar with the following types of resources: ◦ Hypertext Markup Language (HTML) documents ◦ Graphics

 One of the changes that evolved was the first- generation Internet/intranet application  It was an extension to Web servers and was called Common Gateway Interface (CGI)  CGI allowed Web sites to dynamically create Web pages from a program typically written in C or a scripting language such as Perl

 CGI added functionality to the Web  CGI programs often exhausted memory space on Windows computers  These shortcomings eventually led to Active Server Pages, or ASP

 Active Server Pages (ASP) generate HTML and pass the dynamically created HTML to the browser to be displayed to the user  ASP applications run in a thread, which is the smallest unit of execution of a process  ASP provides a better solution for Web applications in Windows environments than CGI  ASP applications run three to five times faster than their CGI counterparts and can incorporate HTML pages and forms, scripts written in VBscript or JavaScript, and ActiveX components

 As Web users became more experienced with ASP, they began running into elements such as the following: ◦ Java Applets ◦ ActiveX controls ◦ Extensible Markup Language (XML) documents

 Active Server Pages create their value through the scripts that they contain  Scripts, or scripting, are lines of code that accomplish a specific task, such as retrieving data from a file  You can mix HTML tags and scripts in an ASP by using a special … tag  There are two kinds of scripting, client-side and server-side

 Client-side scripts download to and execute on the client  Server-side scripts run directly on the server and generate data to be viewed by the browser in HTML format  Most Web users have encountered server- side scripts, even if they weren’t aware of it

 You can create client- or server-side scripts in one of two scripting languages: ◦ VBScript ◦ JavaScript ◦ JavaScript is a scripting language created by Netscape  Internet Explorer supports both scripting languages  Netscape Communicator supports only JavaScript

 The following is an example of a document that contains HTML and a simple VBScript script  The script displays the message “Hello, world!” in a message box <!-- msgbox(“Hello, world!”) //-->

 The following is an example of a file that contains HTML and a simple script written in JavaScript  The script displays the message”Hello, world!” in a message box <!-- alert (“Hello, world!”) //-->

 The following HTML page includes a simple server-side script written in VBScript as shown on page 6 of the textbook  Code Dissection ◦ A Web page can contain HTML tags along with scripts ◦ The line … tells the Web server that this script runs on the server first, before the HTML page can be transmitted to the client ◦ The line … tells the Web server that this script should be transmitted to the client and tells the browser to run this script on the client, rather than on the server ◦ The tag combination tells the Web server to run the script on the server and pass the results to the client

 The following HTML page includes a simple server- side script written in JavaScript as shown on page 6 of the textbook  Code Dissection ◦ A Web page can contain HTML tags along with scripts ◦ The line … tells the Web server that this script runs on the server first ◦ The line … tells the Web server that this script should be transmitted to the client and tells the browser to run this script on the client, rather than on the server ◦ The tag combination tells the Web server to run the script on the server and pass the results to the client

 A Web application is a special type of Web site that contains pages of static HTML and server-side scripts that interact with a user  The Web applications that you will encounter in this book share some common attributes  Programmers routinely use objects to create reusable code that can be used in many applications  You can “trim” the size of an online image, by changing the appropriate property

 Objects also have methods  Properties and methods are useful, but the fun starts when an event, the other main component, enters the scenario  An event occurs when a stimulus affects an object  Events create or modify an object  Once the Application object is created, an event called Application_OnStart starts, in the Global.asa file in the Web application directory

 Global.asa is a file that contains events that are activated when Application and Session objects are created and when they are destroyed  An Application object’s main job is to store any settings that are the same between sessions  Sessions are special environments that the Web server creates for each user of an application  The sessions themselves are also objects  One is created at the same time that the Application object is being created

 The Session object contains the environment in which the user interacts with the application  When the user fills in the form and clicks the Submit button, this event results in the creation of a Request object  Once the server receives the Request object, it begins to respond to the request, resulting in the creation of a Response object  The Application, Session, Request, and Response objects are the most important objects in ASP

 PWS is a Web server that allows you to create and test applications in Windows 98, Windows 2000, and Windows XP  Once you complete your Web application and want to use it over the Internet, you use IIS (Internet Information Server)  PWS is designed only as a development environment to be used to create and test Web applications  You must adapt to and use a Web server’s existing folder structure  To create a PWS virtual directory—look for the Personal Web Server and look for Personal Web Manager ◦ Verify that web publishing is on and click on Advanced icon—the advanced directory dialog box opens ◦ Type in the name of your directory and then type in the full pathnname to the directory ( )

 To create the Register.htm page use the steps on pages 10 and 11 of the handouts  Many text editors such as Notepad attach their own filename extension (.txt in Notepad) to a saved file  Verify that your file does not include a double extension  To create the Register_me.asp script in the VBScript language follow the directions on the page 12 in the handouts

 Code Dissection ◦ The line specifies the scripting language being used. The tells the Web server that the enclosed script code must run before the Web page is transmitted to the browser ◦ The line tells the Web server to create the entire Web page in memory before sending it to the client ◦ The line tells the Web server to insert the contents of the form element txtFirstName

 The next step in developing a Web application is testing what you have created  To test the new application refer to the procedures on page 13 in the handouts  This sample application is actually an information system; it receives input, processes the input, and provides output

1

 Web pages used to be simple items. You requested a page, the server processed your request, and you then received the page for viewing  After simple static Web pages, the industry moved on to utilize CGI scripts, even with their shortcomings  The term script, or scripting, refers to lines of code that accomplish specific tasks, such as retrieving data from a file 1

 In programming, objects are discrete entities with two main characteristics: ◦ Properties ◦ Methods  Properties are the data that describe an object  In this class, you will either use Personal Web Server (PWS), or IIS