Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (1 vote)
1K views

Scripting Languages

Scripting languages are generally interpreted rather than compiled for immediate execution which allows for rapid development and change. They have built-in support for high-level structures and libraries so that much of the initial work has already been done. Python uses a combination of compilation and interpretation through byte code for improved performance over purely interpreted systems. Scripting languages are often used to combine the functionality of other programs by acting as an intermediary to pass information between them. Many scripting languages support object-oriented structures to help manage larger programs.

Uploaded by

hariya
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views

Scripting Languages

Scripting languages are generally interpreted rather than compiled for immediate execution which allows for rapid development and change. They have built-in support for high-level structures and libraries so that much of the initial work has already been done. Python uses a combination of compilation and interpretation through byte code for improved performance over purely interpreted systems. Scripting languages are often used to combine the functionality of other programs by acting as an intermediary to pass information between them. Many scripting languages support object-oriented structures to help manage larger programs.

Uploaded by

hariya
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Scripting Languages

1
Scripting Languages
Scripting languages are generally interpreted
instead of compiled.
Immediate execution allows for rapid development
and change.
Easy to learn and have support for high-level
structures and libraries.
Much of the initial work for many applications has
been done and is available in libraries.
Structures such as lists and dictionaries usually builtin

2
Scripting Languages
Python uses combination of compilation
and interpretation:
The source code is converted to an intermediate
form called byte code in a step similar to
compilation.
The byte code is executed by an interpreter.
This improves performance over purely
interpreted systems.
3
Source Source Source

Interpreter Compiler
Compiler

Executable Execution Byte Code

Interpreter
Run

Execution Execution

Compiled Interpreter Byte Code


Execution Execution Execution
4
Scripting Languages
Scripting languages are often used to
combine the functionality of other
programs.
They act as glue.
This allows the script to act as the
intermediary between programs and pass
information between them.

5
Extending
External programs can be used to increase
the functionality of the scripting language
by binding existing programs to it
This is called extending.
This allows function calls to be made
directly to the compiled programs instead of
through command interface (stdin/stdout)

6
Dynamic Typing
Scripting languages often support dynamic
typing.
The system manages the types of variables
without the programmers explicit input on
matters of length and type declarations.
Some languages treat all variables as strings
and modify them when non-string
operations occur with the variable.
7
Dynamic Typing
This can lead to type mismatches when a
variable is assigned a type that is not
expected.
It can also cause problems if a variable
name is misspelled.
Results in two different variables existing when
only one was intended.

8
Memory Management
Automatic memory management controls
the allocation and freeing (garbage
collection) of memory on demand.
Objects can grow and shrink as needed and are
removed when no longer necessary.

9
Object-Oriented
Many scripting languages are starting to
adopt object-oriented structures.
Traditional scripting languages tend to
become difficult to manage when used to
write larger programs and the inclusion of
OO is an attempt to address the problem.
E.g. Python, incrTCL, Object Oriented Perl

10
OO and Python
Python supports most OO concepts:
Ability to create multiple name spaces (scope).
Each object contains its own name space.
Polymorphism
Methods change based on their class.
Operator Overloading
Operators given multiple meanings.
Multiple Inheritance
A class can be the product of multiple parents.
11
Dynamic Code Creation
Many scripting languages can dynamically
create and execute code during the
execution of the script.
This generally cannot be done by a non-
scripting language.
a = 10
x = print a
exec(x)
12
R Language
R is a language and environment for
statistical computing and graphics. R
provides a wide variety of statistical (linear
and nonlinear modelling, classical statistical
tests, time-series analysis, classification,
clustering, ) and graphical techniques,
and is highly extensible.

13
Perl
Perl is a stable, cross platform programming language.
Though Perl is not officially an acronym but few people used it as Practical
Extraction and Report Language.
Perl takes the best features from other languages, such as C, awk, sed, sh, and
BASIC, among others.
Perls database integration interface DBI supports third-party databases
including Oracle, Sybase, Postgres, MySQL and others.
Perl works with HTML, XML, and other mark-up languages.
Perl supports Unicode.
Perl is Y2K compliant.
Perl supports both procedural and object-oriented programming.
Perl interfaces with external C/C++ libraries through XS or SWIG.
Perl is extensible. There are over 20,000 third party modules available from
the Comprehensive Perl Archive Network

