The difference between client side and server side programming

0

You need to know the difference between client side and server side Programming If you are new to backend processes in web development. You may have noticed that PHP rarely works in JavaScript. This is because both PHP and Java run their processes in two different spaces known as the client side and the server side.

Any code written by a developer is spilt into two parts, one to be executed in the backend server and the other on the client’s browser. JavaScript processes usually execute on the client side while PHP processes happen behind the curtains, which is in backend processors. Now let’s look at a further understanding at what server side and client side languages are.

Below is a diagram showing what happens when an HTTP request is sent by the client to the server.

To delve deeper into code, when an HTTP request is sent from the client side, PHP on the server will only interpret those processes it understand. Anything else is rendered null or, this is denoted as ‘+ foo +’ in the below code;

PHP or Server Languages

PHP languages only exist on the server side of things and basically, handle the processes that need high security. They fetch records from databases and reinforce security in an HTTP connection that is stateless. Server languages are heavily protected and never backend source code to the client on the front end browser.

Client Side languages

These languages get executed on the end user’s browser and are for running all the processes involved in web browsing. Example of client-side language is JavaScript that plays a lot of roles, from enabling popup menus to playing web videos. Client-side languages rarely show up on the backend processers but all they do is send requests to the processors which are processed and sent back as HTML feedbacks.

Unlike server languages which are heavily encrypted, client-side languages can be easily modified to enhance security or to suit personal preferences.

Thus servers are the only places where PHP processes happen because it’s the only place where PHP files can be interpreted. Once the server is done interpreting and sending feedback back to the client browser, no other process happens unless the client issues another HTTP request.

Leave A Reply

Your email address will not be published.