Information Systems Development 3 Lecture 2 - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Information Systems Development 3 Lecture 2

Description:

The web server on the machine host is the callee. ... JavaScript, SSI, J2EE, MySQL, Oracle, CSS, PHP, ASP.NET, Flash, Java Applets, ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 29
Provided by: cjwa
Category:

less

Transcript and Presenter's Notes

Title: Information Systems Development 3 Lecture 2


1
Information Systems Development 3Lecture 2
  • 3-tier application architecture
  • A technical view

2
Themes
  • Architecture The large scale structure of a
    system, especially a computer system
  • Communications The interaction between
    components
  • Description Patterns and story-telling
  • Choice
  • Design decisions design decisions which face a
    developer
  • Infrastructure choice selecting the most
    appropriate software from the available range.

3
Displaying a Web page in a Browser
  • lta href http//www.cems.uwe.ac.uk/cjwallac/UFIE
    8V-2004/l2_3tier.htmlgtLecture 2lt/agt
  • URL is decoded protocol/host/file
  • Page requested from host
  • Page is returned
  • HTML codes determine how text is rendered
  • If page contains links e.g. ltimg srcred.gifgt,
    browser must repeat the same process on each

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

5
3-tier architecture
  • A Presentation layer using Browser technology
  • An Application layer using a web application
    server platform application programs
  • A Persistence layer using a relational database
    or other data store technology

6
(No Transcript)
7
Presentation layer arch
  • Issue request to remote server
  • accept the returned HTML (or JPEG..) file
  • 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
  • accept user input via a variety of controls on a
    form

8
Persistence layer arch
  • interaction with the database using standard
    languages e.g SQL queries and table returns
  • 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.

9
Application Layer arch
  • accepting requests from the Presentation layer
  • 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
  • providing run-time support for
  • thousands of concurrent users
  • compilation to machine code
  • multi-threading allow multiple processes to run
    concurrently
  • caching holding results in a temporary store to
    reduce re-calculation

10
Web Application Platforms
  • Server side includes - files with a .shtml
    extension
  • Cgi using Perl or other scripting language
  • PHP like SSI, a scripting language which is
    embedded in an HTML page.
  • Microsofts ASP (Active Server Pages )
  • J2EE
  • JSP for page scripting
  • Java class library
  • Multiple runtime vendors Tomcat, BEA
  • .NET is the latest technology from MS.
  • range languages (VB.NET, C, , C, Cobol... )
  • compiled to a common intermediate code (MSIL)
  • Extensive class library
  • ASP.NET scripting page scripting

11
3-tier Issues
  • Advantages
  • Re-use of appropriate software
  • Software can be located on different machines for
    convenience and performance
  • Resolves one-many relationships many clients
    one application, many applications one database
  • Challenges
  • well-defined, standardised interfaces between
    layers required.
  • Software must be built to conform to interface
    standards
  • The designer has to decide where to locate
    specific functions

12
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
    interactions
  • Sequence diagrams can be useful to provide a
    simplified description

13
Simple Interaction
  • Call/reply pattern

callee
caller
parameters
function
reply
14
A function call in PHP
  • lt?php print date(HI) ?gt in a php script
  • the script is the caller
  • the date procedure is the callee
  • the string HI is the parameter
  • the function is to get the current date and time
  • the reply a string containing the time in the
    required format e.g. 1345

15
A browser requests a page
  • The user clicks on a link on a page. The link has
    an hrefhttp//host/dir/page.html
  • 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

16
A browser requests a script to execute
  • The user clicks on a link on a page.
    hrefhttp//host/dir/getemp.php?empno5
  • The browser is the caller
  • The web server on the machine host is the callee.
  • The string dir/getemp.php?empno5 is the
    parameter
  • The function when the suffix is php is to find
    the script, call it with the parameter and get
    the output.
  • The reply is the reply from getemp.php

17
Server runs a PHP script
  • The web server is the caller
  • The getemp.php script is the callee
  • The parameter is empid 5
  • 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

18
Simple Interaction Variations
  • How does the caller find the callee?
  • What does the caller do when is waiting for a
    reply?
  • What happens if the callee doesnt reply?
  • How long should the caller wait until it thinks
    the callee isnt going to reply?
  • Is a reply always required?

19
Sequence diagram of SMS bus times request
20
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

21
(No Transcript)
22
(No Transcript)
23
Other layered architectures
  • ANSI/SPARC Database model
  • The external or user level, characterised by
    Views
  • The Conceptual level, comprising the full
    corporate data model at a logical level
  • The Physical level, where data is stored in files

24
Channels between Layers
  • Layered communications model (Tanenbaum)
  • Application Layer
  • Transport Layer
  • Network Layer
  • Data Link Layer
  • Physical Layer
  • Presentation ltgt Middleware
  • HTTP (The protocol which supports GET and POST
    messages) carrying a limited number of types of
    content (MIME types)
  • Middleware ltgt Data stores
  • ODBC with SQL request and table returns (whole
    table or row at a time)

25
Review Questions
  • Place the following terms in the 3-tier
    architecture
  • JavaScript, SSI, J2EE, MySQL, Oracle, CSS, PHP,
    ASP.NET, Flash, Java Applets, JSP, Dreamweaver,
    Visual .NET

26
Straw Poll application
  • Which parts belong to which tier of the 3-tier
    model script?
  • What is the ER model of the database?
  • What must be done to make selected improvements
    to this application?
  • Describe the interaction when a user votes when
    the tally page is requested.

27
Platform Comparision
  • Enterprise solutions
  • J2EE versus .NET
  • Simple words such as better or faster are
    best used by simpletons. Life, especially when
    it involves critical enterprise applications, is
    more complicated.
  • PHP versus .NET
  • Language wars

28
Comparison criteria
  • Other considerations, such as the perception of
    the vendor as an enterprise company,
    conformance to standards, strength of the
    ecosystem around the product, the degree to which
    the product is a de facto standard amongst its
    class, stability of the product or technology,
    ease of use, IDE integration and other tool
    support, total cost of ownership (TCO),
    portability and lock-in (or lack thereof),
    scalability and many other such factors often
    outweigh Performance among our customers.
Write a Comment
User Comments (0)
About PowerShow.com