0% found this document useful (0 votes)
32 views11 pages

Module 4 Lesson 1

The document provides an overview of scripting languages, their types (server-side and client-side), and examples such as JavaScript, Python, and PHP. It discusses the use cases of scripting in web development, including automation, security best practices, and the role of full-stack developers. Additionally, it highlights the benefits of scripting in simplifying complex tasks and enhancing software functionality.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views11 pages

Module 4 Lesson 1

The document provides an overview of scripting languages, their types (server-side and client-side), and examples such as JavaScript, Python, and PHP. It discusses the use cases of scripting in web development, including automation, security best practices, and the role of full-stack developers. Additionally, it highlights the benefits of scripting in simplifying complex tasks and enhancing software functionality.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

IT 2217

INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 1

Precious Joan D. Samson, MIT [email protected]


GENERAL SCRIPTING BASICS

A scripting language is a programming language that executes tasks within a special run-time
environment by an interpreter instead of a compiler. They are usually short, fast, and interpreted
from source code or bytecode.

Such environments include software applications, web pages, and even embedded systems in
operating system shells and games.

Most modern structures support these languages, which gives them wide support while also being
developed through an open-source process.

Using a scripting language is preferable depending on your goals and environment. As they are
a series of commands executed with no need for a compiler, they are cross-platform and do not
require special software to be installed in order to run — except for a web browser, of course.

There are pros and cons to using this type of programming language, as well as the right scenario
for each option in this field. It is important to learn their differences and applications before
starting any project in which you might use them.

Types of Scripting Languages

There are two main types of scripting languages: server-side and client-side.

They differ on where the code is run from, which affects not only the actual languages chosen
but also the performance and their capabilities.

• Server-side scripting language

The term server-side scripting language refers to those that run off a web server. Since it performs
from the back-end side, the script is not visible to the visitor. Because of that, it is a more secure
approach.
They are often used to create dynamic websites and platforms, handle user queries, and generate
and provide data and others. A famous example of server-side scripting is the use of PHP in
WordPress.

Examples: PHP, Python, Node.js, Perl, and Ruby.

• Client-side scripting language

Unlike the above, client-side scripting languages run off the user’s browser.

It is usually performed at the front end, which makes it visible to visitors and makes it less
vulnerable to exploits and leaks. As such, it is often used to build user interfaces and lighter
functionality such as that.
Since it runs locally, they usually provide better performance and, therefore, do not strain your
server.

Examples: HTML, CSS, jQuery, and JavaScript.

Scripting Languages Examples

1. JavaScript

Also sometimes abbreviated as simply “JS”, JavaScript is probably the best-known


scripting language, as it’s a pillar of the web as we know it (right along with HTML and
CSS).

In fact, about 98 percent of websites currently on the web use JavaScript.

JavaScript is considered a subdialect of the ECMAScript language, so it utilizes the same


syntax. It also supports key features like first-class functions, dynamic typing, prototype-
based object orientation, and more.

2. Python

After JavaScript, Python is easily the most popular, best-known scripting language in use
today.

Programmers love it for its sheer ease of use and concise syntax systems, as they can
create code significantly more quickly and with less actual typing involved.

Python is also free and open-source, making it a highly accessible scripting language.
Features supported by Python include functional programming paradigms, object-oriented
programming, and more.

3. PHP
PHP is an open-source scripting language commonly used by backend web developers.

The name began as an acronym for “personal home page” — a callback to PHP’s origins
as a way to make static HTML pages more functional and dynamic.

However, modern PHP is very much its own standalone scripting language.

PHP features object-oriented programming options and can be easily embedded into
HTML documents of all types. Input is also fairly loose and easy, meaning programmers
don’t need to declare variable data types.

4. Ruby

Ruby’s claim to fame is its flexibility, making it a favorite among web developers of all
types.

Among other things, it takes so much of the guesswork out of creating truly innovative
software. It’s also incredibly easy to learn, thanks to its clean syntax, making Ruby an
especially popular pick for beginning coders.

Ruby is a strictly object-oriented scripting language, so everything becomes an object


when working with it. This is even the case for factors like integers or Booleans which are
usually more primitive.

5. Perl

Perl is a general scripting language that’s been around a very long time — since December
of 1987, to be exact.

It started out as a UNIX language primarily used to process reports. (Its name even
originates from the phrase “practical extraction and reporting language”.)

Perl really began to gain traction throughout the 1990s when coders used it heavily for
CGI (common gateway interface), a specification most often seen today on legacy
websites.

However, it remains fairly popular because of its innovation and suitability for text
manipulation tasks.

USE CASE

Web Development Scripts


Web development scripts are code that automate processes in web development. They
are written in scripting languages, which are programming languages that are used to
automate tasks.

Examples of web development scripts:

• JavaScript: A scripting language that allows developers to create interactive


features on web pages, such as animated graphics, scrolling video jukeboxes, and
interactive maps.
• PHP: A server scripting language that creates scripts on web servers to customize
responses for each user request. PHP is often used by backend web developers.
• HTML: A markup language that structures and gives meaning to web content.
• CSS: A language of style rules that applies styling to HTML content.
Other web development languages Python, Java, Ruby, and Swift.

Client-Side Scripting

Client-side scripting simply means running scripts, such as JavaScript, on the client device, usually
within a browser. All kinds of scripts can run on the client side if they are written in JavaScript,
because JavaScript is universally supported.

