Archive for the ‘ASP Hosting’ Category

Principles of ASP.NET | Part 2

Tuesday, February 9th, 2010

Strengths of ASP.NET compared to ASP

The wide range of web controls, web classes, and development tools can significantly minimize the development time of software modules, and allows the web developer to easily reuse the same program codes in different applications. ASP.NET has also made significantly easier the capabilities of data access as compared to the older ASP. For example, it is much easier and faster to generate a web page that contains a list of front-end (at the end-user’s side) data retrieved from a back-end (on the web server) database.

Other advantages of ASP.NET are:

  • The pre-compiled program code enables the web applications to run much faster, with the capability of more programming errors to be detected and eliminated during the development stage, and allows the programmer to deploy the web application without actually having to attach the source code.
  • The web controls now allow the web programmer to easily use many user-defined controls which are routinely required by the end-users, for example, website’s menus.
  • The additional web components do not need to be registered on the back-end web server from the operating console, but now are easily initialized at run-time of the application. This enables the clients to load libraries on the web server without asking the web host to assist them in registering them.
  • ASP.NET can now inherit all privileges on the file system.
  • The affinity with the style and feel of Windows application programming makes the transition from one program to another more intuitive for programmers.
  • The availability of a set of controls and the class libraries allows the faster development and deployment of good web applications rich with better looking and performing web controls and program code.
  • The ability to perform a cache of entire pages, or part of the pages, or the application data greatly enhances the overall performance of the website.
  • If an ASP.NET fails to allocate the memory it needs (called the memory leakage), it can download the form from the memory which contains the entire runtime environment and control the problem. The Framework .NET provides the ‘AppDomain’ class to perform all these operations, loading / unloading, and other such operations that relate to the web application.
  • The ASP.NET session can be saved to a SQL server database or can be saved in a separate process residing on the same machine as the web server. The data and the properties of the session are preserved and are not lost when the Internet Information Services (IIS) is reset, or when the active process of ASP.NET is recycled.
  • Using Visual Studio .NET and IIS Server, the web programmer can debug the server-side by using the same tools used in most other development environments.
  • The capacity of the platform .NET CLR supports many languages, which allows the web programmers to write code to Web pages in VB.NET, C #, J #, etc.

Critical to ASP.NET:

ASP and ASP.NET can run together in the same web application. This approach allows developers to migrate from one environment to another gradually rather than using them all at once. With the IIS 6.0 and earlier versions, the web pages were written using earlier versions of the ASP framework, which cannot share the same session without the use of third-party libraries. This limitation does not exist now in ASP.NET, and the ASP applications that run together under IIS 7.

In some instances, at runtime the ASP.NET recycles the active process, resulting in re-employment of more than 60% of available memory. The web programmer can configure it effectively so that the recycling takes place only after a certain number of requests and after a certain amount of time, etc.

However in doing so, the user can lose the status of the current session. If your application uses session state to load the authentication information (which is not recommended as the cookie-based authentication and membership is an option already built into the framework), and if the application is configured to use sessions in process then the user can be disconnected if the process is recycled.

Study: From Wikipedia, the free encyclopedia. The text is available under the Creative Commons.

Principles of ASP.NET | Part 1

Tuesday, February 9th, 2010

Microsoft ASP.NET

Microsoft initially developed the old Active Server pages (ASP) web technology, from which the present ASP.NET was derived. Although ASP name is common in both these web technologies, they widely differ in their basic and advanced usage. ASP.NET is developed with the Dot NET family applications technology and is based on the .NET platform. This is also called the Common Language Runtime, or the Common Runtime Language (CLR).

Web developers can now more comfortably write easier web programming codes by implementing any of the high-level languages which are supported by the .NET Framework (also called the class library) .NET. For example, they can use the Visual Basic .NET (created by Microsoft), or use the C # (which is pronounced as ‘C Sharp’), or use the J # (also called the ‘J Sharp’, a programming language that is developed from Java platform).

The web programmers now can also use many other open source languages (OSL) and other web development and programming languages such as Perl and Python. This has become possible due to the CLR, which has now being standardized by ECMA International. ASP.NET applications are comparatively much faster and are more performance-oriented than those applications created by using other scripting technologies. This is because of the fact that the entire program code of the website is enclosed within a few ‘dll’ files or within a single file and is managed from a Web server.

