ASP.NET Web Hosting
Posted by PremiumReseller.com on 16 November 2008 01:14 AM
You may already know that there are two main platforms for web hosting services: linux hosting and windows hosting. While Linux hosting is popular choice for php mysql websites, Windows hosting is used to host ASP/ASP.NET websites. This article will explain basic concept of ASP.NET and some benefits of developing website on this platform.
What is ASP.NET?
ASP 3.0 is the latest version of ASP. ASP.NET is an entirely new paradigm for server-side ASP scripting. ASP.NET is a part of the .NET Framework, an environment for building, deploying, and running Web applications and Web Services. Dot NET Framework contains a common language runtime and common class libraries - like ADO.NET, ASP.NET and Windows Forms - to provide advanced standard services that can be integrated into a variety of computer systems.
OOP on the Internet
Object Oriented Programming makes it possible to build extremely large applications, while keeping your code clean and structured. Now with ASP.NET, we can do the same on the web. Traditional ASP uses HTML and VBScript (or Jscript) to process and render pages, but because VBScript is a scripting language, you were forced to write spaghetti code (VBScript was entwined in the HTML and ended up rather messy in larger applications). ASP.NET separates code from display, and you can even have pages with no ASP.NET code in them at all. By adding references in your HTML (called controls), you can tell ASP.NET that you want a button here, some text there, and then in your code, you can manipulate what these controls look like, what they display, how big they are, etc. Controls can do more than just display information. You can add events to controls, so that when a visitor clicks on a button, for example, ASP.NET executes a function of your choice.
One great feature of ASP.NET is Web Services. Web services mean that you can literally have several pieces of your application on different servers all around the world, and the entire application will work perfectly and seamlessly. Web services can even work with normal .NET Windows applications. For example, a lot of people would like to have a stock ticker on their web site, but not many people want to manually type in all changes to the prices. If one company (a stock broker) creates a web service and updates the stock prices periodically, then all of those people wanting the prices can use this web service to log in, run a function which grabs the current price for a chosen company, and return it. Web services can be used for so many things: news, currency exchange, login verification ... the ways in which they can be used are limited to your imagination!
Great XML Support
ASP.NET makes it simple to use XML for data storage, configuration and manipulation. The tools which are built into ASP.NET for working with XML are very easy to use. XML is excellent for storing information that rarely changes, because you can just cache that information in the computers memory after it has been initially extracted.
ASP.NET includes an enormous class library which was built by Microsoft. Because this class library is so large, it encapsulates a a huge number of common functions. For example, if you wanted to retrieve data from a database and display that data in a simple grid control through classic ASP, then you'd have to write quite a lot of code.
In ASP.NET, you don't write any code to display the data: you just write the code to bind the data to an object called a DataGrid (which can be done in just a couple of lines). Then, you just have to create a reference on your page to where that DataGrid should go. The DataGrid will be rendered as a table, and will contain all of the data extracted from the database.
Microsoft has created an amazingly well designed MSDN library for ASP.NET and all of the other .NET languages. It includes a full class library containing information and examples on every class, function, method, and property accessible through ASP.NET.
The MSDN library also includes some tutorials and examples to get you started. It may take you a while to get used to the format and layout of the MSDN ASP.NET library, however, once you do, you will find it's an invaluable resource to aid you throughout your ASP.NET learning experience. The .NET MSDN library can be found at http://msdn.microsoft.com/net/
One of the most important goals of .NET was to allow developers to write an ASP.NET application using multiple programming languages. As long as each ASP.NET page contains only one programming language, you can mix and match different pages using different languages and they will work together seamlessly. This means you can now have a team of developers with half programming in C#, and the other half in VB.NET, with no need to worry about language incompatibilities, etc.
A cool little side-affect of all this is that all the programming languages look very similar, and differ only by their language syntax.
Take the following code snippets for example. They both do exactly the same thing but the first is written in C#, and the second in VB.NET.
The C# version:
The VB.NET version:
If you take either of the code examples shown above and add the following HTML to them, then they would both run perfectly inside of an ASP.NET page: