Information AboutAsp.net |
| CATEGORIES ABOUT ASP.NET | |
| .net framework | |
| .net programming languages | |
| template engines | |
| world wide web | |
| web application frameworks | |
| microsoft apis | |
|
ASP.NET is a Web Application Framework marketed by Microsoft that Programmer s can use to build dynamic Web Site s, Web Application s and XML Web Service s. It is part of Microsoft's .NET Platform and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime , meaning programmers can write ASP.NET code using any Microsoft .NET Language . CHARACTERISTICS ASPX file format ASPX is a text file format used to create Webform pages; in programming jargon, the ASPX file typically contains static HTML or XHTML markup, as well as markup defining Web Controls and Web User Controls where the developers place all the required static and dynamic content for the web page. Additionally, dynamic code which runs on the server can be placed in a page within a block ''' ''' which is similar to other web development technologies such as PHP , JSP , and ASP , but this practice is generally frowned upon by Microsoft except for the purposes of Data Binding since it requires more calls when rendering the page.The method recommended by Microsoft for dealing with dynamic program code is to use the Code-behind model, which places this code in a separate file or in a specially designated script tag. Code-behind files are typically named something to the effect of ''MyPage.aspx.cs'' or ''MyPage.aspx.vb'' based on the ASPX file name (this practice is automatic in Microsoft Visual Studio and other IDEs ). When using this style of programming, the developer writes code to respond to different events, like the page being loaded, or a control being clicked, rather than a procedural walk through the document. Rendering technique ASP.NET uses a ''visited composites'' rendering technique. During compilation the template (.aspx) file is compiled into initialization code which will build a control tree (the composite) representing the original (static) template. Literal text goes into instances of the Literal control class, server controls are represented by instances of a specific control class. The initialization code is combined with user-written code (usually by the assembly of multiple partial classes) and results in a class specific for the page. The page doubles as the root of the control tree. Actual requests for the page are processed through a number of steps. First, during the initialization steps, an instance of the page class is created and the initialization code is executed. This produces the initial control tree which is now typically manipulated by the methods of the page in the following steps. As each node in the tree is a control represented as an instance of a class, the code may change the tree structure as well as manipulate the properties/methods of the individual nodes. Finally, during the rendering step a visitor is used to visit every node in the tree, asking each node to render itself using the methods of the visitor. After the request has been processed, the instance of the page class is discarded and with it the entire control tree. Other files Other file extensions associated with different versions of ASP.NET include: ; asax : Global.asax , used for application-level logic and event handlinghttp://msdn2.microsoft.com/en-us/library/2027ewzw.aspx ; ascx : Web UserControls: custom Controls to be placed onto web pages. ; ashx : custom HTTP handlers ; asmx : Web Service pages. ; axd : when enabled in Web.config requesting trace.axd outputs application-level tracing. Also used for the special webresource axd handler which allows control/component developers to package a component/control complete with images, script, css etc. for deployment in a single file (an 'assembly') ; browser : browser capabilities files stored in XML format; introduced in version 3.0. ASP.NET 2 includes many of these by default, to support common web browsers. These specify which browsers have which capabilities, so that ASP.NET 2 can automatically customize and optimize its output accordingly. Special .browser files are available for free download to handle, for instance, the W3C Validator, so that it properly shows standards-compliant pages as being standards-compliant. Replaces the harder-to-use BrowserCaps section that was in Machine.config and could be overridden in Web.config in ASP.NET 1.x. ; config : Web.config is the only file in a specific Web application to use this extension by default ( Machine.config similarly affects the entire Web server and all applications on it), however ASP.NET provides facilities to create and consume other config files. These are stored in XML format, so as to allow configuration changes to be made with simplicity. ; cs/vb : In ASP.NET 2 any cs/vb files placed inside the App_Code folder are dynamically compiled and available to the whole application. ; master : Master Pages ; introduced in version 2.0 ; sitemap : sitemap configuration files ; skin : theme skin files. ; resx : resource files for Internationalization and Localization . Resource files can be global (e.g. messages) or "local" which means specific for a single aspx or '''ascx''' or file. Directory structure In general the ASP.NET developer is free to create his/her own directory structure. Apart from a few reserved directory names the site can span any number of directories. The structure is typically reflected directly in the urls. Although ASP.NET provides means for intercepting the request at any point during processing, the developer is not forced to funnel requests through a central application or front controller. The special directory names are: ; App_Browsers : holds site-specific browser definition files. ; App_Code : This is the "raw code" directory. The ASP.NET server will automatically compile files (and subdirectories) in this folder into an assembly which is accessible in the code of every page of the site. App_Code will typically be used for data access abstraction code, model code and business code. Also any site-specific http handlers and modules and web service implementation go in this directory. As an alternative to using App_Code the developer may opt to provide a separate assembly with precompiled code. ; App_Data : default directory for Database s, such as Access mdb files and SQL Server mdf files. This directory is usually the only one with write access for the application. ; App_LocalResources : Contains localized resource files for individual pages of the site. E.g. a file called CheckOut.aspx.fr-FR.resx holds localized resources for the french version of the CheckOut.aspx page. When the UI culture is set to french, ASP.NET will automatically find and use this file for localization. ; App_GlobalResources : Holds resx files with localized resources available to every page of the site. This is where the ASP.NET developer will typically store localized messages etc. which are used on more than one page. ; App_Themes : holds alternative themes of the site. ; App_WebReferences : holds discovery files and WSDL files for references to Web Service s to be consumed in the site. PERFORMANCE ASP.NET aims for performance benefits over other script-based technologies (including ASP Classic) by compiling the server-side code to one or more DLL File s on the Web Server . This compilation happens automatically the first time a page is requested (which means the developer need not perform a separate compilation step for pages). This feature provides the ease of development offered by scripting languages with the performance benefits of a compiled binary. However, the compilation might cause a noticeable delay to the web user when the newly-edited page is first requested from the web server. The ASPX and other resource files are placed in a virtual host on an Internet Information Services (or other compatible ASP.NET servers; see Other Implementations, below). The first time a client requests a page, the .NET framework parses and compiles the file(s) into a .NET assembly and sends the response; subsequent requests are served from the dll files. By default ASP.NET will compile the entire site in batches of 1000 files upon first request. If the compilation delay is causing problems, the batch size or the compilation strategy may be tweaked. Developers can also choose to pre-compile their code before deployment, eliminating the need for just-in-time compilation in a production environment. ASP.NET COMPARED TO ASP CLASSIC ASP.NET attempts to simplify developers' transition from 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 ( Event-driven GUI model), 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. Other differences compared to ASP classic are:
CRITICISMS OF ASP.NET | ||
|   | { Class | "wikitable" |
|
|