What is .Net? What does it mainly include? This article summarizes some common issues with .NET. Although it is relatively early and the .NET platform has developed rapidly in the past few years, the concepts introduced in this article have basically remained unchanged.
This article summarizes some common questions and answers about .NET. These .NET frequently asked questions will be helpful to readers who want to understand the overall concept of .NET.
1. What is .Net? What does it mainly include?
.Net is a new generation computing and communication platform built to simplify application development in the highly distributed environment of the third generation Internet. It is based on open Internet standards and protocols and achieves high interactivity with heterogeneous languages and platforms.
.Net mainly includes Common Language Runtime and .Net architecture class library.
2. What are the main advantages of Net?
The main advantages of .Net are cross-language, cross-platform, security, and support for open Internet standards and protocols.
.Net supports interoperability in multiple languages, that is, components developed in one language can be reused in another component through object-oriented inheritance. Currently, .Net supports more than 20 languages.
.Net realizes the interoperability of objects under heterogeneous platforms by first compiling each language into an intermediate language (IL), and then using a just-in-time (Just In Time) compiler to compile it into local platform code during execution. Currently, .Net supports Platform support for Windows, Linux and Unix is under development.
.Net implements resource objects and type safety through the Common Language Runtime.
.Net provides a programming interface for obtaining remote services, connecting remote devices, and interacting with remote applications in heterogeneous network environments through strong support for Internet standards such as HTTP, XML, SOAP, and WSDL.
3. What does the Common Language Runtime in .Net mean? Where does it fit in .Net?
CLR (Common Language Runtime) common language runtime is the foundation of the entire .net framework and is the key to realizing the core features of .Net such as cross-platform, cross-language, and code security. It is actually a piece of agent code that resides in memory and is responsible for code management during the entire execution of .net. Typical examples include: memory management, thread management, remote management, code mandatory security type, etc. These can be called the lifeline of .net framework. In fact, the ordinary language runtime delegates part of the management functions of the operating system.
4. What is the Net architecture class library? What does it include?
The .Netl architecture class library is built based on the object-oriented features of the runtime and is a collection of reusable classes that are tightly integrated with the ordinary language runtime. It greatly simplifies software development and is easy to integrate seamlessly with third-party components.
The .Net architecture class library mainly includes support for the following programming models:
1. Console application.
2. Scripts and host applications.
3. Windows Forms application (Windows desktop GUI application).
4. ASP.Net application.
5. Web Services applications.
6. Windows service program
5. What are the development languages supported by .Net? What does the interoperability of .Net language mean?
.Net claims to support more than 20 languages on the market, but currently only C#, Visual Basic.Net, Managed C++, and Jsript are officially released by Microsoft. Other manufacturers claim that supporting tools under development include COBOL, Eiffel, Perl, Smalltalk, and Python. .
The interoperability of the .Net language refers to the support for object inheritance in languages that follow the Common Language Runtime specification, that is, classes developed under the .Net platform in one language can be reused in another language. This is achieved through something called Microsoft Intermediate Language MIL, that is, the language compiler first compiles the language into Microsoft Intermediate Language, and then compiles native code under the corresponding platform. All this is done under the specifications of ordinary language runtime.
6. What platforms does Net support? How well is its cross-platform implementation?
The platforms currently supporting .Net include Windows 2000, NT4 SP6a, Windows Me and Windows 98. The platforms it claims to support include Unix, Linux, etc. There are currently three projects developing the .Net platform under Linux: Ximian's Mono project, DotGNU and Potable .NET.
7. What is the relationship between .Net and COM? Does .Net mean the end of COM?
COM defines a binary standard for communication between component objects. .Net provides a similar mechanism through the component's built-in type system, which provides another way for this. .Net does not mean the end of COM, but it will greatly reduce developers' dependence on COM. .Net supports interoperability between COM and .Net components. In fact, you can obtain COM components in .Net through Runtime Callable Wrapper (RCW), and obtain .Net in COM through COM Callable Wrapper (CCW). components.
8. What is Intermediate Language (IL) in .Net? What role does it play in the .Net platform? Can developers program in Intermediate Language (IL)?
The intermediate language in .Net refers to a set of instructions that can be converted into local code through a just-in-time (Just In Time) compiler under the ordinary language runtime specification and is independent of the CPU. It is a core link in realizing language interoperability in the .Net platform. All .Net platform languages must first be compiled into intermediate language (IL). Programmers can also directly use intermediate language (IL) to program, but it is not recommended. Intermediate language is very helpful for understanding certain behaviors of .Net objects and debugging programs.
9. What is automatic garbage collection in .Net? What changes does it bring to programming under the .Net platform?
The .Net garbage collector is responsible for memory allocation and release tasks for the entire .Net runtime managed code. It selects the objects and time to collect through a certain optimization algorithm. Programmers can only perform immediate forced garbage collection when releasing a large number of managed resources. When releasing unmanaged resources, use the Finalize operation to process them. Those that need to be released while the program is running should implement the Dispose() method and make it clear. call. At other times, resource recycling is left to .Net garbage collection.
10. What does Net’s managed code and unmanaged code mean? What is the difference between their coding?
.Net's Managed Code refers to code that complies with the Common Language Runtime specification and is subject to runtime code agents in memory for memory management, thread management, remote management, and code-enforced security types. Unmanaged code refers to code that operates on unmanaged resources such as memory, files, databases, etc. They are usually not managed by runtime code agents and are unsafe. When programming managed code, you only need to focus on the programming logic, and the management of resources such as memory is left to the Common Language Runtime. However, when programming unmanaged code, developers must carefully take care of each aspect. Allocating and reclaiming unmanaged resources.
I hope that after reading the above ten .NET frequently asked questions, you will enhance your understanding of the .NET platform.
This article comes from the CSDN blog. Please indicate the source when reprinting: http://blog.csdn.net/thy822/archive/2009/12/23/5061127.aspx
-