CLIENT SIDE &SERVER SIDE SCRIPTIN | BCA SEM 02 PHP BKNMU JUNAGADH

 




Client-side scripting refers to scripts or code that are executed directly on the user's web browser rather than on a web server. It is used to create dynamic, interactive, and responsive web pages by running code on the client device. This enhances the user experience by enabling actions such as form validation, animations, and real-time updates without requiring a round trip to the server.

Execution: Runs in the user's browser.

Speed: Reduces load on the server, as tasks are processed locally.

Languages: Common client-side scripting languages include JavaScript, HTML, and CSS.

Use Cases:

·         Validating user input in forms.

·         Creating interactive elements like dropdown menus or sliders.

·         Updating content dynamically with techniques like AJAX.

Server-side scripting refers to scripts or code that are executed on the web server rather than the user's browser. It is used to process user requests, interact with databases, and generate dynamic content that is sent back to the client. This approach is essential for managing data, securing operations, and creating personalized user experiences.

Execution: Runs on the web server.

Interaction: Often used for database operations, authentication, and generating custom content.

Languages: Common server-side scripting languages include PHP, Python, Ruby, Node.js, ASP.NET, and Java.

Security: Provides better control over sensitive operations, as code is executed on the server and not exposed to the client.

 

Use Cases:

·         Authenticating user logins.

·         Retrieving and displaying data from a database (e.g., user profiles, search results).

·         Generating customized web pages or reports.

·         Managing business logic and backend processing.

Example:

When you log into a website, the server checks your credentials in the database, processes the login request, and sends a response (e.g., redirecting to your dashboard). All of this happens through server-side scripting.

 

Client-side scripting

Server-side scripting

Source code is visible to the user.

Source code is not visible to the user because its output  of server-sideside is an HTML page.

Its main function is to provide the requested output to the end user.

Its primary function is to manipulate and provide access to the respective database as per the request.

It usually depends on the browser and its version.

n this any server-side technology can be used and it does not depend on the client.

It runs on the user’s computer.

It runs on the webserver.

It does not provide security for data.

It provides more security for data.

HTML, CSS, and javascript are used.

PHP, Python, Java, Ruby are used.

No need of interaction with the server.

It is all about interacting with the servers.

 

 

 

 

 

 


Post a Comment

Thanks for comment.

Previous Post Next Post