Technologies like Visual Basic are limited to standalone applications, when it comes to web, only option left with Microsoft is classic ASP.
When we talk about Web and Desktop, two things which should be considered are
How state management works?
How request/response works?
Web works on HTTP which is completely a stateless protocol. We will be having request and response independent of previous request and response. Unlike desktop no variable values will be preserved and no complete event driven programming model. Like desktop it will wait for user inputs but every user input and interaction act as a new request (get/post) to server.
Finally Microsoft came up with something called ASP.NET Web Forms, considering rapid application development and easy learning in priority.
What is ASP.NET?
ASP.NET is a Microsoft’s Web application framework built on Common language runtime for building dynamic web sites using one of the programming languages like C#, VB.NET etc. It supports 2 models Web Forms and ASP.NET MVC.
What is Web Forms?
Microsoft first brought out ASP.NET Web Forms from ASP which solved lots of problems by creating higher level abstraction over stateless web and simulated stateful model for Web developers. In web forms concepts like self postback (post form data to same page) and ViewState (maintain control values during postbacks) are introduced. And the most interesting part is it’s not required to write even a single line of code. With Web Forms Microsoft tried to bring the Visual Basic model into web.
Let’s talk about advantages and disadvantages of Web Forms.
Advantages:
Web Forms supports Rich server controls.
While working with pure HTML you might have noticed, Things are not always same at all place.
A UI which looks great in IE might distract in Firefox or vice versa.
ASP.NET server control detects the browser and generates appropriate html and if required JavaScript also.
Many server controls like GridView and ListView comes up with data binding capabilities reducing lots of efforts and codes being written.
Support for ViewState - You might have heard couple of times “HTTP is a stateless protocol”. Normally controls will not retain their values between requests. But in Web Forms statefulness is achieved by storing last known state of every control within the client page itself in the form of hidden field called ViewState.
Event driven programming -
With the help of
Code behind
Self postback mechanism (posting back form to the same page)
ViewState
Microsoft introduced event driven programming in internet world.
Developer will no more rely on POST, GET methods for handling user interactions with server. For example she/he will drag control (say button) to page, just double click it to generate the code block for handling user’s click on server, write down the logic inside it. That’s it. She/he is not concerned with what happens inside.
Rapid application development - I don’t think any explanation is required for this. Rich server controls, Event driven model and ViewState increases the development speed by great extent, Developer will be abstracted from lots of the background complexities.
WebForms vs. MVC
Start from the beginning