In web development, 'client side' refers to everything in a web application that is displayed
or takes place on the client (end user device). This includes what the user sees, such as
text, images, and the rest of the UI, along with any actions that an application performs
within the user's browser.

Markup languages like HTML and CSS are interpreted by the browser on the client side.
In addition, many contemporary developers are including client-side processes in their
application architecture and moving away from doing everything on the server side;
business logic for dynamic webpages*, for instance, usually runs client side in a modern
web application. Client-side processes are almost always written in JavaScript.

In the netflix.com example above, the HTML, CSS, and JavaScript that dictate how the
Netflix main page appears to the user are interpreted by the browser on the client side.
The page can also respond to 'events': For instance, if the user's mouse hovers over one
of the movie thumbnail images, the image expands and adjacent thumbnails move slightly
to one side to make room for the larger image. This is an example of a client-side process;
the code within the webpage itself responds to the user's mouse and initiates this action
without communicating with the server.
The client side is also known as the frontend, although these two terms do not mean
precisely the same thing. Client-side refers solely to the location where processes run,
while frontend refers to the kinds of processes that run client-side.

A dynamic webpage is a webpage that does not display the same content for all users
and changes based on user input. The Facebook homepage is a dynamic page; the
Facebook login page is for the most part static.

Server-Side Scripting

Server-side scripting refers to the process of running scripts on a web server that generates
dynamic content. These scripts communicate with databases and other resources to produce
hypertext markup language (HTML), cascading style sheets (CSS), and JavaScript code that can
be rendered in a user's web browser.

How does server-side scripting differ from client-side scripting?


While server-side scripting generates content on the server before sending it to the
client's web browser, client-side scripting runs directly in the browser, allowing for
dynamic changes to be made without requiring a server request.
What are some advantages of using server-side scripting?
Server-side scripting allows for the creation of dynamic web pages that can be customized
based on user input or other data. It also allows for the use of secure authentication and
access to databases, among other things.
What is a commonly used server-side scripting language for web development?
Hypertext preprocessor (PHP) is a widely used server-side scripting language that is
commonly used for web development. It is known for its ease of use, flexibility, and
support for many different databases.
Can server-side scripting be used for real-time applications?
Yes, real-time applications can be built using server-side scripting. This is commonly
achieved using technologies such as Node.js and WebSockets.
What are some security considerations when using server-side scripting?
Server-side scripts should be written with security in mind, as they can give attackers
access to sensitive data. Best practices include input validation, using prepared
statements for database queries, and ensuring that file permissions are set appropriately.
What are some popular frameworks for server-side scripting?
Some popular server-side scripting frameworks include Laravel for hypertext preprocessor
(PHP), Django for Python, Ruby on Rails for Ruby, and Express.js for Node.js.

Full-Stack Scripting
Full-stack Web Developer

A full-stack web developer is a person who can develop both client and server software.
In addition to mastering HTML and CSS, he/she also knows how to:
• Program a browser (e.g. using JavaScript, jQuery, Angular, or Vue)
• Program a server (e.g. using PHP, ASP, Python, or Node)
• Program a database (e.g. using SQL, SQLite, or MongoDB)
Popular Stacks

• LAMP stack: JavaScript - Linux - Apache - MySQL - PHP


• LEMP stack: JavaScript - Linux - Nginx - MySQL - PHP
• MEAN stack: JavaScript - MongoDB - Express - AngularJS - Node.js
• Django stack: JavaScript - Python - Django - MySQL
• Ruby on Rails: JavaScript - Ruby - SQLite - Rails

Automation in Web Development


Build Tools
• Automating tasks with Gulp, Grunt.

Testing
• Unit testing with Jest or Mocha.
• End-to-end testing with Selenium, Puppeteer, or Cypress.
Deployment Scripts
• Setting up CI/CD pipelines.
• Writing scripts for deploying to AWS, Heroku, or other cloud platforms.

Security in Web Scripting


• Best Practices
o Sanitizing inputs to prevent SQL injection and XSS.
o Using HTTPS and Content Security Policies (CSPs).
• Secure Authentication
o Implementing hashed passwords.
o Secure session management.

Summary

Scripting techniques refer to methods and practices used to write scripts—short programs
designed to automate tasks, manipulate data, or control software behavior. Scripts are
widely used in system administration, web development, data processing, and software
development to simplify and streamline repetitive or complex tasks.

Scripting techniques in integrative programming and technology involve using short, simple sets
of instructions to automate processes. Scripting languages are programming languages used to
write these scripts.
Scripting is the process of writing a script, which is a short set of instructions that automate a
manual process .

Scripting languages are used to automate or enhance programs, connect components, and work
with databases.

Scripting helps developers and engineers solve problems by breaking them into smaller, more
manageable steps.

Benefits of scripting:

• Scripting can help developers and engineers


• Automate processes
• Enhance existing programs
• Connect components and processes
• Work with databases and software written in different languages
• Develop problem-solving and analytical skills
References

https://rockcontent.com/blog/scripting-
languages/#:~:text=Scripting%20is%20a%20way%20of,to%20do%20it%2C%20as%20well.

https://www.cloudflare.com/learning/serverless/glossary/client-side-vs-server-side/

https://www.lenovo.com/ph/en/glossary/server-side-
scripting/?orgRef=https%253A%252F%252Fwww.google.com%252F&srsltid=AfmBOoraFX_LFA
3I-eW5fToZ3de_WIfUumDp6bG_xNooN0BKz5icwF1e

https://www.w3schools.com/whatis/whatis_fullstack.asp

You might also like