ASP.NET
From Wikipedia, the free encyclopedia
ASP.NET is a set of web application development technologies marketed by Microsoft. Programmers can use it to build dynamic web sites, web applications and XML web services. It is part of Microsoft's .NET platform and is the successor to Microsoft's Active Server Pages (ASP) technology.
Contents |
[edit] Principles of ASP.NET
Even though ASP.NET takes its name from Microsoft's old web development technology, ASP, the two differ significantly. Microsoft has completely rebuilt ASP.NET, based on the Common Language Runtime (CLR) shared by all Microsoft .NET applications. Programmers can write ASP.NET code using any of the different programming languages supported by the .NET Framework, usually C#, Visual Basic.NET, or JScript .NET, but also including open-source languages such as Perl and Python. ASP.NET has performance benefits over other script-based technologies because the server-side code is compiled to one or a few DLL files on a web server.
ASP.NET attempts to simplify developers' transition from Windows application development to web development by offering the ability to build pages composed of controls similar to a Windows user interface. A web control, such as a button or label, functions in very much the same way as its Windows counterpart: code can assign it properties and respond to its events. Controls know how to render themselves: whereas Windows controls draw themselves to the screen, web controls produce segments of HTML and JavaScript which form part of the resulting page sent to the end-user's browser.
ASP.NET encourages the programmer to develop applications using an event-driven GUI paradigm, rather than in conventional web-scripting environments like ASP and PHP. The framework attempts to combine existing technologies such as JavaScript with internal components like "Viewstate" to bring persistent (inter-request) state to the inherently stateless web environment.
ASP.NET uses the .NET Framework as an infrastructure. The .NET Framework offers a managed runtime environment (like Java), providing a virtual machine with JIT and a class library.
The numerous .NET controls, classes and tools can cut down on development time by providing a rich set of features for common programming tasks. Data access provides one example, and comes tightly coupled with ASP.NET. A developer can make a page to display a list of records in a database, for example, significantly more readily using ASP.NET than with traditional web technologies like ASP or PHP.
[edit] ASPX file format
ASPX is a text file format used as web-form pages in the .NET environment. In programming jargon, the ASPX file typically contains only static HTML or XHTML code where the developer places all the required form fields and text content for the web page. The dynamic code that involves request and response from the server is placed in an HTML page with a tag or block <% -- dynamic code -- %> which is similar to other web development technologies such as PHP and JSP. ASP.NET does support inline code blocks inside an ASPX file, but this practice is generally discouraged.
The ASPX and other resource files are placed in a virtual host on an Internet Information Services or other compatible ASP.NET servers. When a client requests information, the .NET framework parses and compiles the file into a .NET class and sends the response. Unlike some other web development technologies, which compile their files each time when responding the client, the ASPX files are compiled only for the first time when accessed and are then re-used to reduce the response time. Developers can also choose to pre-compile their code before deployment, eliminating the need for just-in-time compilation in a live environment.
[edit] Other files
Other file extensions associated with ASP.NET include:
- ASCX - custom controls to be placed onto web pages.
- ASMX - web service pages.
- ASHX - custom HTTP handlers
- MASTER - master pages
- SITEMAP - sitemap configuration files
- SKIN - theme skin files
[edit] Advantages of ASP.NET over ASP
- Compiled code means applications run faster with more design-time errors trapped at the development stage.
- Significantly improved run-time error handling, making use of exceptions and try-catch blocks.
- User-defined controls allow commonly used templates, such as menus.
- Similar metaphors to Windows applications such as controls and events, which make development of rich user interfaces, previously only found on the desktop, possible.
- An extensive set of controls and class libraries allows the rapid building of applications.
- ASP.NET leverages the multi-language capabilities of the .NET CLR, allowing web pages to be coded in VB.NET, C#, J#, etc.
- Ability to cache the whole page or just parts of it to improve performance.
- Ability to use the "code-behind" development model to separate business logic from presentation.
- If an ASP.NET application leaks memory, the ASP.NET runtime unloads the AppDomain hosting the erring application and reloads the application in a new AppDomain.
- Session state in ASP.NET can be saved in a SQL Server database or in a separate process running on the same machine as the web server or on a different machine. That way session values are not lost when the web server is reset or the ASP.NET worker process is recycled.
- Previous versions of ASP.NET (1.0 and 1.1) were criticized for their lack of standards compliance. The generated HTML and JavaScript sent to the client browser would not always validate against W3C/ECMA standards. In addition, the framework's browser detection feature sometimes incorrectly identified web browsers other than Microsoft's own Internet Explorer as "downlevel" and returned HTML/JavaScript to these clients that was crippled or broken. However, in version 2.0, all controls generate valid HTML 4.0, XHTML 1.0 (the default) or XHTML 1.1 output, depending on the site configuration. Detection of standards-compliant web browsers is more robust and support for Cascading Style Sheets is more extensive.
- ASP.NET 2.0 produces markup that passes W3C validation, but it is debatable as to whether this increases accessibility, one of the benefits of a semantic xhtml page + css representation. Several controls (eg. the Login controls, the Wizard control) use html tables for layout by default.
- Microsoft have now gone some way to solve this problem by releasing the ASP.NET 2.0 CSS Control Adapters, a free add-on that produces compliant accessible xhmtl+css markup.
[edit] Development tools
Several available software packages exist for developing ASP.NET applications:
- Visual Studio .NET
- Visual Studio 2005
- Visual Web Developer 2005 Express Edition (for ASP.NET 2.0)
- ASP.NET Web Matrix
- Macromedia Dreamweaver MX 2004
- Macromedia Dreamweaver 8
- Macromedia HomeSite 5.5 (For ASP Tags)
- Microsoft SharePoint Designer 12
- Delphi 2006
- SharpDevelop (Free/Open Source)
[edit] History
| Date | Version | Remarks | New features |
|---|---|---|---|
| January 16, 2002 | 1.0 | First version released together with Visual Studio .NET | |
| April 24, 2003 | 1.1 | released together with Windows Server 2003 released together with Visual Studio .NET 2003 |
|
| November 7, 2005 | 2.0 |
codename Whidbey |
|
[edit] ASP.NET Team Members
Various ASP.NET team members maintain blogs. Here are some of them:
- Scott Guthrie, General Manager - http://weblogs.asp.net/scottgu
- Nikhil Kothari, Architect - http://www.nikhilk.net
- Brian Goldfarb, Product Manager - http://blogs.msdn.com/bgold
- Shanku Niyogi, Product Unit Manager - http://www.shankun.com
- Bertrand Le Roy, Developer - http://weblogs.asp.net/bleroy
[edit] See also
- Active Server Pages (ASP) – ASP.NET's predecessor
- Yellow Screen of Death – ASP.NET's Exception page
- Java Server Faces (JSF) – web application technology with a similar component based approach for the Java plattform
[edit] Resources about ASP.NET
- Pro ASP.NET 2.0 in C# 2005, Matthew MacDonald, Apress, November 27, 2005. ISBN 1-59059-496-7
- ASP.NET 2.0 Unleashed, Stephen Walther, Sams Publishing, June 6, 2006. ISBN 0-672-32823-2
- Essential ASP.NET With Examples in C#, Fritz Onion, Addison-Wesley Professional, February 11, 2003. ISBN 0-201-76040-1
- Programming ASP.NET, Jessy Liberty & Dan Hurwitz, O'Reilly, October, 2005. ISBN 0-596-00916-8
[edit] External links
[edit] Microsoft
- Microsoft's ASP.NET website
- ASP.NET on MSDN
- CSS friendly ASP.NET 2.0 control adapters
- Visual Web Developer Express Edition 2005
- Microsoft Expression Web Designer (Standards-compliant css-based design)
- Webmatrix for ASP.NET
[edit] Other implementations
- Mono: An open source .NET Framework implementation that runs on many platforms
- UltiDev Cassini Web Server (publisher's link) Alternative to IIS - a free web server that can be redistributed with ASP.NET 1.1 and 2.0 applications
[edit] Tutorials
- My Code Bank: ASP.NET code examples
- DotNetSpace: ASP.NET and C# code examples and tutorials
- ASP.NET 2.0 Step by Step tutorials
- Developer Fusion; ASP.NET tutorials and source code
- W3Schools tutorial
- WWWCoder.com: ASP, ASP.NET, and DotNetNuke Tutorials
- 4GuysFromRolla.com: ASP and ASP.NET Tutorials
- LearnAsp.com ASP and ASP.net Lessons
- ASPAlliance: ASP and ASP.NET Tutorials
- ASP.NET Tutorials
- Startvbdotnet.com: ASP.NET Tutorials
- FAQ
- Chapter from Enhancing Microsoft Content Management Server with ASP.NET 2.0 book (PDF format)
- Asp.Net 2.0 Controls
- ASP.NET 2.0 Learning Guide from SearchVB.com
- ASP to ASP.NET Migration Learning Guide from SearchVB.com
- RussianGeek: .NET News & Favorite links
- Marking ASP.NET 2.0 Generated JavaScript as CDATA
- Serving the Correct MIME Type for XHTML using ASP.NET 2.0
[edit] Community sites
- Braintrove.com How to do things in ASP.NET
- needscripts.com ASP.NET Help
- Learn ASP From Basic To Advance Also Included Scripts and Examples
- ASP.NET Interview Questions
- Dot Net Junkies
- C# Friends: ASP.NET Tutorials, News and Forums
- ASP.NET Podcast
- Codebetter
- GotDotNet Europe
- Microsoft Interview Questions
- ASP.NET 2.0 Community
- ASP.NET 2.0 - Develop your own web accounting software
- developerfood.com ASP.NET components and controls on developerfood.comzh-min-nan:ASP.NET
cs:ASP.NET de:ASP.NET es:ASP.NET fr:ASP.NET it:ASP.NET he:ASP.NET hu:ASP.NET nl:ASP.NET pt:ASP.NET ro:ASP.NET ru:ASP.NET sv:ASP.NET th:ASP.NET zh:ASP.NET