ASP.NET is chiefly used to make the migration of programs from Windows applications to web applications much simpler. This enables the web programmers to build web pages which contain various web controls and the other web widgets, which are similar to those used by the user interface of Windows.

A web control, such as a web button or web label acts much like their Windows counterparts: the program code associated with them gives them certain properties and perform actions in response to events associated with them (for example, the push of a button triggers a certain clicked event in the Windows environment). The difference between these two though is that while Windows checks and draws these controls on the computer’s screen, the web controls produce blocks of HTML codes through which web pages are automatically inserted in the web browser on the end user’s computer.

Programming paradigm of ASP.NET

ASP.NET is designed to encourage development in a systematic way to use the paradigm of the graphical interface (GUI, for Graphical User Interface) combined with the so called events (event-driven) that is the style of programming where various blocks of code are executed in response to certain events, or actions, at the controls with graphic representation on the desktop.

The conventional style of language for developing web applications had so far based on technique instead of scripting. The library classes .NET Framework will also propose to combine and interact with existing technologies such as Javascript, so as to give a character of permanence to software objects, even in an environment like the Web, which is inherently stateless (stateless server).

The class library .NET Framework, implements the structure of the CLR (Common Language Runtime), whose base is formed by a JIT compiler (just in time). This means that the code intermediate product, called IL (Intermediate Language) and identical for all high-level languages used, is compiled into machine language for the first run. Using different compilers just in time you can reuse the same intermediate IL on different processors. This technique is referred to as ‘Jitting’. This type of filling is very different from languages such as Java, where all code runs on the other hand a true virtual machine, while in .NET at the time the program is actually a machine language like all other languages.

Like all the other languages of the suite .NET, ASP.NET also uses the mechanism of automatic memory de-allocated called garbage collector.

Continued…

What is Active Server Pages | ASP

Saturday, December 12th, 2009

What is “Active Server Pages” (ASP)?

Active Server Pages (ASP) is developed by Microsoft.  It is a software package that creates dynamic websites and is used in Web programming. It competes with PHP. To run ASP, it needs a Windows platform with Internet Information Services (IIS) installed, or needs a Linux or Unix platform which has a specially modified version of Apache.

ASP consists of objects accessible by VBScript and Jscript, which are two major web programming languages. It can also be used with other programming languages like PerlScript, the REXX, or Python adding the motor interpretation of language appropriate to IIS.

Active Server Pages (ASP) is a Microsoft-developed SSI successor technology with the server-generated Web pages. Initially, in 1996, only the web server Internet Information Services (IIS) was able to interpret ASP. At present, Microsoft is not developing ASP.

ASP.NET is the new technology that has replaced ASP after the release of ASP. NET Framework in 2002. Since then, ASP is known as the “Classic ASP”.

The ASP syntax has 7 objects that can be manipulated: Objects Request, Response, Server, ObjectContext, Application, and Session Error. The chief objectives of these objects are as follows:

  • The Request object can interpret any objects that are returned to it by the client browser, such as Cookies, Forms, etc.
  • Request.Form reads the data sent by Post.
  • Request.QueryString gets the data.
  • The Response object sends information to the client, in form of text in a page or writing cookies to the client browser.
  • Object Server helps in creating and managing connections to databases (which is also called ADO) to help open XML files, Word and Excel files, etc.
  • ObjectContext monitors all transactions with the help of Microsoft Transaction Server.
  • The Application object stores global variables to monitor the site’s visitors
  • The Session object also stores variables, but these are accessible only to a single visitor.
  • The Error object allows the error handling.

The ASP uses the COM (Component Object Model, also known as ActiveX) system. With this system, it can communicate with the server machine resources and then returns the HTML to the client using the protocol HTTP (HyperText Transfer Protocol).

The ASP can connect to databases. It can also read the XML files and has components for the upload management, FTP, etc. If Microsoft Office is installed on the server, it can also read and write documents from Office (Excel, Word, and other MS Office applications) using the COM system.

The COM technology can also be used by other programming languages such as PHP, and if they are present on a Windows-based web server where the Microsoft Office products are installed.