Microsoft. NET Framework FAQ (i)

Source: Internet
Author: User
Tags compact contains exception handling execution require web services visual studio advantage
Microsoft. NET Framework FAQ
Microsoft Corporation

Conceptual issues
What is. NET?
Simply put, Microsoft®.net is a strategy for Microsoft to deliver software in a service manner. For complete information, see the White Paper on this topic.

The following is a summary of the white paper that briefly describes the key elements of. NET:

Microsoft. NET Platform
Includes the. NET infrastructure and tools for creating and manipulating the next generation of services, the. NET user experience for implementing a multiple-information client, and the. NET Building block service and. NET device software for enabling a new generation of smart Internet devices.


Microsoft. NET Products and Services
Includes microsoft®windows.net (its core integrates a set of building block services), Msn.net, personal subscription services, Microsoft®office.net, Microsoft®visual Studio.NET, and Microsoft®bcentral™for. NET.


Third-party. NET Services
Partners and developers in many areas have the opportunity to provide enterprise and vertical services on the. NET platform.
This issue is for the. NET Framework. The. NET Framework is part of the. NET platform infrastructure. For more information about the. NET framework, see the next question.



What is a. NET framework?
The. NET framework is an environment for creating, deploying, and running WEB services and other applications. It consists of three main sections: the common language runtime, the framework class, and the asp.net.

Does the. NET framework apply only to users who create Web sites?
The. NET Framework enables you to create excellent WEB applications. But it can also help you create a variety of applications today. Compared to the way the application is currently created,. NET has a greater advantage in writing any Windows software (using atl/com, MFC, microsoft®visual basic®, or Standard microsoft®win32®). Of course, if you are developing a Web site, starting with asp.net, you will feel the power of the. NET Framework.

Where can I get the. NET Framework SDK?
You can now download the Beta 1 version of the. NET framework SDK from the MSDN Online Downloads (English). Given its size, we offer this beta release in a variety of ways: as a download file (in MB), as a 11-part download, or to order its CDs from the Microsoft Developer Store:

United States/Canada (English)


International (English)

Which platforms can the. NET framework run on?
Beta version 1 can run on microsoft®windows®2000, Windows 95/98/me, and Windows nt®4.0.

In addition, there is a. NET Framework version called the. NET Compact Framework. It is used to make devices such as cellular phones and enhanced televisions also have some features of the. NET Framework. The. NET Compact Framework will run on Windows CE and other embedded operating systems.

What programming languages are supported by the. NET framework?
The. NET Framework is independent of the programming language. In fact, any language can support the. NET Framework. Currently, you can create. NET programs in many languages, including the latest language--c# for C + +, Microsoft®visual Basic.NET, jscript®, and Microsoft. Later, there will also be a large number of Third-party languages that can be used to create. NET framework applications, including COBOL, Eiffel, Perl, Python, Smalltalk, and so on.

What is the relationship between the. NET Framework and COM + services?
In the. NET framework, not only do you have full access to COM + services, but it is also easier to create service components.

The. NET framework component can be added to a COM + application. In COM + applications,. NET Framework components can take advantage of automated Component Services, such as transactions, object pooling, queued components, events, and so on.

What is the relationship between the. NET framework and DCOM?
DCOM is a COM infrastructure for interprocess communication. The. NET Framework supports a large number of pluggable channels and formatters for interprocess communication. When converting between managed and unmanaged code, the. NET Framework uses the COM infrastructure, especially DCOM. All scenarios using COM + services use managed to unmanaged transformations, so DCOM is used by default. The. NET Framework also supports SOAP (Simple Object Access Protocol) for interprocess communication that focuses on interoperability.

is the. NET framework just the new name for Windows DNA?
No. Windows DNA is an architecture for creating tightly coupled distributed Web applications. Because distributed applications are becoming more loosely coupled, Microsoft has developed the architecture in. NET Frameworks. The. NET Framework is part of the. NET architecture.

Run-time technical issues
Terms
What is the common language runtime (CLR)?
The common language runtime is the execution engine for the. NET Framework application.

It offers a number of services, including:

Code management (load and execute)


Application Memory Isolation


Type-safe authentication


IL to native code conversion


Meta-data (enhanced type information) access


Managing memory for Managed objects


Enforcing Code access security


Exception handling, including cross language exceptions


Interoperability between managed code, COM objects, and existing DLLs (unmanaged code and data)


Auto-layout of objects


Support for developer Services (configuration, debugging, etc.)

What is the common type system (CTS)?
A common type system is a multiple-information type system that is built into the common language runtime to support types and operations in most programming languages. The common type system supports the full implementation of a large number of programming languages.

What is the common Language specification (CLS)?
The common language specification is a set of structures and constraints that serve as a guide for library writers and compiler authors. It makes it possible for any language that supports the CLS to fully use the library, and makes these languages integrated with one another. The common language specification is a subset of the common type System. The common language specification is also important for application developers who need to write code for use by other developers. Developers who follow CLS rules to design public access APIs can easily use these APIs in any other programming language that supports the common language runtime.

