ASP.NET/About ASP.NET

From Wikibooks, open books for an open world
Jump to: navigation, search

Development Tools[edit]

Many ASP.NET developers use Microsoft's Visual Studio to develop ASP.NET sites. But there are less expensive and free alternatives as well. Microsoft's Visual Web Developer Express Edition is free. Web Matrix is useful in that it also provides a simplified version of the Internet Information Services (IIS), Microsoft's web server. The version of IIS included with Web Matrix allows you to test locally hosted applications. Since January 2006 Microsoft has made available free Express Editions of Visual Studio, including Visual Web Developer, which uses the later ASP.NET 2.0, and also has the same local IIS (called Cassini). All require in addition the appropriate .NET framework also available from Microsoft, and for development the appropriate .NET framework SDK as well.

It is also possible to develop ASP.NET web applications using open source tools, or even simple text editors like Notepad.

Hosting[edit]

While most ASP.NET web applications are hosted using Microsoft's IIS web server, the Mono Project provides a way to host ASP.NET projects on open source web servers such as Apache.

Languages[edit]

An unusual feature of ASP.NET is that it supports more than one programming language. There is, in fact, no language called "ASP" but rather a programming platform . The two most popular languages for ASP.NET development are Visual Basic .NET (VB.NET) and C# (pronounced "C sharp").

Approaches to Coding[edit]

ASP.NET pages can include their VB.NET or C# code inline with the HTML/CSS. We will explore this method of creating ASP.NET pages first. But ASP.NET pages also offer the ability to greatly separate the logic of the web application from the presentation layer of the page. In this latter style, the C# or VB.NET code is kept in a separate file (called a "code-behind" file). Thus, ASP.NET pages using the code-behind method will actually contain two files: one a fairly traditional HTML file and a second file containing the bulk of the page logic.

A significant advantage of using code behind is that the code behind file must be pre-compiled. Pre-compiling the file allows it to execute faster and forces the person designing it to fix errors at compile-time, rather than run-time.