[go: up one dir, main page]

0% found this document useful (0 votes)
14 views17 pages

Chapter-1 Web

The document discusses client-side and server-side scripting languages, highlighting their definitions, features, and uses. Client-side scripting, executed in the user's browser, enhances web pages but cannot access server databases, while server-side scripting runs on the web server, allowing for dynamic content generation and database interactions. A comparison between the two types is provided, detailing their execution environments, languages, security, and typical use cases.

Uploaded by

merir143
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)
14 views17 pages

Chapter-1 Web

The document discusses client-side and server-side scripting languages, highlighting their definitions, features, and uses. Client-side scripting, executed in the user's browser, enhances web pages but cannot access server databases, while server-side scripting runs on the web server, allowing for dynamic content generation and database interactions. A comparison between the two types is provided, detailing their execution environments, languages, security, and typical use cases.

Uploaded by

merir143
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/ 17

COURSE TITLE:

WEB DESIGN AND DEVELOPMENT II


Chapter- 1
Client-Side Scripting Language

By Meresa H.(MSc.)

1
Topics:

1. Introduction to Scripting Language


2. Client Side Scripting Language
3. Server side scripting language.
4. Comparisons of client side and server-side scripting

2
1. Introduction to Scripting Language
■ What is Scripting Language ?
– Scripting languages are a type of programming language designed to
automate tasks and integrate complex systems.

– Unlike compiled languages, scripting languages are interpreted,


meaning they are executed directly without the need for a compilation
step.

– Here are some key points about scripting languages:


1. Definition: Scripting languages are used to write scripts, which are short programs that
automate tasks that could be performed manually by a human operator.
2. Examples: Common scripting languages include JavaScript, Python, Ruby, and PHP.
3. Uses: They are often used in web development, system administration, and software
automation

3
1. Introduction to Scripting Language
■ Features of Scripting Language
1. Cross Platform Dependency:
■ The scripting languages are independent of the Operating
system they are executing.
■ These codes work on all types of OS without any major
modifications.
2. Fast Development:
■ The scripting languages are easy to code, test, and debug and
make any changes faster than other programming languages.
■ Therefore the software development process takes place very
fast.
3. Easy Integration:
■ The scripting language can be easily integrated with other
programming languages like Java, and C++.
4. Versatile:
■ Scripting languages are very versatile they can be used for
different purposes.
■ It can be used for web development, scientific study,
administration, and analysis.
5. Easy to learn:
■ One of the major benefits of scripting language is that it is
easy to learn when compared to programming languages.
■ As it is open source it has an online community to support.

4
1. Introduction to Scripting Language
■ Usage of Scripting Language
– Different scripting languages have different usages, and they can be used in different
industries. Some of them include:
• Automation: They are widely used to automate tasks like data manipulation,
maintenance, maintenance, and managing updates and backups.
• Dynamic web development: Using JavaScript and its interactive framework greatly
enhances the user experience of the website. They are used to develop web applications
on the client and server sides.
• System administration and configuration: Scripting languages are widely used to
configure and manage networks using scripting languages like PowerShell and Bash.
• Data Analytics: Scripting languages like R programming and Python are widely used as
tools for the analysis of the data and also to visualize it.
• Testing: They are used to check the software product developed and ensure the quality
is maintained. Frameworks like Selenium and PyTest are used for testing software
components.
• Cross-platform development: They are used to develop cross-platform applications,
which include both web and mobile applications, with JavaScript frameworks like
React.js and Node.js.
• Embedded System: Scripts can be written to embed systems, IoT devices,
microprocessors, and microcontrollers into the hardware to collect and implement
different functionalities.

5
1. Introduction to Scripting Language

■ Types of Scripting Language


1. Client-Side Scripting Language
2. Server-Side Scripting Language

6
2. Client-Side Scripting Language
■ Client side scripting is used when the users browser already has all the
code and the page is altered on the basis of the users input.
■ The Web Browser executes the client side scripting that resides at the
user's computer.
■ It 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 advertisements

7
2. Client-Side Scripting Language (..continued)
■ The browser receives the page sent by the scripting language and
executes the client-side scripts.
■ Client side scripting cannot be used to connect to the databases on the
web server.
■ Client side scripting can't access the file system that resides at the web
server.
■ The files and settings that are local at the user's computer can be
accessed using Client side scripting.
■ Response from a client-side script is faster as compared to a server- side
script because the scripts are processed on the local computer.
■ Examples of Client side scripting languages: Javascript, VB script, etc.

