Introduction to Client-side Scripting

Russell Taylor
Lecturer in Computing & Business Studies
What is the Client-side Scripting
Unit about?
 This course is a 12 Unit SQA HNC course.
 Units can be a single (1) or 2-Credit Unit
 Client-side scripting is a 2 Credit Unit at SCQF Level 8
(Higher HNC level)
 Assessment will be done by the completion of 3
Assessment Outcomes
 Unit is split into three parts to match these
outcomes – with each outcome taking 12 weeks to
What is the Client-side Scripting
Unit about ? - 2
 This Unit is designed to introduce candidates to the
fundamental concepts of programming using scripting
 The Unit involves combining both scripts and HyperText
Markup Language (HTML) or eXtensible HyperText
Markup Language (XHTML) to enable the creation of
dynamic client-based web pages.
 It is intended for candidates who already have some
understanding of HTML and/or XHTML and the
fundamental requirements of creating static web pages.
Client-side Scripting Outcome 1
 In this first Outcome:
 you will learn about the environment needed to create, test, run, and
access client-side scripts, such as browsers, editors, graphic packages
and/or as well as other utilities and tools that enable these tasks.
 You will also learn about various features and characteristics associated
with interpreted languages, (as opposed to compiled languages), in
addition to learning about the main difference(s) between client-side
and web/server-side scripts.
 You will learn about the wide range of scripting languages available and
their major advantages and disadvantages;
 You will be introduced to the methods by which client-side scripts can
be integrated within web applications and the means of accessing such
Outcome 1 in Detail
 This Outcome will be assessed in the form of written recorded evidence
testing your knowledge and/or skills.
 You will need to demonstrate that you can:
 For client-side scripting environment (browsers and editors)
create, test, run, and access client-side scripts ; browsers, editors, graphic
 Describe the characteristics of interpreted languages
the features and characteristics associated with interpreted languages
compared to compiled languages will include major advantages and
 Identify and describe the differences between client-side and server-side
environment under which each type is used ; tools needed to produce and
run the scripts; on-line database accessibility
Outcome 1 – More Details
 Types of scripting languages
 the different types of scripting languages currently
available highlighting their major advantages,
disadvantages and uses
 Methods used to implement client-side scripts
within web pages
 embedded coding and externally stored code
Lets Look at HTML & JavaScript
 Link to HTML Handout
 Link to JavaScript Handout
Client-side Scripting Environment
(Browsers and Editors)
 History: Web began as a text-only medium-the first browsers didn't even
support images within web pages.
 Today's websites can include a lot of features: graphics, sounds, animation,
video, and occasionally useful content.
 Web scripting languages also known as client-side scripting languages, such
as JavaScript, are one of the easiest ways to add dynamic state to a web
page and to interact with users in new ways.
 If you know how to use HTML (Hypertext Markup Language) to create a
web document, you've already worked with one computer language. You
use HTML tags to describe how you want your document formatted, and
the browser obeys your commands and shows the formatted document to
the user.
Browsers and Editors
 Because HTML is a simple text markup language, it can't
respond to the user, make decisions, or automate repetitive
 Interactive tasks such as these require a more sophisticated language: a
programming language, or a scripting language.
 Programming languages are complex, scripting languages are
generally simpler. They have a simple syntax, can perform
tasks with a minimum of commands, and are easy to learn.
 Web scripting languages enable you to combine scripting with HTML to
create interactive web pages
Scripts & Programs
 A movie or a play follows a script-a list of actions (or lines) for the actors to
perform. A web script provides the same type of instructions for the web
A script can range from a single line to a full-scale application. (In either
case, Scripts usually run within a browser.)
Some programming languages must be compiled, or translated, into
machine code before they can be executed. Client-side scripts, on the other
hand, are an interpreted language: The browser executes each line of
script as it comes to it.
Main advantage to interpreted languages: Writing or changing a script is
very simple.
Changing a client-side script is as easy as changing a typical HTML
document, and the change is executed as soon as you refresh the
document in the browser.
Scripting Languages
 A Scripting language is a variety of 'programming' that produces ASCII text-
based scripts which are usually designed for writing small programs.
 Scripting languages support high level language control features:
 selection and iteration (syntax)
 Referred to as 'glue-code‘
 Seen as being an enhancement of particular software packages or
 Examples of present day scripting languages are VBScript, JavaScript, Perl,
Python, TCL (Tool Command Language), etc
Scripting Languages 2
 Applications that provide scripting capability allows the user to extend the
functionality of the application by programming a sequence of actions.
 E.g. Filemaker Pro(a database package) it is possible to write scripts that open
and close files, copy data from records or enter a certain database mode such
as browse or find.
 Web browsers have added scripting languages to extend the capabilities of
static websites into dynamic applications, that provide more richer
features to the user.

similar documents