Week Thirteen (MGDP2060)

From Wiki @ Karl Jones dot com
Revision as of 21:20, 28 November 2016 by Karl Jones (Talk | contribs)

Jump to: navigation, search

This article lists topics for Week Thirteen of Web Design and Development III (MGDP2060).

Previous: Week Twelve (MGDP2060) - Next: Week Fourteen (MGDP2060)

Ajax

Ajax is a programming paradigm, widely used in web design and development.

Ajax is a number of things, the most important being the fact that JavaScript can:

  • Send requests from a browser
  • Receive responses from the server
  • Update the browser's Document Object Model -- in other words, what the user sees (or hears) in the browser.

Ajax happens without the user browsing from page to page, handled automatically by JavaScript.

JSON

JSON is a file format for text data, widely used in web applications.

JSON is an alternative to XML.

JSON file

A JSON file is a text file containing JSON data (and nothing else).

JSON files have the .json file extension.

JSON data is commonly delivered via web service, and not as a text file.

Document Object Model

In a web browser, the Document Object Model (DOM) represents the HTML, CSS, and other parts of a web page.

Web service

Web feed

CORS

WordPress to override CORS

Add this code to functions.php:

add_action( 'pre_get_posts', 'add_header_origin' );

function add_header_origin() {
    if (is_feed()){
        header( 'Access-Control-Allow-Origin: *' );
    }
}  

Exercises

See Week Thirteen Exercises (MGDP2060).