240 likes | 330 Views
Web Design and Development for E-Business. Jensen J. Zhao. Introducing Web-Based Client/Server Applications. Chapter 8. Chapter 8 Objectives. Evolution of Client/Server Architecture Web-Based Client/Server Applications Essentials of ASP Programming and Editing Selection of ASP Tools.
E N D
Web Design and Developmentfor E-Business Jensen J. Zhao
Chapter 8 Objectives • Evolution of Client/Server Architecture • Web-Based Client/Server Applications • Essentials of ASP Programming and Editing • Selection of ASP Tools
Client/Server Architecture • Two components • Client: client computers and their software • Server: includes both hardware and software Client machines send requests to server Server processes request Server returns results to client
One-Tiered Architecture • Server mainframe or minicomputer • Dumb terminals • No internal processing power • No storage capacity • All processing, calculation, storage done on mainframe • Disadvantages • Single centralized processor • Lacks flexibility and scalability
Two-Tiered Architecture • Server mainframe or minicomputer • Personal computers • Processing tasks divided • Applications run on PCs • Data stored on mainframes • Disadvantages: • Complex applications are large • Client PCs become “fat”
Three-Tiered Architecture • Server mainframe or minicomputer • Personal computers • Application server • Middleware • Provides applications • Acts as transaction monitor • Stores data • Advantages: • “Thin” client
Web-Based Client/Server • Advantages over LANs and WANs: • No geographic boundaries • Accessible wherever Internet connection available
Browser Presentation Layer • Human-to-computer interface • Possible elements: • Home page with welcome message • Product pages with “buy” buttons • “Buy” buttons linked to product page • Order form • Shipping information
Application Server Layer • Middle layer • Web server takes requests from client browser • Forwards requests to the database • Server collects responses from database • Passes responses to client browsers • Building an application server layer: • Install a Web server • Connect the server to the Internet • Create a virtual directory for the Web server • Write a Web client/server database application with HTML and DHTML
Database Layer • Stores and retrieves data • SQL requests received from Web server • Database app stores data, processes results • Sends results to server • Server forwards results to client browsers • Building a database layer: • Develop database app on the server computer • Create DSNs for the user and system
Impact of Applications • School sites • Registration • Check schedules, grades, exams • Business-to-business (B2B) • Supply chain management • Business-to-consumer (B2C) • Online retailing like Amazon.com • Consumer-to-consumer (C2C) • Online auctions like eBay
Development of Applications • Browser presentation layer • HTML • Application server layer • ASP, Visual Basic, VBScript, Java, JavaScript, Coldfusion, CGI, Perl • Database layer • Web-enabled database software • Access, SQL Server, Oracle • DSNs • Enable database access through application layer
ASP Programming • Secure, server-side scripting • Viewable with any browser • Open development environment combines • Scripting • Pre-built objects • ASP delimiters <% . . .%> • Five primary ASP objects
Request Object • Purpose: to get information from the user • Submits info to Web server • Basic data collection functions: • Form • QueryString • ServerVariables • Cookies
Response Object • Purpose: to send information to the user • Delivers to client browser • Basic functions: • Changing cookies • Controlling properties of objects • Controlling actions of objects
Server Object • Purpose: to control connections to external components • Used in nearly every ASP file • Supports only one property • ScriptTimeout • Determines maximum time an ASP file can take to complete an execution
Session Object • Purpose: to store information about and change settings for the user’s current Web-server session • Automatically created when new visitor arrives at application page • Enables application to keep track of visitors
Application Object • Purpose: to share application-level information and control settings for the lifetime of the application • Created at Web server when you create a virtual directory for the application
ActiveX Data Objects • Interface with other relational databases • Use ODBC • Three objects: • Connection • Recordset • Command
Selection of Tools • Minimum requirements to program, test and edit ASP: • Web browser • Web server • Web-enabled database software • Minimum requirements to program and edit ASP: • Netscape Composer • Windows Notepad
Chapter 8 Summary • Client/Server Architecture • Web-Based Client/Server Architecture • Browser Presentation Layer • Application Server Layer • Database Layer • Impact of Applications • Development of Applications • Essentials of ASP Programming • Selection of Tools