1. Home
  2. Docs
  3. Web Technology II
  4. Introduction
  5. Server-Side Scripting

Server-Side Scripting

Server-side scripting is a technique used in web development where scripts are executed on a web server rather than on the client’s web browser.

  • Unlike client-side scripting (where the code runs in the browser), server-side scripting processes the data on the server before sending the result (usually an HTML page) to the user’s browser.
  • PHP is a popular language for server-side scripting due to its integration with databases (like MySQL) and its ability to generate dynamic HTML content.
  • The user does not see the server-side code. Example: PHP, Python (Django/Flask), Ruby (Ruby on Rails), Node.js, ASP.NET

‣ Executed on the Server:

  • Server-side scripts run on the web server.
  • The server processes requests, runs the script, and sends the resulting output to the client.

‣ Dynamic Content Generation:

  • Server-side scripting generates dynamic web pages that can display different content for different users or different times.
  • It allows for real-time updates and interactions based on user actions.

‣ Interaction with Databases:

  • Commonly used for accessing and manipulating database content.
  • Enables functionalities like user authentication, data retrieval, and data storage.

‣ Common Languages:

  • Popular server-side scripting languages include PHP, Python, Ruby, Java, and JavaScript (Node.js).

‣ Security and Control:

  • Sensitive operations and data are handled on the server, enhancing security.
  • Provides more control over the web application’s functionality and behavior.

Example:

When a user submits a form on a website, the data from the form is sent to the server. A server-side script processes this data, performs necessary actions like updating a database, and generates a response that is sent back to the client.

In summary, server-side scripting is crucial for creating interactive and personalized web applications, enabling the creation of dynamic content that interacts with databases and performs complex logic on the server before delivering the final content to the user’s browser.

Client-side scripting refers to code that is executed in the user’s browser after the web page has been loaded.

  • It is primarily used to enhance user interaction, update content dynamically without reloading the page, and validate user input.
  • Example: JavaScript, HTML, CSS
image 3

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *