What is CLR?

原创 2004年12月29日 18:18:00
  1. Microsoft's .NET is a broad family of products representing the company's next generation of services, software, and development tools. At the core of the .NET strategy lives the Common Language Runtime. The CLR is a platform for software development that provides services by consuming metadata. It is standards-based and component-oriented. Like any platform, the important pieces are the runtime, the libraries that provide access to them, and the languages that can target the platform.
  2. But what exactly is .NET? Although the precise meaning can be a little hard to isolate by reading the prolific marketing literature, a little digging reveals that .NET is in fact Microsoft's grand strategy for how all of their software, systems, and services will fit together. It includes development tools (like the new version of Visual Studio, dubbed Visual Studio.NET), future versions of their Windows operating systems, new Internet-based services (like a stepped-up version of their Passport web authentication service), and an entirely new beast called the Common Language Runtime.

  3. The Common Language Runtime is the single most important piece of the .NET product strategy, because it is in essence the engine that pulls the train - the CLR is how developers will write software in the brave new .NET world (see figure 1).

  4. The CLR as a development platform

    The CLR is a development platform. Like any platform, it provides a runtime, defines functionality in some libraries, and supports a set of programming languages.

  5. The CLR is a platform for developing applications. A platform is a set of programmatic services, exposed through some API to developers using one or more languages. Development generally targets a single platform;

  6. The CLR is not an operating system in the strict sense of the term - it does not, for example, provide a file system, relying instead on the underlying OS (such as Windows) to implement that feature.

  7.  break down the feature set of the platform (CLR) into three fundamental areas: the runtime that the platform offers, the libraries it defines, and the languages I'm going to use. These aspects of the platform overlap (see figure 2), and understanding each of them and the ways in which they interact is crucial to becoming an effective CLR programmer.

    1. Runtime
      1. A runtime provides services to software that you write. The CLR provides a runtime.

      2. A runtime is a piece of code, written by the platform vendor, which provides your code with a set of services. What sorts of services? Well, it depends on the platform - it might be anything from checking security for you to implementing a file system to providing access to some piece of hardware.

      3. Almost every program written these days takes advantage of some sort of runtime. Very few programmers start a project by writing their own file system or database engine. Rather, they make use of already-written pieces of software, like Windows 2000 or Oracle. Both of these platforms (yep, they're both platforms) have a runtime that provides services. In the case of Windows 2000, the runtime is the operating system kernel, and it provides services like thread management. In the case of Oracle, the runtime is the database engine, and the services include things like a SQL engine and transactions. We say that we write code that "runs on" a platform because it uses the services provided by the platform. The CLR provides these services using a layered architecture that is shown in figure 3.

    2. Libraries

      The CLR's Base Class Library allow us to interact with the runtime, and provide additional useful functionality.
    3. Languages

      The CLR supports programming in one of about two dozen languages. The most popular of these are likely to be C# and Visual Basic.NET.
  8. In two areas, the CLR really shines: its support for component-based programming, and its extensive use of open, standards-based technologies.

    1. Components

      The CLR has extensive support for component-based programming.

      1. A fairly recent trend in software development is that of component-oriented programming, although the idea behind component development is not a new one. In fact, it's not even unique to software engineering: we stole it from the hardware guys. The basic concept is that systems are built out of discrete parts that can be assembled to make a larger whole.

      2. A software component is a discrete piece of functionality that can be plugged into different applications. For example, I might develop a calendar component that allows the user to pick a day of the month.

      3.  Of course, components do not have to be visual - a reusable piece of logic for calculating sales tax could also be written as a component. The important idea is that they're independent pieces that can be plugged together in a large system.

    2. Standards

      The CLR supports several standards, such as XML and SOAP. The CLR has itself been submitted as an open standard.

      1. Support for standards is of key importance to developers creating software today. The CLR recognizes this, and provides explicit support for standards-based computing, making extensive use of things like XML[8] and SOAP[9].

      2. In addition to helping you write applications that conform to accepted standards - meaning that your applications have a better chance of being able to interoperate with other applications over the Internet - it turns out that the CLR itself is an implementation of a standard.

版权声明:本文为博主原创文章,未经博主允许不得转载。

C++/CLR Windows界面编程(一·)

C++/CLR Windows界面编程前言 VS2013 创建CLR 窗口项目 CLR去除黑窗口
  • u013978977
  • u013978977
  • 2016年07月14日 16:27
  • 4643

CLR学习笔记--深入理解多态机制

一、引言 所谓万事开头难,哪怕是写一个学习笔记,以前看惯别人写的博客文章,当时看了就看了,只有一种感觉就是解决了心中的好久疑团,现在自己去写才了解,也许你看了只有短短几分钟,可别人却下了功夫,用了很多...
  • u011964267
  • u011964267
  • 2013年09月05日 17:14
  • 1271

C++/CLR 概念原理

一、CLI简介   CLI:(Common Language Infrastructure,通用语言框架)提供了一套可执行代码和它所运行需要的虚拟执行环境的规范。更通俗的我们可以说它是一个虚拟平台,是...
  • zxxSsdsd
  • zxxSsdsd
  • 2013年07月16日 15:14
  • 1402

编译和部署CLR程序集

SQL Server CLR集成,让我们可以用C#编程,实现我们熟知的存储过程、函数及触发器等,然后部署到SQL Server。部署完成后,又可以用我们熟知的方式来调用。SQL Server CLR是...
  • Burgess_Liu
  • Burgess_Liu
  • 2013年08月22日 10:22
  • 3262

.NET, ASP.NET, CLR版本问题总结

有时候查.NET相关资料的时候,会遇到很多版本数字,比如说.net版本,asp.net版本等。一直对这些版本的对应特别模糊,这里做一个总结。   .NET是由Compiler编译器,System....
  • sundacheng1989
  • sundacheng1989
  • 2015年11月04日 12:37
  • 896

关于CLR、CIL、CTS、CLS、CLI、BCL和FCL

原文地址:点击打开链接如果要想深入学习.NET平台,那么标题中的这些关键字对你来说并不陌生,这些名词构成了.NET庞大的生态系统,为了宏观认识.NET平台,学些.NET架构体系,针对一些常用常用名词的...
  • xunzaosiyecao
  • xunzaosiyecao
  • 2015年12月01日 21:06
  • 1253

C++通过CLR调用C#dll--如何定义合适的参数

C++调用C#的dll的时候,如何正确的定义C#函数是一个问题,本文将告诉你如何解决这个问题...
  • benbencoco
  • benbencoco
  • 2014年03月04日 15:53
  • 1430

SQL Server实现CLR步骤及其需要配置注意的问题(转)

介绍 我们一起来做个示例,在.NET中新建一个类,并在这个类里新建一个方法,然后在SQL Server中调用这个方法。按照微软所述,通过宿主 Microsoft .NET Framework 2....
  • ljh56789
  • ljh56789
  • 2014年08月06日 09:12
  • 4899

CLR 中未处理异常的处置

CLR 全面透彻解析 CLR 中未处理异常的处置 Gaurav Khanna 请注意,尽管在本文的打印版本中引用了相关代码,但并没有代码可供下载。   目录 ...
  • sgzwiz
  • sgzwiz
  • 2014年11月10日 14:34
  • 1645

《CLR via C#》学习笔记【1】

一、CLR的执行模块1.1 将源代码编译成托管模块 非托管C/C++可对系统进行低级控制,按自己的想法管理内存、VB可以快速生成UI应用程序,并控制COM对象和数据库。 公共语言运行时(Commo...
  • just0kk
  • just0kk
  • 2016年05月05日 20:11
  • 1284
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:What is CLR?
举报原因:
原因补充:

(最多只允许输入30个字)