How a DotNet Program Execute ?

To understand how a DotNet program execution takes place we have to do the comparison between pre-Dotnet program execution with DotNet program execution. So before DotNet came into existence, we used to build the application using other programming languages like C++ or VB6. 

Let's, for example, build an application using VB6 and compile it using a language compiler then an assembly gets generated with .dll or .exe extension depending on the type of application. This assembly is in Native code or Machine code format. We have to do the compilation because our operating system doesn't understand high-level programming languages, they only understand binary code of 0s and 1s. So basically we deploy that assembly onto the system to get executed which is nothing but a native code. 

Now lets us understand what naive code means? Suppose you have Windows operating system and now you take the assembly which was compiled on the Windows operating system and try to run it on Linux or another operating system then it will give you an error because that code is native to only Windows operating system. That's why it is called Native code or Object code. This is the problem with the pre-DotNet application, they are not portable and we have to build different operating systems.

Now let's understand how a DotNet application executes. DotNet supports several programming languages like C#, VB, C++, etc. When you build a DotNet application using any of these languages and compile using the respective language compiler, we get an assembly here also but unlike pre-DotNet application, it does not contain native code, instead, it contains intermediate language. This is the main difference between a DotNet program and a Pre-DotNet program but your operating system cannot understand the intermediate language so we need a runtime environment name as CLR (Common Language Runtime) to convert the intermediate language to native code. 

Now the question is how does this CLR come in between to do this job? When we install DotNet on our system, we basically install two important components one is the DotNet framework class library and another one is CLR. This is like a heart for DotNet program execution. This CLR layer exists between Assembly and the Operating system. Within CLR there is a very important component named as JIT compiler which takes IL (Intermediate Language) as input and generates native code as the output for the Operating system. 

So the biggest advantage of the DotNet application is that is portable which means that the same code can run on any operating system with the help of CLR installed on that operating system. Another advantage of DotNet is that the runtime environment contains a garbage collector which will clean the object or memory that is not in use programmer doesn't have to worry much about memory management.

Note: The native code is not stored permanently anywhere after we close the program the native code is thrown away and when we execute the program again the native code will generate again. (alert-success)


 

ASP.NET Life Cycle.

ASP.NET is a server-side technology used for developing dynamic websites and web applications. It is the latest version of active server pages, active server pages is a server-side scripting language and engine used for developing web applications. It is essentially a web-based platform that helps to create a dynamic web-based platform that helps to create dynamic web pages for programmers. 

ASP.NET has some specific steps that are to be carried out for an application these steps are called Life Cycle.

ASP.NET Life Cycle is divided into two groups:

1. Application Life Cycle.

2. Page Life Cycle.

Application Life Cycle.

Application Start > Object Creation > HTTP Application > Dispose > Application End

  • Application start is a method that can be executed by the webserver when a user makes a request. 
  • The HTTP requests contain all the information about the current request, like cookies and browser information. 
  • An object helps to process each subsequent request sent to the application that is created by the web browser. 
  • Dispose is an event that can be called before the application is destroyed. This helps to release manually unmanaged resources. 
  • Application end is the final part of the application and this can help to unload the memory. 

Page Life Cycle.

ASP.NET web page life cycle has specific steps that are carried out during the execution. These phases include initialization, restoring, and execution. The important phases of the page life cycle are: 
  • Page Request: When the user requests a page, the server checks the request and then compiles the page and responds to the user. If the page is requested several times then the cache will check the request to see if the output exists or not and after that it will send a response back to the user. 
  • Page Start: In this phase, two steps are carried out request and response. The request holds all information that was sent when the page was requested and the response holds all the information which send back to the user. 
  • Page Initialization: In this phase, all the controls on the page are set and each has a particular ID, and themes are applied to the pages. 
  • Page Load: In this phase, all the controls properties are loaded, and information is set using view state and control state. 
  • Validation: Validation happens when the page execution goes successful and then it returns true else the execution fails and it returns false. 
  • Event Handling: Event handling happens in response to validation. In this case, the page is loaded again and displays the same information so the postback event handler is called in order to overcome this problem. This event helps in checking the credentials of the user.
  • Rendering: Rendering occurs before all the response information is sent to the user. It also stores all the information sent to the user. 
  • Unload: Unload phase helps to clean all the unwanted information, it also cleans the memory once the output is sent to the user. 

What is ASP.NET? Introduction to ASP.NET



Many questions come to our mind while building an application and all we think about is the speed, cost, and language. And ASP.NET is one of the best choices for building any application. 

Why use ASP.NET?

For building Web application ASP.NET is much easier compared to other technology like PHP and Node.js. It is much faster much efficient than many other languages. ASP.NET allows you to build many applications like REST API and Web pages. It takes less time for execution and execution takes place only once. 

What is ASP.NET?

ASP.NET is server-side technology used for developing dynamic Web applications. It was released in 2022 and had an extension of .aspx. It produces interactive, data-driven Web applications on the internet. It is developed by Microsoft and it is mainly used to develop websites and web applications. ASP.NET is the latest version of active server pages which Microsoft developers to build a website. 

The architecture of ASP.NET.

ASP.NET architecture help in increasing performance, stability, and flexibility. ASP.NET works on HTTP protocol and uses HTTP commands. First, ASP.NET request an HTML file from the server then IIS (Internet Information Services) passes that information to the ASP.NET engine, and after that ASP.NET engine read the file and execute the script. Then ASP.NET returns to the browser as an HTML file. 

Note: IIS is a powerful web server that provides a very reliable, scalable,  and manageable Web application Infrastructure. It lowers the system administration costs, which helps organizations to increase Website and application availability. 

Components of ASP.NET.

  • Language: This can help in developing the web application. Some of them are VB.net and C#.
  • Library: It is a prewritten class and coded template that a developer can use while developing an application. The most common library used in ASP.NET is the web library. 
  • Common Language Runtime: This is the platform that is used to execute the program. It is also use for performing activities like Garbage Collection. 
Skills required to Master ASP.NET.
  • Basic of C#, JavaScript, HTML.
  • Knownledge of ASP.NET MVC.
  • Good Knowledge of OOPs
  • Web Development.
Benefits of ASP.NET.
  • High Performance. 
  • Secure
  • Multiple Development modes.
  • Language Independent.
  • Globalization and Localization. 

DON'T MISS

Nature, Health, Fitness
© all rights reserved
made with by templateszoo