Web Application Architecture and Communication. Displaying a Web page in a Browser <a href= y.php?pollid=2.

Slides:



Advertisements
Similar presentations
Kyung Hee University 1 1 Application Layer. 2 Kyung Hee University Position of Application Layer.
Advertisements

Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Technical Architectures
What is it? –Large Web sites that support commercial use cannot be written by hand What you’re going to learn –How a Web server and a database can be used.
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
The Application Layer Chapter 7. Electronic Mail Architecture and Services The User Agent Message Formats Message Transfer Final Delivery.
Introduction to Web Database Processing
Lecture 2 Web application architecture. Themes Architecture : The large scale structure of a system, especially a computer system Design choice: The need.
Apache Tomcat Server – installation & use Server-side language-- use Java Server Pages Contrast Client-side languages HTML Forms Servers & Server-side.
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.
Introduction to Web Interface Technology (CSE2030)
Multiple Tiers in Action
CS CS 5150 Software Engineering Lecture 13 System Architecture and Design 1.
Apache Tomcat Server Typical html Request/Response cycle
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
1 Software Testing and Quality Assurance Lecture 32 – SWE 205 Course Objective: Basics of Programming Languages & Software Construction Techniques.
Introduction to Web Interface Technology (CSE2030)
Information Systems Development 3 Lecture 2 3-tier application architecture A technical view.
CGI Programming: Part 1. What is CGI? CGI = Common Gateway Interface Provides a standardized way for web browsers to: –Call programs on a server. –Pass.
E-Commerce The technical side. LAMP Linux Linux Apache Apache MySQL MySQL PHP PHP All Open Source and free packages. Can be installed and run on most.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
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.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
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.
NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
Chapter 1: Introduction to Web
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
Server-side Scripting Powering the webs favourite services.
Lecture 7 Interaction. Topics Implementing data flows An internet solution Transactions in MySQL 4-tier systems – business rule/presentation separation.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 23 How Web Host Servers Work.
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
3-tier application architecture A technical view
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
Website Development with PHP and MySQL Saving Data.
1 Welcome to CSC 301 Web Programming Charles Frank.
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
Dynamic web content HTTP and HTML: Berners-Lee’s Basics.
Overview Web Session 3 Matakuliah: Web Database Tahun: 2008.
INTRODUCTION TO WEB APPLICATION Chapter 1. In this chapter, you will learn about:  The evolution of the Internet  The beginning of the World Wide Web,
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Introduction and Principles Web Server Scripting.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Servers- Apache Tomcat Server Server-side scripts- Java Server Pages.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
World Wide Web has been created to share the text document across the world. In static web pages the requesting user has no ability to interact with the.
E-commerce Architecture Ayşe Başar Bener. Client Server Architecture E-commerce is based on client/ server architecture –Client processes requesting service.
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.
Introduction to Dynamic Web Programming
Section 6.3 Server-side Scripting
Web Development Web Servers.
PHP / MySQL Introduction
Database Driven Websites
Chapter 27 WWW and HTTP.
PHP and Forms.
Web Application Development Using PHP
Presentation transcript:

Web Application Architecture and Communication

Displaying a Web page in a Browser <a href= y.php?pollid=2 y.php?pollid=2 > Poll results

Dynamic Web page needed when: consistent look and feel on each page of a large site is required data is derived from a database content depends on real time content depend on user choice business transactions e.g. e-commerce…

3-tier architecture A Presentation layer using Browser technologyPresentation An Application layer using a web application server platform + application programsApplication A Persistence layer using a relational database or other data store technologyPersistence

(Level 1 Diagram) users a information need presentation layer 1 application layer 2 HTTP requests persistence layer 3 SQL requeststables HTML files information Browser such as IE6, FoxFire Apache or MS IIS server + PHP MySQL RDBMS

