SCRIPTING INTRODUCTION

script:


  • A computer script is a list of commands that are executed by a certain program or scripting engine. 
  •  Scripts may be used to automate processes on a local computer or to generate Web pages on the Web. For example, DOS scripts and VB Scripts may be used to run processes on Windows machines, while AppleScript scripts can automate tasks on Macintosh computers. 
  •  ASP, JSP, and PHP scripts are often run on Web servers to generate dynamic 

scripting language:

A scripting language or script language is a programming language that supports scripts, programs written for a special run-time environment that can interpret (rather than compile) and automate the execution of tasks that could alternatively be executed one-by-one by a human operator. 

Types of scripting languages:


  • Perl (Practical Extraction and Report Language). This is a popular string processing language for writing small scripts for system administrators and web site maintainers. Much web development is now done using Perl. Hypertalk is another example. It is the underlying scripting language of HyperCard.
  •  Lingo is the scripting language of Macromedia Director, an authoring system for develop high-performance multimedia content and applications for CDs, DVDs and the Internet.
  •  AppleScript, a scripting language for the Macintosh allows the user to send commands to the operating system to, for example open applications, carry out complex data operations. 
  •  JavaScript, perhaps the most publicised and well-known scripting language was initially developed by Netscape as LiveScript to allow more functionality and enhancement to web page authoring that raw HTML could not accommodate. A standard version of JavaScript was later developed to work in both Netscape and Microsoft's Internet Explorer, thus making the language to a large extent, universal. This means that JavaScript code can run on any platform that has a JavaScript interpreter. 
  • VBScript, a cut-down version of Visual Basic, used to enhance the features of web pages in Internet Explorer.  Differences between Client-side and Server-side Scripting

Client-side Environment


  • The client-side environment used to run scripts is usually a browser.
  •  The processing takes place on the end users computer. 
  • The source code is transferred from the web server to the users computer over the internet and run directly in the browser. 
  •  The scripting language needs to be enabled on the client computer. Sometimes if a user is conscious of security risks they may switch the scripting facility off. 
  • When this is the case a message usually pops up to alert the user when script is attempting to run.

Server-side Environment


  • The server-side environment that runs a scripting language is a web server.
  •  A user's request is fulfilled by running a script directly on the web server to generate dynamic HTML pages. This HTML is then sent to the client browser.
  •  It is usually used to provide interactive web sites that interface to databases or other data stores on the server.
  •  This is different from client-side scripting where scripts are run by the viewing web browser, usually in JavaScript. 
  • The primary advantage to server-side scripting is the ability to highly customize the response based on the user's requirements, access rights, or queries into data stores.

No comments:

Post a Comment