53.3. Assignments DI.2

Submission
You must submit assignments using git
Create Repo
  • Create an empty repo on bitbucket.org, gitlab.com, or github.com,
  • git push your local repo to the above remote repo.
  • For node assignments the line node_modules/must be in your .gitignore file.
Submit
By email to with:
  • The word 'submission <subjectname>' in the subject line
  • The url(s) of your repo(s) in the body

53.3.1. Model Solution Assignment DI.2.0

Research and answer the following:

  1. Are maxLength, or minLength allowed on optional name/value pairs?
  2. Based on the basics from Chapter 52 JSON has Number, Boolean, Null, String, Object, and Array as object types. Research whether they all apply as types in JSON-schema. Make an example that proves your answer.
  3. Make a JSON-schema for the JSON in Section 52.8.1 and perform validation of the JSON
  4. Make a JSON-schema for the JSON in Section 52.8.2 and perform validation of the JSON
  5. Make a JSON-schema for the JSON in Section 52.8.3 and perform validation of the JSON

53.3.2. Assignment DI.2.1

Create an AJaX one page application that allows chosing a country from a drop down or as a key in. The page issues an AJaX request to a PHP program reading from the World database. The data must be returned as JSON and displayed by JavaScript. The displayed data must be:

  • Country name
  • Population
  • Capital city
  • Population of capital city
  • All official languages
  • Density of population
  • Head of state

53.3.3. Assignment DI.2.2

Create an AJaX one page application that allows chosing a country, district combination from the World db. The page issues an AJaX request to a PHP program reading from the database. The data must be returned as JSON and displayed by JavaScript. The displayed data must be:

  • Country name
  • District name
  • Cites from district
  • Population of said cities
  • Population of district
  • Population of country