14
Python
Much like Ruby, Python is known in part for its
readability. A popular web development
framework, Django, also makes Python a popular
choice for building web applications. Dropbox
was built with and still uses Python to run
much of its server-side code. Python can be used
for everything Ruby can. Whether you use Python
or Ruby depends on your skill set, the
communities youre exposed to, and your
development team.

15
Ruby

Ruby is mostly used for developing web application, since


there is an famous web framework Ruby on Rails. You can
build a web blog just in a few minitues using Rails. Rails is
a software framework for creating web applications. Many
students new to programming arent sure what the difference
is between Ruby and Ruby on Rails. Ruby is a language.
Ruby on Rails is a framework that uses and depends on the
Ruby programming language. Think of a framework as a
collection of pre-written code to help programmers. In this
case, the Rails framework is a collection of pre-written code
to help programmers make websites and web applications.
16
Smalltalk
Smalltalk was one of the earliest object-oriented
(OO) languages (with others
like Simula and Eiffel) and can be said to be
extremely "pure" in an OO sense:
Everything is an object and objects are only
communicated with via the sending of messages
No primitives (no ints, booleans etc)
No control structures (no for, while, if etc).
Sounds impossible but it's true!
No statics

17
Glue language
Glue language refers to a programming language that is designed specifically
to write and manage program and code, which connects together different
software components.
Glue Language do not write the complete application in the language, but
rather, use the language to organize modules written in (possibly many
different) other languages, making them work together to form the application.
A glue language makes it easy to do that (convenient syntax, good support for
inter-process communication and data mugging, no compilation step etc).
Glue code, also called binding code, is custom-written programming that
connects incompatible software components.
Glue code can be written in the same language as the code it is connecting
together, but it is often written in a specialized interpreted scripting
language for connecting system components called a glue language.

18
Glue Language
Popular glue languages include
include AppleScript, JavaScript, Perl, PHP, Python, Ruby, VBScript and PowerShell
.
In addition to connecting disparate software modules, glue code can be used to tie
together multiple systems. If an organization runs cloud services on both Amazon
and Google, for example, glue code can be written to allow workloads and data
flow between the two companies' servers. Glue code is also useful for custom shell
commands, application wrappers and rapid application prototyping.
Glue code is sometimes looked upon as a necessary evil because it can easily
become the weakest link for service level agreements (SLAs) and, if not managed
properly, become excessively complicated spaghetti code that negatively affects
performance.

19
Frontend v/s Backend Development
The frontend of an application is distinctly human. Its what the user sees,
touches and experiences.
The technical skills required to be a frontend developer commonly
include:
HTML All code in a web application is eventually translated to
HTML. Its the language that web browsers understand and use to
display information to users.

CSS By itself, HTML is quite plain. HTML does provide some basic
style options, but to build a good frontend, developers must have
experience with CSS.

JavaScript If you could only learn one language in your lifetime,


youd be well-advised to choose JavaScript. Though its not
exclusively a frontend language, thats where its most commonly
used. JavaScript is a language that is run on a client machine.
20
Backend Development
The backend of an application is responsible for things
like calculations, business logic, database interactions, and
performance. Most of the code that is required to make an
application work will be done on the backend. Backend
code is run on the server, as opposed to the client. This
means that backend developers not only need to
understand programming languages and databases, but
they must have an understanding of server architecture as
well. If an application is slow, crashes often, or constantly
throws errors at users, its likely because of backend
problems.
Perl,Python,Sql,PHP all are example of backend
development language
21
Advantages of Scripting Languages

easy to learn and use


minimum programming knowledge or experience
required
allow complex tasks to be performed in relatively few
steps
allow simple creation and editing in a variety of text
editors
allow the addition of dynamic and interactive activities
to web pages
editing and running code is fast.

22
Disadvantages of Scripting Languages
The major disadvantage of scripting languages is that
executable code can inadvertently be downloaded from a
remote server to a web browser's machine, installed and
run using the local browser's interpreter. This is easily
done by visiting dubious web sites or downloading
programs without valid authenticity. The user is probably
unaware of anything devious occurring.
This is a weakness and major drawback in the formal rules
defining scripting languages like JavaScript and VBScript.

23

You might also like