0% found this document useful (0 votes)
20 views

BIT2105 SLPy Lecture 1 - Introduction to Scripting Languages 2

Uploaded by

graeblac
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

BIT2105 SLPy Lecture 1 - Introduction to Scripting Languages 2

Uploaded by

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

Scripting Languages .

An Introduction

Lecture 1 – Wednesday 11th October 2023


What is scripting?

• Script is a piece of code that’s used to automate


system oriented tasks. When you write code that
carries out a practical task without needing
compiling this can be called scripting.
• Scripts are usually written in high-level languages
such as Python, Perl or even PowerShell.
• Scripting as a term can be confusing because
it’s very broad. Scripting can also be done in
different environments such as servers, operating
systems, apps, games, websites, software and
even in other languages or command line.
What can scripting do?

Automation is the most common function.


What can scripting do?

Use as a glue language. (Glue language means


operating another language with a piece of
code in a more convenient language.) So,
basically when you write a piece of Python
code to execute tasks on an operating system
like Windows or on a server, you’d be using
Python as a glue language
What can scripting do?

GUI scripting. Not to be confused with GUI


programming or creating GUIs. GUI scripting is
when you use or manipulate a program through
its graphical user interface via scripting. When
you press buttons, send keys or mouse clicks,
tab presses etc. this can be considered GUI
scripting. There are also pixel level GUI scripting
practices which evaluate and understand the
GUI at pixel level and operates accordingly. I.e.:
clicking green buttons
Scripting Language
Scripting Language

• A scripting language is a programming


language that does not use a
compiler for executing the source code.
Rather, it uses an interpreter to translate the
source code into machine code on the fly
(while running).
What are the common scripting Languages

Most of the commonly used and high level


languages can be considered as scripting
languages. Most used ones are:
• Python
• Perl
• Java
• Javascript
• VBA
• Ruby
• Php
• Julia
• PowerShell and Command Prompt
Types of Scripting Languages

Server-side Scripting Language


– Can use huge resources of the server
– Complete all processing in the server and
send plain pages to the client
– Reduces client-side computation overhead
Types of Scripting Languages

• Client-side Scripting Language


– Does not involve server processing
– Complete application is downloaded to the
client browser
– Client browser executes it locally
– Are normally used to add functionality to web
pages e.g. different menu styles, graphic
displays or dynamic advertisements
Types of Scripting Languages
Scripting Language Examples

Active Server Pages (ASP)


– Server side scripting language
– Developed by Microsoft
– Good at connecting to Microsoft
databases
– Runs only on Microsoft servers
Scripting Language Examples

Perl
– Old UNIX language
– Found on all Windows and Linux servers
– Can handle text manipulation tasks
– Excellent web scripting language
Scripting Language Examples

PHP (Hypertext Pre-Processor)


– Especially good at connecting to MySQL
– Very popular language
– Runs on UNIX and Windows
– HTML-embedded scripting language
– Syntax looks like C, JAVA, and PERL
– Generate Dynamic content and good User
Interface
– Server side execution
Scripting Language Examples

• JSP (Java Server Pages)


– Developed by Sun
– Uses Java
– Provide server-specific framework like
Microsoft’s ASP
Scripting Language Examples

CGI (Common Gateway Interface)


– Server-side solution
– Needs to launch separate instance of
application for each
web request
– Allows direct interaction with users
Scripting Language Examples

ASP.NET
– Server-side technology to create faster,
reliable and dynamic web pages
– Supports .NET framework languages (C#,
VB.NET,JScript.NET)
– Provides flexibility to designers and
developers to work separately
Scripting Language Examples

VBScript
– Microsoft’s scripting language
– Client side Scripting language
– Very easy to learn
– Includes the functionality of Visual Basic
Scripting Language Examples

• JavaScript
– Client-side Scripting language
– Easy to use programming language
– Enhance dynamics and interactive features
of a web page
– Allows to perform calculation, write
interactive games, add special effects,
customize graphic selections, create security
passwords
Python Scripting

• Scripting is a very common practice among


Python programmers. It’s used for automation
of daily tasks, reporting, server management,
security, social media management, business
growth and development, financial trading,
automating software and many other
intelligent solutions.
Is python good for scripting?

Python is not just good for scripting it’s perfect


for scripting.
• Easy entry:
• Rich libraries:
• Community support:
• Language interoperability:
Comparison with programming languages

Scripting languages Programming languages

Interpreter Compiler

Most imperative programming Mostly Object oriented programming


paradigm paradigm

Slow runtime>code interpretation Very fast runtime


during runtime

Automatic memory management Memory management(pointer


technique(C, C++))

Typless Strict type handling


Comparison with programming languages
Compiled and Interpreted Languages
Compiled and Interpreted Languages
Language examples

You might also like