week 4

Uses of a scripting language: eg alerts, confirming choices, prompting the user, redirecting the user,

Sometimes it a page needs to redirect a user to an alternative page or site, the below code is an example of how Javascript undertakes this action.

Here is a simple alert box that prompts the user to click ok

 

Here is a Javascript that writes an output to a "p" tag

Javascript popup box with a prompt for user input.

 

 

browser detection, creating rollovers, checking/validating input, handling forms, maintaining cookies

Browser Detection can be done using the following code,

Checking a users input,

Describe how scripting languages can be embedded into HTML. JavaScript is object oriented. Explain what that means. VBScript is event-driven. Explain what that means.


As covered in class, Cookies are useful (and delicious) things. Using your research skills find out more information on these tools, include;
•Why that they are used
•where they are used
• What risks there are
• What legal implications need to be considered

 


Now that you have had some guidance to the creation of a simple template, use the websites of w3Schools and CSS-Tricks to extend your template. Remember to keep saving, and, CHECK YOUR CODE FOR MISTAKES!!

Characteristics of scripting languages:

nature of language eg object-oriented, event-driven; objects; methods; handling events; hiding scripts;
The use of scripting languages in web development is widespread, with common languages such as Javascript, PHP, Java, AJAX, Perl, and CGI.

  • Javascript
  • PHP - developed by Rasmus Lerdorf in 1994 as Personal Home Page. It was released in 1995 as Personal Home Page Tools. This was a parser which interpreted files written in the simplified programming language of PHP.
  • Java -
  • AJAX -
  • Perl -
  • CGI -


These languages have a number of benefits to users and web pages, commonly referred to as object-oriented scripting. The use of object orientation enables web developers to make use of coding that has been created before and are stored in libraries to enable features and additionally to user code.
Object-oriented scripting uses objects that consist of methods that can be triggered to run based on a user's actions.
There are a number of potential security issues to consider when using these scripting languages,

  • Reading -
  • Writing -
  • Client Files -
  • Opening and Closing of user windows -
  • Reading Information -
  • Including Scripting inside HTML -

 

https://docs.microsoft.com/en-us/scripting/javascript/javascript-fundamentals

 

 

"Design communicates on every level. It tells you where you are, cues you to what you can do, and facilitates the doing". Jeffrey Zeldman, http://www.adobe.com/designcenter/dialogbox/stylevsdesign/ 

Why use scripting?

Uses of a scripting language enable websites to have added dynamic ability's these include things like,

Alerts that allow users to understand that a button has been clicked, or an item in a e-commerce site has been added to a shopping cart, or the deleation of a file in an online storage area.

Confirming choices,

prompting the user,

redirecting the user,

Other features that scripts like Javascript can allow are the use of browser detection this is a key tool in a developers toolbox as this can enable different scripts to be triggered and supported dependant on the browser being used by the client. Developers can create dynamic buttons for the users by making use of rollovers a feature that changes an image if a users cursor hovers over it.

Scripts are often used to take away the load from a web server, this could be things like checking/validating input, this is common of users entering email addresses for username and form data, rather than sending the information to the server to check for the inclusion of @ signs and .com's and .co.uk's Javascript can run on the client machine to check this nonsensitive data input.

Scripts are also used to maintain cookies, these are small text files that sit on the client side that include information about websites and user information so that when a user goes back on a site they can carry on with what they are doing, an example of this would be a shopping cart that stores information to the contents placed in the cart for a couple of days.

Scripting language constructs: syntax eg dot operator, values, variables, operators, assignment, comparisons; loops eg for, for/in, do/while; decision making eg if, if/else, switch/case; functions (calling, parameter passing); handling events eg onfocus, onload, onblur, onmouseover; methods eg write(), click(), open(), selected(); properties eg name, width, ID, value

 

 


As covered in class, Cookies are useful (and delicious) things. Using your research skills find out more information on these tools, include;
•Why that they are used
•where they are used
• What risks there are
• What legal implications need to be considered

 


Now that you have had some guidance to the creation of a simple template, use the websites of w3Schools and CSS-Tricks to extend your template. Remember to keep saving, and, CHECK YOUR CODE FOR MISTAKES!!

 

 


 


Last Updated
2018-04-16 13:27:00

Links to Learning Outcomes

Links to Assessment criteria

LO2 Understand the fundamentals of scripting languages

 

P3 explain the fundamentals of a scripting language

M2 discuss how a scripting language can improve functionality

D1 explore how web pages using scripts are implemented in different browsers



English

Rollover buttons - work as normal buttons on a web page, but when the mouse hovers over them, the image or text changes.

Cookies- packets of data exchanged between the client computer and web server for authentication or personalisation of a website.

Syntax- the grammar of a programming language, prescribing the order in which words can be used. Variable - used to store data and is given a name, eg the data 'Fred' might be stored in variable 'firstname'. Array- a collection of variables that have a single name.

Operator- a mathematical symbol used in a calculation or comparison.

Loop - a piece of code which is executed over and over again until it fulfils a preset criterion.

Text Types

1. Descriptive language and features

(Discussion and analysis on features of descriptive text, read and analyse text, write examples of descriptive text)

2. Function of nouns and verbs within text

(Discuss and pick out nouns and verbs)


Maths

Using numbers: Written or mental methods, using a calculator, rounding and estimating, problem-solving



https://www.tes.com/teaching-resource/challenge-toolkit-6063318

 





How 2's Coverage

Learning Capture - Teachers allocate time at the end of the session for the group to write down what they think they have learned. The information shared helps the teacher to see which content he may need to revisit and so shapes future planning.



0

Files that support this week


| | | | |
Week 3
Prev
Week 4
Prev
Week 5
Prev

Next

Next
Webmaster Spelling Notifications