5.1. Web

In this lecture we look at...
[Section notes PDF 133Kb]

5.1.01. Databases for the Internet

  • Path from DB to User
  • Information flow
  • Data formats (OO)
  • Format transitions
  • Limitations/channel
  • The Future

5.1.02. OO

  • Object orientated approach
    • Consistent/optimised development model
    • Good approximation of real world
    • Closer link to mini-world
  • Java and PHP
  • DB persistence
  • UML

5.1.03. Java and PHP in context

  • Java
    • JSP (server-side)
    • Javascript (client-side)
  • PHP
    • Server side only
  • JSON or XML
    • Object communication
  • Ideal scenario
    • Java – load times

5.1.04. In a perfect world

  • Homogenous data format/data model
  • DB stores objects instead
  • Objects transferred
    • Robust
    • Lightweight
    • Fast
    • Consistent (more later in Transactions)
    • Caching

5.1.05. In the real world

  • Heterogenous data model
  • Object translation/wrappers
  • Different languages features at different layers
  • Minimal subset of OO functionality available end-to-end
  • Going to look at information flow/functionality provided

5.1.06. User

  • Limitations of being human
    • short term memory
    • long term familiarity
  • language of the Internet
    • hypertext linking
    • form filling
  • Advantages of being human
    • impatience, no waiting
    • wants instant response

5.1.07. Browser

  • Http requests
  • Forms
    • Post
    • Get
  • Form fields
    • By name, by ID
    • Hidden
  • Javascript/DOM tree

5.1.08. Internet

  • Communication medium
  • Good for transferring data
  • Not good for transforming data
  • e.g. Light in air
  • e.g. Signal over CAT5e/UTP cable

5.1.09. Web server

  • Straight HTML pages
  • Dynamic HTML pages
    • PHP example
    • JSP example
  • As above with RDBMS integration
    • PHP PDO example
  • As above with Objects
    • PHP DBDO example

5.1.10. load, edit, submit, act timeline

5.1.11. href click, versus form post

  • Protocol stack
  • Basic up-down
  • Shortcuts
  • Browser cache
  • Web server
    • assembled page cache
    • php object cache
  • DB optimised queries

5.1.12. Examples from the web