计算机专业 外文翻译 外文文献 英文文献 .NET Framework介绍_第1页
计算机专业 外文翻译 外文文献 英文文献 .NET Framework介绍_第2页
计算机专业 外文翻译 外文文献 英文文献 .NET Framework介绍_第3页
计算机专业 外文翻译 外文文献 英文文献 .NET Framework介绍_第4页
计算机专业 外文翻译 外文文献 英文文献 .NET Framework介绍_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 毕业设计(论文)外文文献翻译.net framework介绍alex kriegel1.net framework是microsoft为开发应用程序而创建的一个富有革命性的新平台。这句话最有趣的地方是它的含糊不清,但这是有原因的。首先,注意这句话没有说“在windows操作系统上开发应用程序”。尽管.net framework的microsoft版本运行在windows操作系统上,但以后将推出运行在其他操作系统上的版本,例如mono,它是.net framework的开发源代码版本(包含一个c#编译器),该版本可以运行在几个操作系统上,包括各种linux版本和mac os.microsoft

2、 .net compact framework(基本上是完整 .net framework的一个子集)。使用.net framework的一个主要原因是它可以作为集成各种操作系统的方式。另外,上面给出的.net framework定义并没有限制应用程序的类型。这是因为本来就没有限制。.net framework可以创建windows应用程序、web应用程序、web服务和其他各种类型的应用程序.net framework的设计方式保证它可以用于各种语言,包括c#语言,c+、visual basic、jscript,甚至一些旧的语言,如cobol。为此,还推出了这些语言的.net版本,目前还在不断

3、推出更多的.net版本的语言。所有这些语言都可以访问.net framework,它们还可以彼此交互。c#开发人员可以使用visual basic程序员编写的代码,反之亦然。所有这些提供了意想不到的多样这也是.net framework具有诱人前景的部分原因。2.net framework主要包含一个非常大的代码库,可以在客户语言(如c#)中通过面向对象编程技术(oop)来使用这些代码。这个库分为不同的模块,这样就可以根据希望得到的结果来选择使用其中的各个部分。例如,一个模块包含windows应用程序的构件,另一个模块包含联网的代码块,还有一个模块包含web开发的代码块。一些模块还分为更具体的

4、子模块,例如在web开发模块中,有用于建立web服务的子模块.其目的是,不同的操作系统可以根据 自己的特性,支持其中的部分或全部模块。例如,pda支持所有的核心.net功能,但不需要 某些更深奥的模块。 部分.net framework库定义了一些基本类型。类型是数据的一种表达方式,指定其中最基础的部分(例如32位带符号的整数),以便使用.net framework在各种语言之间进行交互操作。这称为通用类型系统(common type system,cts).除了支持这个库以外,.net framework还包含.net公共语言运行库(common language runtime,clr),

5、它负责管理用.net库开发的所有应用程序的执行。3.如何用.net framework编写应用程序.使用.net framework编写应用程序,就是使 用.net代码库编写代码(使用支持framework的任何一种语言).vs是一种强大的集成开发环境,支持c#(以及托管和非托管c+、visual basic和其他一些语言)。这个环境的优点是便于把.net功能集成到代码中。我们创建的代码完全是c#代码,但使用.net framework,并在需要时利用vs中的其他工具。为了执行c#代码,必须把它们转换为目标操作系统能够理解的语言,即本机代码,这种转换称为编译代码,由编译器执行。但在.net f

6、ramework下,这个过程分为两个阶段。4. msil和jit在编译使用.net framework库的代码时,不是立即创建操作系统特定的本机代码,而是把代码编译为microsoft中间语言(microsoft intermediate language,msil)代码,这些代码不专用于任何一种操作系统,也不专用于c#。其他.net语言,如visual basic .net也可以在第一阶段编译为这种语言,当使用vs开发c#应用程序时,编译过程就由vs完成。显然,要执行应用程序,必须完成更多的工作,这是just-in-time(jit)编译器的任务,它把msil编译为专用于os和目标机器结构的

7、本机代码。这样os才能执行应用程序。这里编译器的名称just-in-time反映了msil仅在需要时才编译的事实。过去,常常需要把代码编译为几个应用程序,每个应用程序都用于特定的操作系统和cpu结构。这通常是一种优化形式(例如,为了让代码在amd芯片上运行得更快),但有时是非常重要的(例如对于工作在win9x 和 winnt/2000环境下的应用程序)。现在就不必要了,因为顾名思义,jit编译器使用msil代码,而msil代码是独立于机器、操作系统和cpu的。目前有几种jit编译器,每种编译器都用于不同的结构,我们总能找到一个合适的编译器创建所需的本机代码。 这样,用户需要做的工作就比较少了。

8、实际上,可以不考虑与系统相关的细节,把注意力放在代码的功能上就够了。5. 程序集在编译应用程序时,所创建的msil代码存储在一个程序集中,程序集包括可执行的应用程序文件(这些文件可以直接在windows上运行,不需要其他程序,其扩展名是.exe)和其他应用程序使用的库(其扩展名是.dll)。除了包含msil外,程序集还包含元信息(即程序集中包含的数据的信息,也称为元数据)和可选的资源(msil使用的其他数据,例如声音文件和图片)。元信息允许程序集是完全自我描述的。不需要其他信息就可以使用程序集,也就是说,我们不会遇到下述情形:不能把需要的数据添加到系统注册表中,而这种情形在使用其他平台进行开发

9、时常常出现。因此,部署应用程序就非常简单了,只需把文件复制到远程计算机上的目录下即可。因为不需要目标系统上的其他信息,所以只需从该目录中运行可执行文件即可(假定安装了.net clr)。当然,不必把运行应用程序所需要的所有信息都安装到一个地方。可以编写一些代码,执行多个应用程序所要求的任务。此时,通常把这些可重用的代码放在所有应用程序都可以访问的地方。在.net framework中,这个地方是全局程序集高速缓存(global assembly cache,gac),把代码放在这个高速缓存中是很简单的,只需把包含代码的程序集放在包含该高速缓存的目录下即可。6. 托管代码在把代码编译为msil,

10、再用jit编译器把它编译为本机代码后,clr的任务还没有全部完成。用.net framework编写的代码在执行(这个阶段通常称为运行时(runtime)时是托管的。即clr管理着应用程序,其方式是管理内存、处理安全性,以及允许进行跨语言调试等。相反,不在clr控制之下运行的应用程序是非托管的,某些语言如c+可以用于编写这类应用程序,例如,访问操作系统的低级功能。但是,在c#中,只能编写在托管环境下运行的代码。我们将使用clr的托管功能,让.net自己与操作系统进行交互。7. 垃圾回收 托管代码最重要的一个功能是垃圾回收(garbage collection)。这种.net方法可确保应用程序不

11、再使用某些内存时,这些内存就会被完全释放。在.net推出以前,这项工作主要由程序员负责,代码中的几个简单错误会把大块内存分配到错误的地方,使这些内存神秘失踪。这通常意味着计算机的速度逐渐减慢,最终导致系统崩溃。 .net垃圾回收会频繁检查计算机内存,从中删除不再需要的内容。它没有设置时间帧,可能一秒钟内会进行上千次的检查,也可能几秒钟检查一次,或者随时进行检查,但可以肯定进行了检查。 这里要给程序员一些提示。因为这项工作在不可预知的时间进行,所以在设计应用程序时,必须记得要进行这样的检查。需要许多内存才能运行的代码应自己执行这样的检查,而不是坐等垃圾回收,但这不像听起来那样难。8. 把它们组合

12、在一起 在继续学习之前,先总结一下上述创建.net应用程序所需要的步骤:(1)使用某种.net兼容语言(如c#)编写应用程序代码,如图1-1所示。 (2)把代码编译为msil,存储在程序集中. (3) 在执行代码时(如果这是一个可执行文件,就自动运行,或者在其他代码使用它时运行),首先必须使用jit编译器将代码编译为本机代码,如图1-3所示。(4)在托管的clr环境下运行本机代码,以及其他应用程序或过程.9. 链接在上述过程中还有一点要注意。在第(2)步中编译为msil的c#代码不一定包含在单独的文件中,可以把应用程序代码放在多个源代码文件中,再把它们编译到一个程序集中。这个过程称为链接,是非

13、常有用的。原因是处理几个较小的文件比处理一个大文件要简单得多。可以把逻辑上相关的代码分解到一个文件中,以便单独处理它,这也更易于在需要代码时找到它们,让开发小组把编程工作分解为可管理的块,让每个人编写一小块代码,而不会破坏已编写好的代码部分或其他人正在处理的部分。.net framework introducealex kriegel1.net framework for the development of microsoft applications and the creation of a rich a revolutionary new platform. this case is

14、most interesting is its vague, but this is a reason for this. first of all, pay attention to this statement did not say in the windows operating system development and application procedures. although. net framework version runs on microsoft windows operating system president, but future operations

15、will be launched in other versions of the operating systems, such as mono, it yes. net framework development of the source code version (including a c # compiler). this version can run on several operating systems, including linux and the mac os.microsoft. version net compact fr amework (basically i

16、ntact. net framework of a subset). use. net framework is a major cause of it as the operating system of integrating all kinds of ways. in addition, as given above. net framework definition does not limit the type of application. this is because there is no restriction. . net framework can create win

17、dows applications, web applications, web and various other types of procedures should be used . net framework design approach to ensure that it can service to be used in various languages, including c #, c + +, visual basic, and jscript. even some of the old language, such as cobol. therefore, in ad

18、dition to the implementation of these languages. net version, currently still has introduced more. net version of the language. all of these languages can visit. net framework, they can cross each other. c # developers can use visual basic programmers to prepare the code, and vice versa. all of thes

19、e provide an unexpected diversity, this is. net framework with the enticing prospect of reasons. 2.net framework mainly contains a very large code library. customers in languages (such as c #) through object-oriented programming (oop) to use these codes. the library is divided into different modules

20、, thus can expect the result to choose to use the various parts. for example, a module includes windows application components, another networking module containing the code block, there is also a web module contains the code block. development some modules also divided into more specific sub-module

21、, such as the web module development for the establishment of a web module. service its purpose is different operating systems under their own identity, support for some or all modules. for example, the pda support all of the core. net function, but it does not need some of the more esoteric modules

22、. part. net framework defines some of the basic types. data type is a form of expression, designated one of the most basic elements (such as 32-bit integers with the symbol) to use. net framework in various languages between interoperability. this is known as the common type system (common type syst

23、em. cts). in addition to supporting the library, . net framework also includes. net common language runtime (common langua ge runtime, clr), which is responsible for management use. net development for all applications implementation. 3. how to use. net framework applications development. use. net f

24、ramework preparation of applications, is used. net code for the preparation of code (using the framework support any language). vs is a powerful integrated development environment, support for c # (and managed and unmanaged c + +. visual basic and other languages). the environmental advantages of th

25、e facilitates. net to integrate the functions of the code. we build the code is c # code, but use. net framework, and, if necessary, the use of vs other tools. in order to implement c # code, which must be converted to target operating system to solve language, which is the machine code this change

26、as compiled code, the compiler implementation. but. net framework, the process is divided into two phases4. keyword and the jit compiler in use. net framework library code, instead of immediately creating an operating system specific code of the machine, but put code compiler for microsoft intermedi

27、ate language (microsoft intermedi ate language, keyword) code, the code is not exclusive to any one operating system. not exclusive to c #. other. net language, if visual basic. net can be compiled in the first stage of this language, when using vs c # application development, build on the process c

28、ompleted by vs. obviously, the implementation of the applicable procedures must complete more work, this is just-in-time (jit) compiler task it put keyword compiler for os and dedicated to the goal of the machine structure for the code. this os can implement applications. here compiler just-in-time

29、the name reflects the keyword only need to do a translation of the facts. past, we often need to compile code for several applications, each application procedures for specific operating systems and cpu structure. this is usually an optimal form (for example, in order for the code in the amd chips r

30、un faster). but sometimes it is very important (for instance, in win9x winnt/2000 environment and the application process prologue). now unnecessary because, as the name implies, jit compiler uses keyword code and keyword code is independent of machine, operating system and cpu. there are several ji

31、t compiler, each compiler are used for different structures, we can always find a suitable compiler is the creation of the machine code. thus, users need to do a far less. in fact, they do not consider the details related to the system, giving attention to the functional code will be enough. 5. prog

32、ram set compiled application, citing the keyword code stored in a centralized procedure. set procedures including the application executable files (which can be directly run on windows. no need for other procedures, expansion are. exe) and other applications that use the library (expansion are. dll)

33、. in addition to include keyword, the procedures set also includes meta-information (that is, procedures focus on the data contained in the information, also known as metadata) and the optional resources (keyword used by other data, such as sound files and pictures). yuan procedures allow informatio

34、n collected is completely self-described. no other information on the procedures for collection, in other words, we do not encounter the following circumstances : not requiring the data added to the system registry. and the use of this kind of situation in other platform development often arise. the

35、refore, the deployment of applications it is very simple, just put the paper copy to the remote computer directory can be. not the target system because of other information, so just from the contents run executable files can be (assuming installed. net clr). of course, we do not have the applicatio

36、ns needed to install all the information in one place. you can make some code, the implementation of a number of applications required tasks. at this time, these are usually reusable code on all applications can access areas. in. net framework, this is a definitive collection procedures cache (globa

37、l assembly cache, the gac). code or on the high-speed cache is very simple. needs to do is include the code on the procedures set contains the cache directory can be. 6. trust code compiler for code or keyword and then jit compiler it compiler - based machine code, clr task is not completed. used. n

38、et framework prepared by the implementation of the code (often referred to as the stage of operation (runti me) is the custodian. that the clr manages the applications, and its methods are memory management, handling security, and allow for cross-language debugging. conversely, not clr running under

39、 control of non-custody procedures, some languages such as c + + can be used in the preparation of such application, for example, visited the base operating system functions. however, in c #, can only prepare in the trusteeship council run under the code. we will use clr functions of the trusteeship

40、 council,. net operating system with its own interactive. 7. garbage collector managed one of the most important functions of the garbage collector (garbage collectio n). this species. net will ensure that applications would no longer use certain memory, the memory which will be completely released.

41、 in. net introduced to the former, this primarily by programmers responsible, code of a few simple mistakes will be large memory allocation to the wrong places, so that these mysterious disappearance of memory. this usually means that the speed of the computer has gradually slowed down and eventuall

42、y led to the collapse. . net trash recycling frequent checks of computer memory, will no longer need to remove the contents. it does not set the time frame may be one of seconds for the 1,000 th inspection, may also check a few seconds. or check at any time, but certainly for the inspection. here to give programmers some hints. because this work in an unpredictable time, the application of the design process, we must remember to conduct such inspections. many memory needed to run their own code of the implementation of such checks, instead of waiting for the g

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论