What is a Client side programming language?
- Client side programming has mostly to do with the user interface, with which the user interacts.
- In web development it’s the browser, in the user’s machine, that runs the code, and it’s mainly done in javascript, flash, etc.
- This code must run in a variety of browsers.
What is a server side programming language?
- Server-side scripting is a technique used in web development which involves employing scripts on a web server which produce a response customized for each user’s (client’s) request to the website.
- The alternative is for the web server itself to deliver a static web page.
Background:
Web development is all about communication. In this case, communication between two (2) parties, over the HTTP protocol:
- The Server – This party is responsible for serving pages.
- The Client – This party requests pages from the Server, and displays them to the user. In most cases, the client is a web browser.
- The User – The user uses the Client in order to surf the web, fill in forms, watch videos online, etc.
Each side’s programming, refers to code which runs at the specific machine, the server’s or the client’s.
Programming:
Server-side Programming
- Server-side programming, is the general name for the kinds of programs which are run on the Server.
- Server side programming is all about generating dynamic content. Most of the web pages are not static, therefore they need search a database in order to show the user personalized information.
- Server-side programming can be done in a lot of languages: PHP, ASP, Java and Jsp, Phyton, etc.
- This code has to do with: Querying the database, encoding the data into html, inserting and updating information in the database.
Uses
- Process user input.
- Display pages.
- Structure web applications.
- Interact with permanent storage (SQL, files).
Example Languages
- PHP
- Python
- ASP.Net in C#, C++, or Visual Basic.
- Nearly any language (C++, C#, Java). These were not designed specifically for the task, but are now often used for application-level web services.
Client-side programming
- Much like the server-side, Client-side programming is the name for all of the programs which are run on the Client.
- Client side programming has to do with the user interface, with which the user interacts.
- It’s main tasks are: interacting with the server – sending requests and retrieving data from it, validating input, animation, manipulating UI elements, applying styles, etc.
- An example of client-side programming is Javascript. Javascript can be used to run checks on form values and send alerts to the user’s browser.
Uses:
- Make interactive webpages.
- Make stuff happen dynamically on the web page.
- Interact with temporary storage, and local storage (Cookies, localStorage).
- Send requests to the server, and retrieve data from it.
- Provide a remote service for client-side applications, such as software registration, content delivery, or remote multi-player gaming.
Example languages:
- JavaScript (primarily)
- HTML*
- CSS*
- Any language running on a client device that interacts with a remote service is a client-side language.
*HTML and CSS aren’t really “programming languages” per-se. They are markup syntax by which the Client renders the page for the User.
[ad type=”banner”]Security
- In terms of Security, server-side scripts are more secure than client-side scripts.
- For example, when a user accesses his bank account online, the server side-script communicates with the client using encryption.
- A client-side script consists of plain text and runs on the client’s browser allowing hackers to take a peek at the the code and steal private information from the user’s computer.
Compatibility
- In terms of Compatibility, the main issue with client-side scripts are the problems with OS’s and web browsers compatibility.
- Programming a website involves users having multiple computer software, so bugs in the code or compatibility issues with browsers may occur.
- Server-side scripts being run on the server reduces the number of bugs and compatibility issues since the code is run on a single server using a single language and hosting software.