Monday 14 December 2009

Week 9 - Client side programming

Client side processing is often used when a web page requires high levels of interaction, with frequent changes and updates. Server side processing would be used if interaction between the client and the server were needed for each query, think of Streetmap.co.uk Client side applications generally use less information, are quicker to respond and can therefore be interactive. Certain forms of data transfer such as streaming media use both server and client to ensure speed and accuracy. Plugin software can sometimes be downloaded to speed up the process.

Getting the computers to talk to each other can be achieved using a programming language. The languages have standard terms and contain instruction. In our session we reviewed JavaScript technology, very powerful but very unforgiving. Code must match syntax.

Almost all programming languages follow seven fundamental concepts:

Variables – the buckets that hold the data.
Input and Output – Javascript manipulates the structure and content of the HTML and CSS both ways.
Arrays – think of it as an ordered list of buckets (variables).
Sequence – as the word implies one things happens after another.
Selection – Making code action only when certain conditions are met, so if this, then that.
Iteration – repeating an action, often the While statement.
Procedures – (may also be called functions, methods, sub-routines) the ability to provide commands in your own language.

We started to build a simple JavaScript in the lab to answer the exercise laid out in this section. Time in the lab was limited but we had further discussion with colleagues, both face to face, via discussion boards on CitySpace and email. Resulting in a successful completion of the excerise. Take a look. File put in unix folder separately to display JavaScript. Interacivity lost in transferring.

Andy’s advise of taking it step by step is critical. How to eat an elephant - small size chunks.

2 comments:

Kate said...
This comment has been removed by the author.
Kate said...

FTP'd JavaScript file into UNIX but not opening interactively. Will load code for viewing.

Loaded as file under public_html/
JS.html