Content and Dynamism

Dynamic Server

  • Markup Language: primarily text, adds tags to text to "mark" certain things
  • HyperText Markup Language (HTML) set of tags for rendering page

    Some features: Hypertext(text with embedded links that use relative path), Escape Strings (characters in a string that allow you to clarify ambiguity about special characters, e.g. \ and "" within a string

Close tags can be omitted

  • eXtensible Markup Language(XML): No standard set of tags, you build a tree of document objects (Document Object Model, representation of tags in a document. The hierarchical tree structure of tags that is interpreted by the browser)
  • XHTML: dialect of HTML that uses proper containment rules of XML
  • HTML5 merges XHTML with HTML, closing tags always (or added by browser)
  • HTML for data and words. CSS for visual layout

From static to dynamic pages

(i.e. Web pages that do nothing to web pages that can do everything)

  • N-tier model: One database, multiple servers, multiple browsers
  • Model View Controller

  • HTML Web Page is the Model. The model is the database + filesystem

  • CSS is the View
  • Browser (input from user) is controller

HTTP Get from Server to Browser is the View. HTTP Post from Browser to Server is Controller. Model is Database

Dynamic Client

  • Without dynamism on the client, loaded page with dynamic content on the server is the final page
  • The fix: run programming on the browser itself
  • JS is in the browser (except node.js which is at the HTTP server)
  • JS runs in browser when triggered by script tag
  • JS modifies the DOM (parsed HTML, like a data structure of HTML code)
  • In-browser programs are sandboxed for security, e.g. scripts from different origins cannot see each other, no infinite loops
  • Cross-site scripting: takes parameters from URL and makes programs, aka "tag injection"
  • Fix: Have different JS engines, use separate processes at the OS level so that JS problems are separate across pages