8
2. Client-Side Scripting Language (..continued)
■ What can JavaScript do?
– Control document appearance and content
– Control the browser
– Interact with the user
– Read and Write Client State with Cookies
– - my.yahoo.com
– Interact with Applets
– - Read/write files
■ List of Client-Side Scripting Languages
– JavaScript
– ActionScript
– Dart
– VBScript
– Typescript

9
3. Server-Side Scripting Language
■ A server-side scripting language is used to create scripts that run on a web
server, rather than in the user’s browser.

■ These scripts generate dynamic content tailored to each user’s request.

■ "Server-side" just means that the control of the script is handled by the Web
Crossing server rather than running a script on each user's personal
computer.

■ Web Crossing runs the scripts and sends standard HTML (web pages) to
each user's browser.

■ All the end user's browser has to worry about is displaying the results and
does not have to worry about the underlying script used to generate the web
pages.
10
3. Server-Side Scripting Language (…Continued)

■ 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
■ The server is where the Web page and other
content lives.
■ The server sends pages to the user/client on
request.
■ Server-side scripting is about "programming"
the behavior of the server.

Simple Web request in server side scripting language

11
3. Server-Side Scripting Language (…Continued)

■ used to connect to the databases that reside How does it works


on the web server.
■ can access the file system residing at the web
server.
■ Response from a server-side script is slower
as compared to a client- side script because
the scripts are processed on the remote
computer.
■ The Web Server executes the server side
scripting that produces the page to be sent to
the browser.
■ Server executes server-side scripts to send
out a page but it does not execute client-side
scripts.

12
3. Server-Side Scripting Language (…Continued)

Advantage Disadvantage
■ Interpreted, low processing overhead
■ Interpreter is integrated into web server, so it is fast ■ Debugging tools can be scarce
■ Secure, code runs on server ■ Can be more difficult to develop
■ Content based on live data ■ Requires a running server to test
■ Can use basic devices, eg phone, browsers as ■ Has no direct control over the
processing is server side user interface
■ does not require the user to download plug-in like
Java or Flash (as in client-side scripting).
■ Load times are generally faster than client-side
scripting.
■ Your scripts are hidden from view.

13
3. Server-Side Scripting Language (…Continued)
■ What can server scripts do?

– Dynamically edit, change or add any content to a web page.

– Responds to user queries or data submitted from html forms.

– Access any data or databases & return the result to a browser.

– Customize a web page to make it more useful for individual users.

– Provide security since your server code cannot be viewed from a browser.

14
4. Common Scripting Language with their Extensions?
– ASP (*.asp)

– ASP.NET (*.aspx)

– C via CGI (*.c, *.csp)

– ColdFusion Markup Language (*.cfm)

– Java via JavaServer Pages (*.jsp)

– JavaScript using Server-side JavaScript (*.ssjs, *.js)

– Lua (*.lp *.op)

– Perl CGI (*.cgl, *.ipl, *.pl)

– PHP (*.php)-Open Source Scripting

– Python, e.g. via Django (*.py)

– Ruby, e.g. Ruby on Rails (*.rb, *.rbw)

– SMX (*.smx)

– Lasso (*.lasso)

– WebDNA (*.dna,*.tpl)

– Progress WebSpeed (*.r,*.w)


15
4. Client Side Vs. Server side scripting language.
■ comparison between client-side and server-side scripting languages is:

Feature Client-Side Scripting Server-Side Scripting


Execution Runs on the user's browser Runs on the web server

Languages JavaScript, HTML, CSS PHP, Python, Ruby, Java, C#, Node.js

Interaction Directly interacts with the user Interacts with the server and databases

Visibility Code is visible to the user Code is hidden from the user

Performance Depends on the client's device and Depends on the server's performance
browser
Security Less secure, as code is exposed More secure, as code is executed on the server

Use Cases Form validation, animations, user Database operations, user authentication, dynamic
interface content generation

Examples JavaScript for form validation, CSS for PHP for database access, Python for server logic
styling
16
17

You might also like