Read notes (1)

Source: Internet
Author: User

Recently, the library borrowed this book and immediately attracted it. Therefore, we decided to save the good things we found during reading for future memories or reference by others.

 

Currently,. Net labels mainly refer:

1. NET Framework, released in 2002, including Common Language Runtime (CLR) and. NET Framework class library (FCL ). CLR provides standard infrastructure for building applications. FCL provides a bunch of standard classes and other types for developers to call.

2. Visual Studio. the integrated development environment (IDE) of the. NET Framework application. The Supported languages include C #, VB, C ++, and J #. (J # is not supported in vs2008)

PS :. net in the early years (2000), it was full of Microsoft products: SQL Server, BizTalk Server ,. net my services (seems to have been scrapped), and even rumors that windows will be released at some time in the future. net & office. net.

 

CTS in CLR provides a set of common data types:

INTEGER (integers), string (string), Class, interface )..... And inheritance mechanisms. However, there is no specific limit on the syntax. There are also some basic services:

The garbage collector (GC) Automatically releases hosted objects that are no longer referenced.

Standard Format of metadata (metadata). Information of each type is stored in the compiled code of this type.

Assemblies is used to organize the general format of compiled code.

The C-producer's compiler is csc.exe, Vbis vbc.exe, and C ++/cliis cl.exe.

They are usually located in the c: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ directory,

First, use their corresponding compiler to compile the source code into msil and metadata, and put them together. Before running the program, compile the machine code that the CPU can recognize with the JIT compiler. By default, every method in each application is compiled when it is called for the first time.

FCL includes the following

Asp.net: An application used to create a basic browser.

Windows Forms: used to create a Windows Graphical User Interface Program.

Web Services: used to create applications that use WebServices to communicate with other applications.

Enterprise Services: Provides distributed transactions, object instance control, and other services that can build reliable and scalable applications.

Ado. Net: centralized access to data in relational databases.

There are also other mechanisms including security services, processing XML documents, and interoperability with old Windows applications...

. NET is compared with the Java platform, but it only corresponds to items with no specific parameters

Asp.net vs JSP, winforms vs swing, Web Services vs Jax-WS, Enterprise Services vs EJB, ado.net vs JDBC, C # vs Java

Of course, Java is cross-platform and has better portability, but it is also weaker than the system, which I cannot tell.

. NET is focused on Windows systems. Although the famous. NET platform's "non-Microsoft production" Mono Project can also be cross-platform, it is not a first choice for enterprises.

 

Chapter 2

The CLR defines a type called the general type System (CTS). Each type in the CTS is not a value type or a reference type ).

Value types (INT char double byte struct) are inherited from valuetype, while valuetype is inherited from system. object.

The reference type (class interface String Array) is directly inherited from the object.

To understand the differences between value types and reference types, we must first understand how they are allocated to the memory. In fact, there are two main allocation methods: Stack and heap)

An int I = 4 is declared in the add () method. The variable is allocated to an address (such as 0x0006f) in the stack only when the add () method is called, when the add () method ends, the address is automatically released (I think this is not a GC Task ).

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.