Friday 11 July 2014

UNIT 20 M2 – Discuss How a scripting language can improve functionality

UNIT 20 M2 – Discuss How a scripting language can improve functionality

M2 in a Powerpoint and this is it >>> http://adf.ly/q8WYy <<<click on the link to be sent to  M2.
 
_____________________________
_____________________________

ALL ASSIGNMENTS HERE!! PASS, MERITS AND DISTINCTIONS


<<PowerPoint version>>

How scripting language improves functionality of a web page?
From scripting languages like java Script and PHP programming language they add functionality to websites  to make them more interactive
The whole point of them are to be used for HTML and CSS

Alerts
When it comes to alerts they mostly come up as a popup to notify a user.
Alerts normally popup when a site has finished loading or if a button is clicked.

Confirming choices
When confirming a choice is normally used for when a mistake has been made. This would allow the user to back out if mistaken
The function is normally within alert pop up box. This would only tell the user which also cause some actions depending on what the person does.

Prompting the user
The function here would be to prompt anyone for an action
This normally appears in form of confirmation box with 2 options

Redirecting the user
The redirecting role is placed within a text or button.
 This function is used for open a defined website when the visitor triggers the defined object.

Browser detection
Browser detection is a code that can be used to check and detect what browsers is in use and the version in use. This can be used to help the server know what data it would need to present to the browser.

Creating rollovers
Rollovers are the use of coding that is able to adjust an objects features in a visual appearance when an action is made
Most of the actions use a mouse to be used.

Checking/Validating input
This is a function like a automatic command that is used to ensure that each user has entered the information in the form.
This can also be bettered by the developer adding a restriction such as text or the amount of numbers used. The would help stop mistakes

Handling forms
Handling forms is a function that uses events where the input of data in needed to be passed on to a data base.
Feedback and email forms would be an example of then which are embedded within some websites. They would be a good example of handling forms because the user input is needed and then sent to the recipient.

Maintaining cookies
This would mainly be used on websites where people use often with the information frequently. The inputted data is stored as a cookie and this is because when someone revisits the site on the same computer, their information will appear again.
The use of cookies are to store information stored in a text file on a local computer.


<< A Written Version >>

How can a scripting language improve functionality?

Scripting language is a tool, which is used to gain functionality to other pieces of software. Scripting language isn’t as strong as a full programming language and it’s designed for simple tasks like creating interactive menus and searching a database. HTML is used to help create static wepages but it isn’t able to do everything, which is why java and PHP script is implemented to make the website dynamic with user interaction. Without JavaScript a website wouldn’t be functional, that’s why JavaScript it is very important in making a website. Scripting languages can be embedded within HTML are used for functionality within a webpage such as different menu styles. These types of languages, which can enable functionality, are client side scripting languages that affects the data that the end user sees in a browser.

If a website used JavaScript effectively, then it can add user prompts, navigation and assistance. The use of JavaScript is to improve the content and functionality of websites. Businesses such as Miniclip use JavaScript for their website for the gaming applications. The use of a scripting language is that it makes websites more interactive because the page will respond to the users actions instantly. On a developer side of view, JavaScript allows to have more control over the appearance and actions of the webpage.

Nevertheless, some browsers are out of date and a number of people keep the browsers’ in use still and they May not run scripting languages, this may lead to the webpage not running properly.  When the developer makes and tests the scripts to working order the time they put in is immense. The browsers that know how to implement the scripts are: Firefox, Google, Safari and Internet Explorer.

Java scripting improves website functionality, and this can be done by adding a rollover button to a webpage. A rollover button is a web button with the ability to change its appearance when the mouse moves over it. The button has three states to it, which are normal, over and down. The normal state is when the mouse is off the button, over state relates to when the mouse rolls over the button and down state applies to when the button is clicked. Rollover buttons are different to static web buttons; this is because they are vibrant in nature and gives you and option to change the colour and style of the button with the movement of the mouse.

Every website has cookies. A cookie is a small piece of information that is sent from a website that is stored on the visitors’ computer. The cookie is a message that is given by the browser to a web server. The browser stores the message in a text file for the message to be sent back to the server each time the browser contacts the web server. The use of a cookie is used to identify the user, and may hold other information about the user. The types of different type’s cookies are:

  • Session cookie – this is a cookie that is only stored temporarily while the user browses the site.
  • Persistent cookie – these remain on your hard drive until you erase them or they expire. 
Client side scripting has 2 main purposes

Validation: checking if data on input is valid and used a lot on web forms to make sure that what you are doing is valid. A number of checks are carried out such as presence check which is done to check if data is there or not, another check is carried out which age/date is/ validity range check.

Speed: is an advantage on client side validation. The validation is done by the client, so it happens on the user’s computer system in the browser. The server saves on processing as the validation tasks are carried out on the client’s machine.

Client-side: The client is the system on which the web browser is running. JavaScript is the main client-side scripting language for the Web. The browser interprets client-side scripts. Client side scripting has a process, which is shown: The user requests a web page from the server that finds the page and sends it to the user. The page is displayed on the browser with any scripts running during or after display.

Client side scripting is used to make web pages change after they arrive at the browser. It is useful for making web pages a bit more interesting and user friendly. It can provide useful gadgets such as calculators, clocks, etc.

Client side scripts rely on the users computer. If that computer is slow then it may run slowly. They may not run at all if the browser does not understand the scripting language, this is one reason why it is important to have recent browsers because they have to run on the users system and the code, which makes up the script is there is the HTML for the user to look at.

Server side validation is usually performed in middle tier script and is the most important validation tool. When data is inserted, updated or deleted at the database. Trapping errors using the PHP error function is hard because it has a unnecessary network and DBMS overhead, and I is hard to present to the user is a useful way. It is better to use PHP scripts to validate data and make sure all constraints of the database are bet before modifying the database.

Server Side: the server is where the web page and other content stays. The server sends pages to the user/client when requested. The process for this is shown: The user requests a web page from the server then the script in the page is interpreted by the server creating or changing the page content to suit the user. The page in its final form is sent to the user and then cannot be changed using server side scripting

The use of HTML forms or clever links allow the data to be sent to the server and processed. The results may come back as a second web page. Server side scripting is often used for allowing users to have individual accounts and providing data from databases. It allows a level of privacy, personalisation and provision of information that is very powerful. E-commerce and social networking sites all rely on server side scripting to keep information safe.

The script is interpreted by the server, which means that it will always work the same way. The user never sees server side scripts, which is useful so they can’t, copy their code. They run on the server and generate results, which are sent to the user. Running all these scripts puts a lot of loads onto the server but nothing on the user’s system. The server side system has to be powerful so it can deal with the entire load. 

1 comment: