Session 13 Active Server Pages (ASP) Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.

Slides:



Advertisements
Similar presentations
Other Web Application Development Technologies. PHP.
Advertisements

E-Commerce CMM503 – Lecture 8 Stuart Watt Room C2.
Overview Environment for Internet database connectivity
DT228/3 Web Development WWW and Client server model.
Languages for Dynamic Web Documents
 2004 Prentice Hall, Inc. All rights reserved. Chapter 21 – Web Servers (IIS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3 System.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 21 – Web Servers (IIS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3 System.
DT211/3 Internet Application Development Active Server Pages & IIS Web server.
Building Applications using ASP.NET and C# / Session 1 / 1 of 21 Session 1.
1 Chapter 12 Working With Access 2000 on the Internet.
Pertemuan 3 Server Side Scripting (ASP & ASP.Net) Matakuliah: T0053/Web Programming Tahun: 2006 Versi: 2.
Servlets and a little bit of Web Services Russell Beale.
INTERNET DATABASE Chapter 9. u Basics of Internet, Web, HTTP, HTML, URLs. u Advantages and disadvantages of Web as a database platform. u Approaches for.
DT211/3 Internet Development Application Internet Development Application.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
INTERNET DATABASE. Internet and E-commerce Internet – a worldwide collection of interconnected computer network Internet – a worldwide collection of interconnected.
Active Server Pages Chapter 1. Introduction Understand how browsers and servers interacted when the Web was young Understand what early Internet and intranet.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Beginning Active Server Pages Barry Sosinsky Valda Hilley Programming.
1 Web Servers (IIS and Apache) Outline 9.1 Introduction 9.2 HTTP Request Types 9.3 System Architecture 9.4 Client-Side Scripting versus Server-Side Scripting.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
INTRODUCTION TO WEB DATABASE PROGRAMMING
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 24 – Web Servers (PWS, IIS, Apache, Jigsaw) Outline 24.1Introduction 24.2Microsoft Personal.
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)
HTTP; The World Wide Web Protocol
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Web Servers1-1 Web Servers Xingquan (Hill) Zhu
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
1 Web Server Concepts Dr. Awad Khalil Computer Science Department AUC.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
 2004 Prentice Hall, Inc. All rights reserved. 1 Chapter 33 - Active Server Pages (ASP) Outline 33.1 Introduction 33.2 How Active Server Pages Work 33.3.
Active Server Pages (ASP) 1. 2 Introduction Active Server Pages (ASP) –Server-side text file –Processed in response to client request –Pages are processed.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Elements of ASP Documents Adapted from MCDN Web Workshop ( and Webmonkey’s Introduction to Active.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 21 - Web Servers (IIS, PWS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
1 Pertemuan 26 Bahasa-bahasa Pemrograman (Lanjutan) Matakuliah: T0604-Pengantar Teknologi Informasi Tahun: 2008 Versi: 2.0/0.0 Williams, B.K, Stacy C.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Review of Client Server Model Notes courtesy of Deitel, Deitel and Nieto, (2001) e-Business and e-Commerce: How to Program, PrenticeHall. Dr. Kleist.
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Chapter 6 Server-side Programming: Java Servlets
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Active Server Pages Server-Side Scripting and Client-Side Scripting.
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.
ASP.NET in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
Client-side & Server-side Scripting ©Richard L. Goldman August 5, 2003 Requires PowerPoint 2002 or later for full functionality.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Introduction and Principles Web Server Scripting.
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-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
7-1 Active Server and ADO Colorado Technical University IT420 Tim Peterson.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
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.
National College of Science & Information Technology.
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.
Chapter 33 - Active Server Pages (ASP)
Chapter 23 – ASP.NET Outline 23.1 Introduction NET Overview
Presentation transcript:

Session 13 Active Server Pages (ASP) Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5

Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : menghasilkan web page yang dinamis menggunakan ASP dengan bahasa VBScript (C3)

13.1 Introduction 13.2 How Active Server Pages Work 13.3 Client-side Scripting versus Server-side Scripting 13.4 Using Personal Web Server or Internet Information Server 13.5 Active Server Page Objects 13.6 A Simple ASP Example 13.7 Server-side ActiveX Components 13.8 File System Objects 13.9 Session Tracking and Cookies Outline Materi

13.1 Introduction Active Server Pages (ASP) –Processed in response to client request –ASP file contains HTML and scripting code –VBScript de facto language for ASP scripting Other languages can be used –JavaScript –.asp file extension –Microsoft-developed technology –Send dynamic Web content HTML DHTML ActiveX controls Client-side scripts Java applets

13.2 How Active Server Pages Work Client sends request –Server receives request and directs it to ASP –ASP processes, then returns result to client HTTP request types –Request methods GET –Gets (retrieves) information from server –Retrieve HTML document or image POST –Posts (sends) data to server –Send info from HTML form continue..

13.2 How Active Server Pages Work Browsers often cache Web pages –Cache: save on disk –Typically do not cache POST response Next POST request may not return same result Client requests ASP file –Parsed (top to bottom) by ActiveX component asp.dll –Parsed each time requested –Web server must support ASP by providing component such as asp.dll

13.3 Client-side Scripting versus Server-side Scripting Client-side scripting –Commonly used –Browser-dependent Scripting language must be supported by browser or scripting host –Viewable on client Protecting source code difficult –Reduces the number of requests the server receives –Enhance a Web page’s content Richer functionality than HTMl

13.3 Client-side Scripting versus Server-side Scripting Server-side scripting –Reside on server –Greater flexibility – database access –Usually generate custom response for client –Access to ActiveX server components Extend scripting language functionality –Run exclusively on server  cross-platform issues not a concern –Not visible to client Only HTML + client-side scripts sent to client

13.4 Using Personal Web Server or Internet Information Server ASP requires –Web server Personal Web Server (PWS) 4.0 Internet Information Server (IIS) 4.0 –Database –. mdb files –Configuration for examples in this book can be found on page 778 May have to change paths in.asp files to reflect your directory structure

13.5 Active Server Page Objects ASP has several built-in objects –Request object Access information passed by GET or POST Used to access cookies –Response object Sends information such as HTML or text to client –Server object Provides access to server methods and properties Provides method CreateObject –Used to instantiate other objects

13.6 A Simple ASP Example Scripting delimiters – –Indicate code is to be executed on server, not –Specify scripting language (default VBScript) – Each time page refreshed, server loads and interprets ASP Sample Program Sample Output File

13.7 Server-side ActiveX Components Server-side ActiveX components –Typically do not have GUI –If scripting language for ASP not support certain feature, create ActiveX Server component Visual C++, Visual Basic, Delphi, etc. –Usually execute faster than scripting language equivalents –Executed on server Client does not need to support ActiveX technologies continue.. Sample Program1 Sample File Output1 Sample Program2 Sample Config.txt File

13.7 Server-side ActiveX Components Some server-side ActiveX components included with IIS and PWS © Copyright 2001 by Deitel & Associates. All Rights Reserved

13.8 File System Objects File System Objects (FSOs) –Manipulate files, directories and drives –Read and write text –In Microsoft Scripting Runtime Library –5 FSO types: FileSystemObject –Interact with File s, Folder s and Drive s File –Manipulate File s of any type Folder –Manipulate Folder s (i.e, directories) continue..

13.8 File System Objects Drive –Gather info about Drive s (local or remote) TextStream –Read and write text files OpenTextFile(filename, code, create) –filename - file to open –code 8 - open for appending 1 - open for reading 2 - open for writing –create? - if true, creates a new file if does not exist continue.. Sample Program Sample Output File

13.8 File System Objects continue.. © Copyright 2001 by Deitel & Associates. All Rights Reserved

13.8 File System Objects continue.. © Copyright 2001 by Deitel & Associates. All Rights Reserved

13.8 File System Objects continue.. © Copyright 2001 by Deitel & Associates. All Rights Reserved

13.8 File System Objects © Copyright 2001 by Deitel & Associates. All Rights Reserved

13.9 Session Tracking and Cookies Customized services – –Shopping cart –Marketing Track clients –Session tracking Handled by server ASP: Session object –Timeout property »Default: 20 minutes »Terminate with Abandon method continue.. Sample Program Sample Output File

13.9 Session Tracking and Cookies Cookies –Small files sent as part of response to client –Every HTTP interaction between client and server includes header Contains info about request or response –Request: type of request ( GET or POST ) and cookies stored on client machine –Maximum age Duration of browsing session Store cookies on client computer for future use Cookies automatically deleted when expire continue.. Sample Program Sample Output File

13.9 Session Tracking and Cookies ASP application –Multiple ASP pages linked through POST requests Server side include (SSI) –SSI statement replaced with contents of file –SSI statements always execute before any scripting code –.inc extension Virtual paths vs. physical paths Sample Program Sample Output File

End of Session 13