When we look at web it is divided in to two major layers one is the client side and the other is server side. Client side means your browser and server side means the computer where your site is hosted. Now in both layers we need programming languages because in both layer we would like to perform validations.
Following is how client side language talks with server side language:-
- Step 1:- Client side language send’s a request over HTTP protocol to the server side language. To send this request he can either use a GET or a POST.
- Step 2:- Once the request reaches the server side the server side programming language life cycle is executed. So for example if it’s ASP.NET then ASP.NET page life cycle is executed, if it’s JSP then JSP page life cycle is executed.
Life cycle is nothing but series of steps which the server language has to perform to send the full HTML to the browser.
- No round trips, client side execution: – The biggest benefit of client side language is we can perform all validation on the browser rather than making a trip to the server.
Disadvantages of client side language
- All browsers do not support scripts. Many users disable scripts on browser which leads to non-execution of client script code.
Advantage of server side language (ASP.NET, JSP)
Disadvantages of server side language
- Server side code gets executed on the server side thus putting load on the server.