Visual Studio 11 Development Guide (7) Improvements to net 4.5

Source: Internet
Author: User
Performance

For. NET Framework 4.5, A lot of effort has been made to improve the performance of the existing Code, both in improving the performance of the existing code and writing the code faster, more flexible, and more scalable,

The Development Team of the Common Language Runtime Library (CLR) is very concerned with improving the performance of the Runtime Library environment. With introduction to background server Garbage Collector and multi-core background JIT compilation and Optimization Configuration, hosted applications (especially on servers) can now be started faster and have higher performance, the operation is smoother and the latency is reduced.

Performance Improvement surpasses the runtime execution environment. For example, the Core Components in the framework are overwritten internally to provide improved performance in main scenarios. For example. the stream class in. Net exists in the center of most I/O-related operations. It is very common to use stream for asynchronous read/write. net 4.5 is much less. Another example is that the project control in WPF is faster when processing certain types of data.

In this release, this stream job is a part of asynchronous. C # and Visual Basic extend their support for first-class languages when writing asynchronous code. This support is not limited to languages and is added to the. NET Framework library. The new task-based API is also added to the framework, including the Bcl type throughout the network and Web Service heap, and added to the system. XML and system. data library, and more.

 

Network

Few independent applications can be seen today, that is, applications that do not need to communicate in some way .. Net has always had a rich set of high-quality network programming libraries, which are useful for low-level socket-based programming and advanced communication through network services .. Net 4.5 provides fundamental support for the development of more and more interconnected applications. Although there are many interesting network-related improvements in. Net 4.5, the three most representative ones are introduced here.

Websocket is a new two-way communication protocol that supports low-latency communication between the client and the server. This is great for interactive applications, such as online games, which will benefit from the "pushing" of servers and clients. net 4.5 is also included in ASP.. NET and websockets support in WCF .. Net released a new httpclient class, which allows clients and servers to use existing network APIs more easily and effectively.

Integration of tasks and WCF. With the previously mentioned language support, asynchronous APIs that span the framework are made public through tasks. In addition to the APIS contained in. net, there are APIs generated through Visual Studio. By add service reference... The wcf network service terminal created in the dialog box is an important part of this type of API. In previous releases, this tool is generated only during synchronization operations by default. You can use the advanced configuration dialog box to select public asynchronous operations. Currently, in the Visual Studio 11 Developer Preview version, by default, the tool not only generates asynchronous operations, but also uses the task-based asynchronous mode.

This means that all the network services you add services to reference will immediately support the waiting Asynchronous Method. Here is an example of using one of the generated proxies for asynchronous calls to search for Bing:

 

Interoperability

The framework itself only contains one of the library sets used by your application. Without this concept, the improvements to the. NET Framework are incomplete. In addition to all the libraries in the. NET Framework on which you are dependent, you can also use self-created or third-party libraries. For a long time, many libraries used in your applications are simply encapsulated at the top of the operating system features exposed by windows, such as accessing the file system and accessing audio and video hardware. Since the first release of. net, CLR has provided interoperability functions, but it is only an experimental stage.

With the advent of. Net 4.5 and Windows Runtime (winrt), it is history to create interoperability packages. Through CLR improvement, your.. NET applications can reference the metadata file for those components. CLR will take care of the required interoperability details so that you can use it like.. Net Library. This is a great news for developers.

 

Bcl: hosted extended framework (MEF), system. XML, system. net, WPF, ADO. net, ASP. NET, WCF, Windows Workflow Foundation, and parallel computing. It is worth further research!

Download vs11 now

Http://www.microsoft.com/click/services/Redirect2.ashx? Cr_cc = 200098144

 

Related Article

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.