Friday, 7 November 2008

lecture 6/tutorial 5

Lecture
This week (06.11.08) Tony tackled 3 related subjects

DOM, JAVASCRIPT and AJAX

DOM (Document Object Model) definition on the W3 consortium site is defined
as an API (Application Program Interface) for valid and well formed HTML and XML documents.
It is independent of HTML and XML, and so the same DOM could apply to later versions of the same website if in the future it is done it XML 3.0 for example providing the structure of the webpage remains the same.
From the DOM you can see where each part of the webpage relates to another, where they connect to each other and what their role is.
The DOM gives the programmer direct access to the part of the webpage that they intend to edit.
The pictorial representation of the DOM can be likened to an upside down tree.
According to WIKI the DOM is not required for pure HTML but Javascript scripts use the DOM
modify/change to inspect a page or document.

Tony referred to the to W3C schools examples on DOMs.

JAVASCRIPT
Javascript is used to add interactivity to a webpage. The script will use an object and change it's state or can be used to start a javascript action.
javascript is mostly client side ie done at the user' browser rather than actions done at the server (server side)
Tony referred to his own javascript example on his website.
Very useful for checking (validating) the contents of a form before it wings it's way to the server and it's recipient.

AJAX
Asynchronous javascript and XML
A group of techniques used for creating interactive web application.
Moving on from just Javascript client side we are now going to use the javascript actions to retrieve content from the server.
The content is dependant on what the javascript has requested which is of course dependant on what the user did. (we hope, if all is going well!)

Tony referred to this example

link http://noticeboard.chrisjhill.co.uk/

The movement of the post it notes is recorded by the javascript, passed to the server and the webpage is altered for everyone viewing it.


Tutorial
Added the links of all the previous exercises/practice pages completed to my home page.
Checked them for compliance. And resolved any errors.
Made the new folder called ittwassignments and copied the existing exercises/ practice pages across to to it.

martin's home page

Renamed the existing files that can be used as templates for the assignment and checked them for compliance and placed them in the ittwassignment folder ready to edit into the assignment specification.

charity home page

In the evening I made a start to tutorial 6 although I never finished.
I attempted this one because tutorials 4 and 5 I can try at home but 6 with it's PHP element I would rather do at UWE and it is important for the assignment.


To do next time.
Put descriptions by the links rather than just titles. If this compliant code is to be used in the future it would be wise to describe clearly what it is for easy reference.

2 comments:

Paul Hulbert UWE said...

Yes, it's good to document code with comments as you go, and to give filesnames, variables and so forth meaningful names. It makes it easier to follow when you have to debug.

Martin said...

have finished yet Paul. crumbs you got your comment in early.