Understanding the Difference Between ASP.NET, VB and C#

Understanding the Difference Between ASP.NET, VB and C#

It's sometimes confusing for beginners to understand how VB and C# relate to ASP.NET, especially when you start throwing in terms like Classic ASP, WinForms, HTML and MVC.

The .NET framework can be best thought of as a set of tools created by Microsoft that developers can use to build applications and websites.

There are several tools within the several packages known as ".NET" and based on a project, different resources of the framework may be used. ASP.NET is a term used to represent a collection of website-related .NET controls and packages, whereas WinForms (Windows Form Desktop Applications) use a different set of "tools" with some overlay. You might use a drill, screw driver and sanding belt to build a bird house, but you might use a screw driver and glue to put together a chair.

VB and C# are languages that can be used to write code using the .NET framework, but can also be used without .NET. Suppose that VB is a spoken language such as American English and C# is another language, British English. Both have common words and expressions. There are syntax differences, but someone who knows American English would probably not have any issues reading and comprehending British English. That being said, our American speaking person may have trouble writing a British sentence in correct grammatical syntax.

Draw a Square on a NapkinNow, I may want my friend to draw a square on a napkin. I could use my American English terms to have him place a pencil down on the napkin and press hard while moving from one point to another, make a right angle, and proceed for the same distance, and with two more right angles eventually end up with a square, but that's a lot to explain every time I want him to draw a square.

Depending on my goal, I may want to develop a windows application (WinForms) or a website (ASP). Each has its advantages based on the environment in which users will be interacting with them. For my example, a napkin will represent a webpage.

HTML is a scripting language used to render websites. Pretty much every website you look online uses HTML to communicate with the browser.  For our example, HTML may represent shapes. Now, I can use the words "Circle", "Triangle" and yes, "Square". Suddenly, it's a lot easier to tell my friend, "Draw a square" instead of the monotonous instruction we used before.

Given our running example, the .NET framework may be better known as "math terms". There are several nouns, verbs and interactions used in math that our framework can predefine for us. Depending on the project I am working on and medium for it's use, there are different sets of "terms" I will use. WinForms may be like Algebra with Square Root, Logarithm and Equation terms; while ASP.NET (for HTML websites) may be like Geometry with a set of terms such as Polygon, Angle and Radius. There are common tools used in both ASP.NET and WinForms, just the same as the math term "Line" would be used in both algebra and geometry.

I can now use either the VB or C# language with the ASP.NET (subset of the entire .NET framework) tools to generate HTML script (for web browsers).

Find this helpful? Share it with others:

Posted Tuesday, May 08, 2012