Presentation layer arch arch Decoding URLs : protocol/host/file –Host name converted to IP address( ) – Issue request to remote server using appropriate protocol (usually HTTP) accept the returned HTML (or JPEG,..) file Issue requests for any embedded links ( render (i.e. create a 2-d image ) the HTML allow plug-ins to handle new file types execute client-side scripts in JavaScript support interaction between client-side scripts and the web page (DHTML) accept user input via a variety of controls on a form

Persistence layer arch arch interaction with the database using standard languages e.g. SQL queries using database-specific protocol over TCP/IP define and modify the data structures (e.g. tables) themselves ( the Database Schema) insert, update and delete data maintain data persistently, with backup and recovery handle transactions to support concurrent access to the database via locking et optimise access by compilation of queries, indexing, replication of tables etc.

Application Layer arch arch Server (Apache, IIS) –Identifying appropriate action to take – fetch a file, pass request to an interpreter –Sending output back to caller in MIME package –Support for: thousands of concurrent users multi-threading [ allow multiple processes to run concurrently] caching [holding results in a temporary store to reduce re-calculation] Server Script (e.g. in PHP) –Interacting with the server (accessing input and generating output) –interpreting the requests according to business rules and past transactions from this client –requesting the appropriate data from the Persistence layer –computing derived data –creating the HTML (or GIF, MIDI..) for the page

Making sense We will be using a Patterns approach to structure our learning and analysis of systems and technology 3-tier architecture is a ‘Layered architecture’ – we will study this in detail next week. It depends on communication between programs in the layers, so we will look first at communications between processes.

Communication The ‘glue’ in this architecture is communication between software in the layers A single request from a user results in a complex flurry of communications and executions The flurry is composed of hundreds of simple interactionssimple interactions Sequence diagrams can be useful to provide a simplified description

Simple Interaction Call/reply pattern caller callee parameters function reply

Call – reply pattern Purpose –A local or remote process must be invoked, sending parameter values to the process and receiving a response back. Multiple solutions –How parameter values are supplied –How the result is packaged for reply

A function call in PHP in a php script –the script is the caller –the date procedure is the callee –the string “H:I” is the parameter Parameters identified by POSITION –the function is to get the current date and time – –the reply – a string containing the time in the required format e.g. “13:45”

A browser requests a page The user clicks on a link on a page. The link has an href= –The browser is the caller –The web server program(Apache or IIS) on the machine host is the callee. –The string “dir/page.html” is the parameter –The function is to read that file in its file store –The reply is the contents of the file as a MIME package containing an HTML fileMIME Content-type: text/html

A browser requests a script to execute The user clicks on a link on a page. href= –The browser is the caller –The web server on the machine host is the callee. –The string “dir/getemp.php?empno=5” is the parameter –The function when the suffix is php is to find the script, call it with the parameter and get the output.call it –The reply is the reply from getemp.php packaged as HTML in MIME

Server runs a PHP script The web server is the caller The getemp.php script is the callee The parameter is empid=5 Parameters are name/value couplets The function is to find the details of employee 5 and format a report to perform this function, the script calls mysql_connect procedures which in turn calls the mySQL server …. The reply is HTML text

Simple Interaction Variations How are parameters distinguished –By position –By name How is the reply packaged? How is the interface defined? –what parameters are required –what the effect of those parameters are –what replies to expect in what circumstances Does the process always produce the same output for the same input or does is depend in past calls? How does the caller find the callee? What does the caller do when is waiting for a reply? What happens if the callee doesn’t reply? How long should the caller wait until it thinks the callee isn’t going to reply? Is a reply always required?

Sequence diagram of SMS bus times request

A Pattern A pattern recurs in different guises –have the same overall structure and purpose, –with slight differences Patterns help us understand and describe complex systems Patterns ‘normalise’ descriptions – one thing in one place Same unit plays different ‘roles’ –webserver is callee with respect to (wrt) browser, caller wrt getemp.php Patterns are ‘fractal’

Simple PHP Calculator The workshop will get you to install and extend a simple interactive calculator. The coursework will require you to develop a simple PHP Calculator with a backend database e.g. – has an alcohol units calculatorwww.eirpharm.com