Explain difference between server and client languages? ( ASP.NET interview questions)

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.

On client side the language the most used language is JavaScript. While on server side we have various languages like ASP.NET (Active server pages), JSP (Java server pages), PHP ( Hypertext processor) etc. Client side language is used to perform validations at the client side while server side programming helps to validation plus database activities.

java

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.

java 2Advantages of client side language (JavaScript):-

  • 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.

java 3

  • Fewer loads on server: – As JavaScript language is executed in the client browser it puts less load on the server. It utilizes the client computing power thus putting less load on the server.

Disadvantages of client side language

  • Complicated coding: – JavaScript is case-sensitive and a complicated language. So writing code and debugging is very difficult.
  • All browsers do not support scripts. Many users disable scripts on browser which leads to non-execution of client script code.
  • JavaScript syntax varies from browser to browser so as a developer we need to ensure the code is compatible with different browsers from different companies.
  • Javascript code can be seen by browser view source leading to security threats. 

Advantage of server side language (ASP.NET, JSP)

  • As compared to JavaScript server side languages like C# and Java are less complicated as they have necessary supporting tools to ease programming.
  • Server side programming runs on the server and not visible to the end user. So is more secured as compared to JavaScript client side programming.

Disadvantages of server side language

  • Server side code gets executed on the server side thus putting load on the server.


Advertisements

About c# and .NET Interview questions

This blog is for developers who want to crack .NET and C# interviews. It has all tips and tricks needed to crack .NET interviews , C# interview , SQL Server interview , Java interview , WCF Interview , Silverlight interview , WPF interview , LINQ interview , Entity framework Interview. Do not forget to watch our Learn step by step video series. Learn MVC in 16 hours:- https://www.youtube.com/watch?v=Lp7nSImO5vk Learn AngularJS Step by Step:- https://www.youtube.com/watch?v=0kmdjqgO9IY Learn Design Pattern in 8 hours:- https://www.youtube.com/watch?v=YDobmucohqk Learn C# and .NET in 60 days:- https://www.youtube.com/watch?v=yh2SrzCkNQA Learn MSBI in 32 hours:- https://www.youtube.com/watch?v=mGPJx3ocFgg Learn SharePoint Step by Step in 8 hours:- https://youtu.be/C2fW76SwJNU
This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s