Infot 1 - Chapter 3
Infot 1 - Chapter 3
Infot 1 - Chapter 3
Chapter Objectives:
Often people use the terms scripting language and programming language synonymously, but these two
terms have more difference than you know of. Although all scripting languages are programming
languages, all programming languages are not scripting languages.
Earlier, programming languages were written to build products such as PowerPoint, Internet Explorer,
Microsoft Excel, and Microsoft Word, to name a few. However, as time passed, there arose a need to
upgrade the programming languages to incorporate additional functionalities and provide an enhanced
programming interface. Thus, scripting languages came into being. The primary difference between a
scripting language and a programming language is in their execution – programming languages use a
compiler to convert the high-level programming languages into machine language, on the other hand,
scripting languages use an interpreter. While a compiler compiles a code in a complete chunk, an
interpreter compiles a code line by line.
Definition
A programming language is essentially a formal language that combines a set of instructions that can be
fed into the computer to generate a specific output. A scripting language is a programming language that
supports scripts which are programs written exclusively for a special runtime environment to automate the
execution of a specific action/function.
Programming languages are compiled to machine code and run on the hardware of the underlying
Operating system. One must use a certain IDE (Integrated Development Environment) to make use
of programming languages. The programmer provides a set of instructions for a computer to
achieve a certain goal. Certain algorithms can also be implemented by writing programs.
There are many programming languages in the market which are dominated by specific
documentation, while other languages have a dominant implementation which is treated as a
reference. Example- C programming language has an ISO standard associated with it whereas
languages like Perl falls in the latter category.
A programming language is basically utilized to transform the data. This actually happens by
creating CPU instructions that write the input data into the output. Example – Solving a set of
equations from a set of conditions. Programming languages like Java, Scala, C, C++, etc. are
considered a general-purpose language. These are the compiled programming languages. One
needs to write down the source code by adding some texts and then run them through a compiler
that would create binary instructions.
Interpretation
Programming languages are compiled into a more compact design that does not require to be
interpreted by another language or application. Scripting languages are written in one language and
interpreted within another program, for instance, JavaScript has to be incorporated within HTML which
BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 1|Page
A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 3: COMPILED VS INTERPRETED LANGUAGES, APPLICATION VS
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS SCRIPTING LANGUAGES
will then be interpreted by the Internet browser. Thus, programming languages run independently of a
parent program, but scripting languages run inside another program.
Design
Programming languages are designed to facilitate a full-fledged code and software development
whereas scripting languages are specifically designed to make coding faster and much simpler.
Development
Coding with programming languages is relatively difficult as many lines of code are required for a single
function. Creating a code function with a scripting language is easier as it requires only a few short and
specific lines to be written. Thus, writing a full-fledged code with programming languages usually take a
longer time to develop as more lines need to be written while coding with a scripting language requires
less time as smaller chunks need to be written.
Categories
Programming languages are divided into five subcategories: First generation, Second generation, Third
generation, Fourth generation, and Fifth generation. Scripting languages have only two subcategories:
Server-side scripting languages and client-side scripting languages.
Since programming languages use a compiler, it is a one-shot conversion. Scripting languages, on the
other hand, demand line by line conversion. Programming languages are self-executable; they do not
require a host. Scripting languages require a host.
Speed
Compiled programs run generally run faster than interpreted programs since compilers read and
analyze the code at once and report errors (if any) collectively. An interpreter, however, reads and
analyzes a code line by line and every time it detects an error, it stops to address them one by one.
Languages
C, C++, C#, Java, Basic, COBOL, and Pascal, are some examples of programming languages. JavaScript,
Perl, PHP, Python, Ruby, Rexx, Ruby, GameMonkey, etc., are some of the most widely used such
languages.
Scripting Languages
All scripting languages are programming languages. The scripting language is basically a language
where instructions are written for a run time environment. They do not require the compilation step and
are rather interpreted. It brings new functions to applications and glue complex system together. A
scripting language is a programming language designed for integrating and communicating with other
programming languages.
Software applications, web pages within a web browser, usage of a shell of an operating system
can be automated through Scripting languages. Scripting languages like Javascript, Perl,
VBScript, etc. does not require to be compiled and has less access to the computers native
abilities since they run on a subset of original programming language. An example could be that
Javascript would not be able to access your file system.
Scripting languages are generally interpreted. A primary focus of a scripting language does not
build the application but might provide behavior to an existing application. It is used to write a
code that will target a software system. It can automate an operation on a software system.
Scripts are written are basically a set of instructions to target a software system.
Scripting languages have evolved to become powerful. Now they are not limited to create small
scripts to automate operations on a software system. One can also build a rich application with
scripting languages. It can manipulate, customize and automate the facilities of an existing
system. Useful functionality is already available via an interface, scripting languages provide a
mechanism for exposing functionality to program control.
There are many scripting languages some of them are discussed below:
bash: It is a scripting language to work in the Linux interface. It is a lot easier to use bash to create scripts
than other programming languages. It describes the tools to use and code in the command line and create
useful reusable scripts and conserve documentation for other people to work with.
Node js: It is a framework to write network applications using JavaScript. Corporate users of Node.js include
IBM, LinkedIn, Microsoft, Netflix, PayPal, Yahoo for real-time web applications.
Ruby: There are a lot of reasons to learn Ruby programming language. Ruby’s flexibility has allowed
developers to create innovative software. It is a scripting language which is great for web development.
Python: It is easy, free and open source. It supports procedure-oriented programming and object-oriented
programming. Python is an interpreted language with dynamic semantics and huge lines of code are
scripted and is currently the most hyped language among developers.
Perl: A scripting language with innovative features to make it different and popular. Found on all windows
and Linux servers. It helps in text manipulation tasks. High traffic websites that use Perl extensively include
priceline.com, IMDB.
Easy learning: The user can learn to code in scripting languages quickly, not much knowledge of web
technology is required.
Fast editing: It is highly efficient with the limited number of data structures and variables to use.
Interactivity: It helps in adding visualization interfaces and combinations in web pages. Modern web pages
demand the use of scripting languages. To create enhanced web pages, fascinated visual description which
includes background and foreground colors and so on.
Functionality: There are different libraries which are part of different scripting languages. They help in
creating new applications in web browsers and are different from normal programming languages.
Scripting languages are used in web applications. It is used in server side as well as client side.
Server side scripting languages are: JavaScript, PHP, Perl etc. and client side scripting languages are:
JavaScript, AJAX, jQuery etc.
Scripting languages are used in system administration. For example: Shell, Perl, Python scripts etc.
It is used in Games application and Multimedia.
It is used to create plugins and extensions for existing applications.
Table 7: The table describes the comparison Between Programming language and Scripting language
Examples C, C++, C#, Java, VC++, VB, Basic, JavaScript, VB Script, Shell, Perl,
COBOL, Pascal, etc. Python, Ruby, Rexx, PHP,
GameMonkey, Lua, etc.
Origin of Scripting
The use of the word ‘script’ in a computing context dates back to the early 1970s,when the originators of
the UNIX operating system create the term ‘shell script’ for sequence of commands that were to be read
from a file and follow in sequence as if they had been typed in at the keyword. e.g. an ‘AWKscript’, a ‘perl
script’ etc.. the name ‘script ‘ being used for a text file that was intended to be executed directly rather than
being compiled to a different form of file prior to execution.
Other early occurrences of the term ‘script’ can be found. For example, in a DOS-based system, use of a
dial-up connection to a remote system required a communication package that used proprietary language
to write scripts to automate the sequence of operations required to establish a connection to a remote
system.
However, scripts only become interesting when they have the added value that comes from using
programming concepts such as loops and branches
1. A new style of programming which allows applications to be developed much faster than traditional
methods allow, and makes it possible for applications to evolve rapidly to meet changing user
requirements. This style of programming frequently uses a scripting language to interconnect ‘off
the shelf ‘components that are themselves written in conventional language. Applications built in
this way are called ‘glue applications’, and the language is called a ‘glue language’.
2. A glue language is a programming language (usually an interpreted scripting language) that is
designed or suited for writing glue code – code to connect software components. They are
especially useful for writing and maintaining:
Custom commands for a command shell.
Smaller programs than those that are better implemented in a compiled language
"Wrapper" programs for executables, like a batch file that moves or manipulates files and does other
things with the operating system before or after running an application like a word processor,
spreadsheet, data base, assembler, compiler, etc.
Scripts that may change
Rapid prototypes of a solution eventually implemented in another, usually compiled, language.
3. Using a scripting language to ‘manipulate, customize and automate the facilities of an existing
system’, as the CMAScript definition puts it. Here the script is used to control an application that
provides a programmable interface: this may be an API, though more commonly the application is
constructed from a collection of objects whose properties and methods are exposed to the scripting
language. Example: use of Visual Basic for applications to control the applications in the Microsoft
Office Suite.
4. Using a scripting language with its rich functionality and ease of use as an alternate to a
conventional language for general programming tasks, particularly system programming and
BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 5|Page
A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 3: COMPILED VS INTERPRETED LANGUAGES, APPLICATION VS
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS SCRIPTING LANGUAGES
administration. Examples: are UNIX system administrators have for a long time used scripting
languages for system maintenance tasks, and administrators of WINDOWS NT systems are adopting
a scripting language, PERL for their work.
These are some properties of scripting languages which differentiate SL from programming languages.
Integrated compile and run: SL’s are usually characterized as interpreted languages, but this is just
an over simplification. They operate on an immediate execution, without need to issue separate
command to compile the program and then to run the resulting object file, and without the need to
link extensive libraries into the object code. This is done automatically. A few SL’S are indeed
implemented as strict interpreters.
Low overheads and ease of use:
1. variables can be declared by use
2. the number of different data types is usually limited
3. everything is string by context it will be converted as number (vice versa)
4. number of data structures is limited(arrays)
Enhanced functionality: SL’s usually have enhanced functionality in some areas. For example, most
languages provide string manipulation based on the use of regular expressions, while other
languages provide easy access to low-level operating system facilities, or to the API, or object
exported by an application.
Efficiency is not an issue: ease of use is achieved at the expense of efficiency, because efficiency is
not an issue in the applications for which SL’S are designed.
A scripting language is usually interpreted from source code or bytecode. By contrast, the software
environment the scripts are written for is typically written in a compiled language and distributed in
machine code form.
Scripting languages may be designed for use by end users of a program – enduser development –
or may be only for internal use by developers, so they can write portions of the program in the
scripting language.
Scripting languages typically use abstraction, a form of information hiding, to spare users the details
of internal variable types, data storage, and memory management.
Scripts are often created or modified by the person executing them, but they are also often
distributed, such as when large portions of games are written in a scripting language.
The characteristics of ease of use, particularly the lack of an explicit compile-linkload sequence, are
sometimes taken as the sole definition of a scripting language.
1. Modern applications
2. Traditional users
1. Visual scripting: A collection of visual objects is used to construct a graphical interface. This process
of constructing a graphical interface is known as visual scripting. The properties of visual objects
include text on button, background and foreground colors. These properties of objects can be
changed by writing program in a suitable language.
The outstanding visual scripting system is visual basic. It is used to develop new applications. Visual
scripting is also used to create enhanced web pages.
1. Scripting components: In scripting languages we use the idea to control the scriptable objects
belonging to scripting architecture. Microsoft's visual basic and excel are the first applications that
used the concept of scriptable objects. To support all the applications of Microsoft the concept of
scriptable objects was developed.
2. Web scripting: web scripting is classified into three forms. They are processing forms, dynamic web
pages, dynamically generating HTML.
1. system administration,
2. experimental programming,
3. controlling applications.
1. Command scripting languages are the oldest class of scripting languages. They appeared in 1960,
when a need for programs and tasks control raised. The most known language from the first
generation of such languages is JCL (Job Control Language), created for IBM OS/360 operating
system. Modern examples of such languages include shell language, described above, and also text-
processing languages, such as sed and awk. These languages were one of the first to directly include
support for regular expression matching - a feature that later was included into more general-
purpose languages, such as Perl.
2. Application scripting languages: Application scripting languages were developed in 1980s, in the
era of personal computers, when such important applications as spreadsheets and database clients
were introduced, and interactive session in front of the PC became the norm. One of the prime
examples of these languages is Microsoft-created Visual Basic language, and especially it’s subset
named Visual Basic for Applications, designed explicitly for office applications programming.
3. Markup language are a special case in the sense that they are not a real programming languages,
but rather a set of special command words called ’tags’ used to markup parts of text documents,
that are later used by special programs called processors, to do all kinds of transformations to the
text, such as displaying it in a browser, or converting it to some other data format. The basic idea of
markup languages is the separation of contents and structure, and also including formatting
commands and interactive objects into the documents. The first markup language named GML
(Generic Markup Language) was created in 1969 by IBM. In 1986, ISO created a standard called
SGML, based on GML ideas.
4. Universal scripting languages: The languages that belong to this class are perhaps the most well-
known. The very term” scripting languages” is associated with them. Most of these languages were
originally created for the Unix environment. The goals however were different. The Perl
programming language was made for report generation, which is even reflected in its name
(Practical Extraction and Report Language). It is commonly said that the primary reason for it’s
enormous popularity is the ability to write simple and efficient CGI scripts for forming dynamic web
pages with this language. Perl was there in the right place at the right time. The Python language
was originally made as a tool for accessing system services of the experimental operating system
Amoeba. Later it became a universal object-oriented scripting language. Implementations exist for
the Java Virtual Machine and also for Microsoft Intermediate Language used on Microsoft .NET
platform.
Web Scripting
Web Scripting:
Web is the most fertile areas for the application of scripting languages. Web scripting divides into three
areas:
processing forms
creating pages with enhanced visual effects and user interaction and
generating pages ’on the fly’ from material held in database.
In the original implementation of the web, when the form is submitted for processing, the information
entered by the user is encoded and sent to the server for processing by a CGI script that generates an
HTML page to be sent back to the Web browser.
This processing requires string manipulation to construct the HTML page that constitutes the replay, and
may also require system access, to run other processes and to establish network connections. Perl is also a
language that uses CGI scripting.
Alternatively, for processing the form with script running on the server it possible to do some client –side
processing within the browser to validate form data before sending it to the server by using JavaScript,
VBScript etc.
‘Dynamic HTML’ makes every component of a Web page (headings, anchors, tables etc.) a scriptable object.
This makes it possible to provide simple interaction with the user using scripts written in JavaScript/Jscript
or VBScript, which are interpreted by the browser.
Microsoft’s ActiveX technology allows the creation of pages with more elaborate user interaction by using
embedded visual objects called ActiveX controls. These controls are scriptable objects, and can in fact be
scripted in a variety of languages. This can be scripted by using Perl scripting engine.
Another form of dynamic Web page is one in which some or all of the HTML is generated by scripts
executed on the server. A common application of the technique is to construct pages whose content is
retrieved from a database. For example, Microsoft’s IIS web server implements Active Server Pages (ASP),
which incorporate scripts in Jscript or VBScript.
Scripting can be traditional or modern scripting, and Web scripting forms an important part of modern
scripting. Scripting universe contains multiple overlapping worlds:
the original UNIX world of traditional scripting using Perl and Tcl
the Microsoft world of Visual Basic and Active controls
the world of VBA for scripting compound documents
the world of client-side and server-side Web scripting.
The overlap is complex, for example web scripting can be done in VBScript, JavaScript/Jscript, Perl or Tcl.
This universe has been enlarged as Perl and Tcl are used to implement complex applications for large
organizations e.g Tcl has been used to develop a major banking system, and Perl has been used to
implement an enterprise-wide document management system for a leading aerospace company.
Variables are used to store and retrieve data from a computer’s RAM (Random Access Memory). Variables
must have a unique name and must not be the same name as others in different case letters, for example
the variable ‘x’ and ‘X’ would be different as JavaScript is case sensitive. There are three different types of
operators known as arithmetic operators, logical operators and relational operators.
Arithmetic Operators
Arithmetic operators are essential to be able to create arithmetic expressions such as calculating simple
sums using numbers.
Logical Operators
Logical operators are used to define logic between two or more variables and values. The following logical
operators are used to define logic.
&& - AND
II – OR
! – Not
Relational Operators
These types of operators are used to compare values to one another. The comparisons result in two
expressions which are true or false.
When setting values with JavaScript, it is possible to assign the variable a value. For example, it is possible
to set a variable known as age a value, such as a number.
Dot operator
The dot operator is used to as a separation technique which separates objects from their properties or
methods. The example below shows a simple calculation with JavaScript using variables, arithmetic
operators, a dot operator and assignment.
Dot operator The dot operator is used to as a separation technique which separates objects from their
properties or methods. The example below shows a simple calculation with JavaScript using variables,
arithmetic operators, a dot operator and assignment.
Loops
Loops allow actions happen repeatedly and do not end until an action has been successfully performed, this
when they are told to stop by JavaScript code by using a conditional statement. An example of this is with
the use of relational operators and variables as shown below.
The example above shows a ‘do…while’ loop and a conditional statement has been made so that a counter
is repeated while the counter number is less than or equal to 10. This means that until the counter has
reached the number 10, it will not stop displaying numbers and will increase by 1 from the number 1. This
was defined in the beginning with the line of code ‘counter = 1’. In the JavaScript code, when the counter
reaches 11, it will not display this on the browser as the conditional statement will no longer be true.
Decision Making
‘IF’ statements, or decision making code follow a particular set of rules when being executed. These
statements are only executed if an ‘IF’ statement is true or false. An example of an IF statement is shown
below.
As you can see, the statement shows that if the variable ‘x’ which is equal to 24 is less than the variable ‘y’
which is equal to 56, then the text "This 'if' statement works!" will be displayed on the web browser. In this
case, the ‘IF’ statement is true as 24 is less than 56, meaning the text will successfully display on the
browser. An ‘IF else’ statement is optional, if for example there must be an action for the ‘false’ part of a
statement, then one would create an ‘IF else’ statement and declare another action to be executed.
Functions
Functions are pieces of code that can be written separately or within the ‘<scripts>’ tags and can be called
or executed whenever programed to. Functions are never executed unless they are called. Below is an
example of function being declared within the ‘<scripts>’ tags and being called.
The name of the function is ‘characters’ and there are two simple values passed into the function parameter,
meaning the function will use these values while it is running. The function is called after the braces, by
declaring ‘characters’ each time. As you can see, “Thor” and “Loki” replace the values “one” and “two”
automatically and are implemented into the ‘.write’ method to form the sentence; “Thor is better than Loki”.
The same method applies to the next two times the function is called.
Functions can also be used to handle events, for example, a function can be used to create an alert box
which alerts the user that something has happened when clicking a button. An example of this is shown
below.
The code above shows how a function has been made and called that creates an alert box with the ‘onclick’
event handler within a form. After the user clicks the ‘Submit’ button, an alert box will appear as the
function will execute by this event.
As of today, scripting languages are widely used and in demand due to its capability to produce dynamic
content specially in web-based applications. A scripting language allows users to develop dynamic and
interactive web pages with minimum effort and less programming expertise.
In Identity and Access Management domain, in order to move in tally with the rapidly growing business
needs, enterprises needs to get use modern solutions that can serve these needs in an effective manner.
This is applicable for user authentication process as well.
A traditional authentication scheme consists of a series of static events. A user has to go through some per-
defined steps in order to authenticate himself to the server. However in order to serve the rapidly emerging
business needs, the system must respond to the contextual facts and circumstances in order to determine
which authentication scheme the user must go through. More specifically, the system should decide the
level of security required for the corresponding user authentication procedure. This is where a conditional
authentication scheme plays the key role in satisfying our requirement.
For example, let’s say the user decides to log in from a new device, or from a different location. In this
situation, a modern system should be able to identify that this is an abnormal behavior and be adaptive to
enforce higher levels of security such as requesting an additional authentication step beyond user
credentials.
With an adaptive authentication scheme as such, it gives an organization more control over the users. It
gives the ability to decide the login process dynamically, assessing the user based on different risk factors
such as devices, location, biometrics etc. For customer-centric organizations such as banks and retailers this
facilitates to handle their customer-base in a more flexible and robust manner with an improved
administrative control. Further, this will increase the security over user login. Administrators will have the
capability to modify login and authorization flows depending on source devices, include dynamic data
during such login processes which is increasingly becomes essential. Moreover, it will enhance the overall
user experience of the system.
Now let’s see, how a scripting language can be incorporated to satisfy our requirement of a conditional
authentication scheme.
The main difference of a scripting language when compared to other conventional programming language
is that it is interpreted at runtime instead of being compiled to machine code.
As of today, scripting languages are widely used and in demand due to its capability to produce dynamic
content specially in web-based applications. A scripting language allows users to develop dynamic and
interactive web pages with minimum effort and less programming expertise.
Why Scripting?
Most of the companies think of scripting and automation as of cryptic hieroglyphics, which only the
software developer gurus can handle. This is just a self-protecting lie to be not forced to learn something
new. Scripting (totally equally, which language you are using) is built up logically, which every IT-
Administrator or IT- adept person can learn and master.
A number of scripting “languages” are available for you to choose from, each with its own capabilities and
limitations. These languages include Windows native shell scripting, Visual Basic Scripting Edition,
JavaScript, Kixtart, and Perl. Which one you choose will ultimately depend on a combination of the tasks
required and your own experience and inclinations.
Each scripting language has a collection of commands or keywords and a set of rules on how to use them.
The set of rules for writing a script in any given language is called the syntax. Once you learn the keywords
and syntax, you can use a text editor to write the script and then save it with a file extension that is
appropriate to the scripting language you are using. Some of the more common file extensions you will see
are .bat, .cmd, .vbs, .js, and .kix
Scripting lets you automate various network administration tasks, such as those that are performed every
day or even several times a day. For example, login scripts run every time a user logs in to the network and
can perform tasks like mapping network drives for the user based on certain conditions, such as group
membership. Another example of script use might be a situation where you want to have each Windows NT
server create a new Emergency Restore Disk and then copy the contents of that disk to a network location.
Other tasks might need to be carried out only once, such as a modification to the registry, but to a large
number of servers that are widely distributed geographically. In a case like that, you could create and
distribute a single script to run the task on each server.
You can start scripts manually, but you can also start them automatically, either by a specific event or
scheduled via the Windows Task Scheduler. Windows NT allows scripts to be run automatically each time a
user logs in to the network. Windows 2000 goes much further and can be configured to automatically run
separate scripts upon:
Machine startup
Machine shutdown
User login
User logout
You could, for instance, map specific network drives when a user logs in and then automatically copy that
user’s Favorites folder to a network share when he or she logs out so that the data is preserved in a central
location.
The truth is, there are pros and cons to evaluate when it comes to relying on scripts, just as there are for
most considerations in IT life. Scripting can definitely have some perks depending on its application.
However, it’s important to weigh these against the benefits of a full managed file transfer (MFT) solution to
make sure you’re making the best decision for your business over the long term.
Scripting Pros:
Scripting Cons
important in today’s Big Data era when information sharing among people and systems is critical.
Likewise, when you need a script to log into an API to grab data and then pair it with other details,
you’ll need the right person to know how to accomplish this.
5. Scripts lack job management capabilities.
Assigning job priority and job queues are not tasks that scripts typically do. This is a case where MFT
provides the necessary automated oversight for peace of mind. It also reduces the level of user
interaction required to know that a job has completed as expected.
6. Scripts lack alerts and reporting.
Most scripts do not have built-in alerts, so you often are not notified when a file does not reach a
trading partner on time. Scripts also generally do not have good auditing, so it is difficult to tell
what files are leaving and coming into your organization, along with timestamps and other log
details. In addition, without good auditing and reporting, it will be much more challenging to prove
compliance with regulations if audited.