06 October 2012

Basics of web technology every web developer should know


This is my first blog about basic web technology, I tried writing this in Marathi, but didn't receive much response (might be I am not able to write good things).

In this I assume readers at least know bit about HTML.

Let me give you some questions and answers, which I normally ask in interviews, it definitely tell me that how much basic concepts are clear. I am giving you some shocking anwers from people during interviews (I really shoked )


1. What is difference between GET and POST request?


Wrong Ans: GET is for getting data from server and POST is for posting data to server.

Really I was in coma for atleast 10 seconds. because girl who gave this answer was 5-5.5 years experienced in ASP.Net. Let it be, correct answer is as below.

Ans :

GET and POST are two different methods with which we can send data to server, and in turn server will return us some response (either text, HTML, js, css, json, or octate stream).

Main difference is the way of carring data in transit. GET is carring data in query string and POST carries data in an envelop.In simple terms GET carries data in hand, which anyone can see (visible to everyone) and in contrast POST carries data in bag, really a large bag, data in bag is not easily visible to others.

2. How many FORM tags I can write on a single HTML page?

Ans: Only one.
Question : Why?
Ans  I never tried to add multiple Form tags, and I guess it will never require.
Question : Think again
Answer : Only one, sure... because visual studio will give you an error

I am again in come :)

Correct answer is : We can write any number of FORM tags on a single HTML page. only restriction is we can nest form tags in each other.

Main use of FORM tag is allow user to post data to servers. using multiple methods. There is an attribute for form tag as "action" : This is a server side page or handler, which will handle data from client.

3. How many configuration files I can have in one ASP.Net project?
Ans: Only one.
Question : Why? 
Ans : If I add multiple how will server know which one to choose.
Correct, this time that lady is correct, but she forgot that we can hace multiple folders in application.

Correct answer is : We can have multiple web.config files in 1 ASP.Net project, provided all those should reside in different folder.

4. What will happen if I delete web.config from ASP.Net project, if I am not using it?
Ans: Compile time error.
Question : Why?
Ans: It is must have file in any ASP.Net project.

Correct answer is : If we are not using any kind of configurations from config file, then our application will run without web.config. Application read configuration from machine.config from respective framework. Mahcine.config for framework 4.0 is locate at C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config
















No comments: