Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Scripting

Scripting: A script is a set of instructions or code written in a scripting language that is interpreted by
the browser, allowing the browser to perform actions or manipulate the content of a web page
dynamically. Scripting languages are essential for creating interactive and dynamic web pages.

Web scripts can run in two places: the client side, also called the front-end, and the server side, also
called the back-end.

Client-side scripting

• refers to the execution of scripts on the user's web browser rather than on the web server. The
most common language used for client-side scripting is JavaScript, but other technologies such
as TypeScript or Coffee Script can also be used. Source code is visible to the user. Used in
the field of online games. Client-side script can be used to detect installed plug-ins.
to validate data before sending it to the web server

Here are key aspects of client-side scripting:

1. Execution in the Browser:

- Client-side scripts are executed by the user's web browser.

2. User Interface Interactivity:

- Client-side scripting is often used to enhance user interfaces by providing features such as form
validation, animations, and dynamic content.

3. Languages:

 JavaScript
 jquery
 TypeScript
 CoffeeScript
4. DOM Manipulation:

- Client-side scripts can manipulate the Document Object Model (DOM). which represents the tree
structure of the HTML document.

5. Asynchronous Operations:

- Client-side scripts often handle asynchronous operations, such as fetching data from a server using
AJAX (Asynchronous JavaScript and XML). AJAX updating of parts of a web page without reloading a full
page.

6. Form Validation:

- JavaScript is commonly used for client-side form validation, ensuring that user inputs meet specified
criteria before being submitted to the server.

7.Performance:

- Client-side scripting can enhance the performance of web applications.

In summary, client-side scripting allows developers to create dynamic and interactive web application.
JavaScript, is a fundamental language of client-side scripting.

Advantage of Client-side Scripting

1. The client-side scripting language is quite easy to learn and use. It requires minimum
programming knowledge or experienced required.

2. The main advantage of client-side scripting is that it is lightweight and relatively easy to
implement (syntax not too complex).

3. The editing and executing the code is fast.

4. The client-side data validation can be possible using the client-side scripting language like
JavaScript.

5. The execution of client-side script is more quickly.

6. The client-side programming helps to perform the complex tasks in relatively few steps.

7. Script code only executed by the browser without connecting the server.

8. It takes too less time to execute script code.

9. Browser respond immediately when user presses any key, mouse movement, clicks, etc.

Disadvantage
1. The main disadvantage of client side scripting is that it is unsecure because the code is sent as is
to the client and, therefore, visible to it if the client looks at the sources of his web page. In
short, code is usually visible.

2. It does not use database for data retrieve or store.

3. The smooth running of the script (or program) depends entirely on the client’s browser, its
configuration, and security level.

4. Client side scripting languages are usually more limited in functionality than server side scripting
languages.

Server-side scripting

refers to the process of executing scripts on a web server to generate dynamic web page content before
it is sent to the client's web browser. Server-side scripting is creating a unique experience for each user.
provide a customized interface for the user.

Here are key aspects of server-side scripting:

1. Execution on the Server:

- Server-side scripts are executed on the web server, not on the client's machine.

2. Dynamic Content Generation:

- Server-side scripting is commonly used for generating dynamic content. Server-side scripting is
creating a unique experience for each user.

3. Server-Side Languages:

- Various programming languages are commonly used for server-side scripting. Examples include:

 PHP: A popular server-side scripting language.


 Python: Using frameworks like Django or Flask.
 Ruby: Often used with the Ruby on Rails framework.
 -Node.js: Allows JavaScript to be used for server-side scripting.
 Java: With technologies like Java Server Pages (JSP) or servlets.

4. Database Interactions:

- Server-side scripts often interact with databases to retrieve or store data.

5. Security:

- Server-side scripting is more secure than client-side scripting because the source code is not visible to
the end-user. Sensitive operations and data manipulation are handled on the server, reducing the risk of
unauthorized access.

Server-side scripting is creating a unique experience for each user. Both server-side and client-side
scripting are integral parts of modern web development, working together to create interactive and
dynamic web applications.

You might also like