What is Microsoft Intermediate language (MSIL)?
MSIL is a CPU-independent instruction set. The. NET Framework program is compiled into MSIL. It contains instructions for loading, storing, initializing, and invoking object methods.

Combined with metadata and common type systems, MSIL allows true cross-language integration.

The MSIL is converted to machine code before execution, not as it is interpreted while executing.

What is managed code and managed data?
Managed code is code that is written to support the common language runtime services (see "What is the common language runtime?"). ”)。 To support these services, the code must provide the minimum level of information (metadata) to the runtime. By default, all C #, Visual Basic.NET, and JScript.NET code are managed code. Visual Studio.NET C + + code is not managed code by default, but the compiler can also generate managed code by specifying a command-line switch (/clr).

Closely related to managed code is managed data. Managed data is data that is allocated and released by the common language runtime's garbage collector. By default, C #, Visual Basic, and JScript.NET data are managed data. However, by using special keywords, C # data can be marked as unmanaged data. Visual Studio.NET C + + data is unmanaged data by default (even when the/clr switch is used), but when using Managed Extensions for C + +, you can use the "__gc" keyword to mark a class as a managed class. As the name suggests, it indicates that the memory of the class instance is managed by the garbage collector. In addition, the class is fully a member of the. NET framework, along with the benefits and limitations it brings. An example of the benefit is that it can interoperate correctly with classes written in other languages (such as managed C + + classes can inherit from the Visual Basic Class); one example of a constraint is that a managed class can inherit only from one base class.

Assembly
What is an assembly?
An assembly is the main building block of a. NET Framework application. It is a collection of features that are created, identified, and deployed as a single implementation unit (containing one or more files). All managed types and resources can be marked for access only within their implementation units, or are marked as accessible by code outside the cell.

Assemblies are used to illustrate themselves by listing. Checklists are an integral part of each assembly. Listing:

Establishes an assembly identity (in the form of a text name), version, category, and digital signature (if you want to share the assembly between applications).


Defines the files that make up an assembly implementation (hash by name and file).


Specifies the types and resources that make up the assembly, including which are exported from the assembly.


Records the dependencies of other assemblies at compile time.


Specifies the set of permissions that the assembly needs to run correctly.
This information is used at run time to resolve references, enforce version binding policies, and verify the integrity of the assemblies that are loaded. Because each type is loaded into the context of the Assembly, the runtime can determine and locate the assembly of any running object. Assemblies are also units that have code access security permissions applied to them. The identity evidence for each assembly is considered independent when determining what permissions are granted to the code it contains.

The self-explanatory features of the Assembly also contribute to the implementation of no impact installations and XCOPY deployments.

What are private assemblies and shared assemblies?
A private assembly is used only by a single application and is stored in the installation directory of that application (or in its subdirectories). A shared assembly is an assembly that can be referenced by multiple applications. To share an assembly, the Assembly must be explicitly created for this purpose, which can be achieved by assigning it an enhanced name for encryption, which is used as the share name. Instead, the private assembly name requires only that it be unique in the application in which it is used.

By distinguishing between dedicated and shared assemblies, we introduce the key points for explicitly deciding on sharing. Simply deploying a private assembly in the application directory ensures that the application runs only in the part where it is created and deployed. References to private assemblies are parsed only within the private application directory.

There are several reasons to choose to create and use shared assemblies, such as the ability to express version policies. The fact that the shared Assembly has an encrypted, enhanced name means that only the author of the Assembly has the key to generate a new version of the assembly. Therefore, if you make a policy statement and you want to accept a new version of the assembly, you can be confident that the version update will be controlled and validated by the author. Otherwise, you will not accept them.

For applications installed locally, shared assemblies are typically explicitly installed in the global assembly cache (the local cache of the assembly is maintained by the. NET Framework). The key to the version management features of the. NET Framework is that the downloaded code does not affect the execution of locally installed applications. The downloaded code is placed in a special download cache, and even if some of the download components are compiled into shared assemblies, the code cannot be used globally on the machine.

Classes that are published with the. NET framework are compiled into shared assemblies.

If I want to create a shared assembly, do I need additional overhead in tagging and managing key pairs?
Creating a shared assembly does involve work on encryption keys. When you create an assembly, only the public key is necessary. Compilers that support the. NET Framework provide command-line options (or use custom attributes) to provide a public key when the assembly is created. Typically, a common public key is kept in the resource database and the compilation script points to the key. Before the assembly is published, it must be fully marked with the appropriate private key. This is done through the SDK tool SN.exe (enhanced name).

Enhanced name tags do not require the use of certificates as Authenticode. It does not involve third-party organizations, does not require payment, and is not subject to certificate constraints. Additionally, the extra overhead of validating an enhanced name is much less than the cost of validating Authenticode. However, an enhanced name does not generate any statements that trust a publisher. Enhanced names allow you to be sure that the contents of a given assembly are not tampered with, and that the assembly that you load at run time comes from the publisher that you are developing against. However, it does not generate statements about whether to trust publisher identity.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.