【正文】
LL之一安裝了一個軟件包時,你會發(fā)現(xiàn)自己就身在 DLL HELL之中。最常見的是循環(huán)引用問題,即一個對象到另一個對象,它本身包含一個回到第一個對象的引用。一個深藍設計的 .NET,這 是一 個為 Linux用戶界面設計的流行的 Gnome計劃的開源版本。運行庫還提供了內置的堆疊設施,使其更容易找到漏洞和錯誤。 而且 關于不同的調用約定或數(shù)據(jù)類型, 不必再擔心無縫互操作性。此外,微軟 和 其他幾家公司正在生產用于 語言的編譯器 。有些函數(shù)會返回 錯誤 的 Win32代碼,一些返回 HRESULTS, 還 有的 則 比較例外,所有要求程序員編寫錯誤處理代碼 的不同類型。通過書面形式向公共語言運行庫和使用 .NET基礎類庫,所有的應用服務是通過一個共同的面向對象編程模型提供。 重慶大學本科生畢業(yè)論文翻譯 3 微軟 .NET體系結構 從本質上講,根據(jù)公共語言規(guī)范, .NET 語言編譯的種類和微軟中間語言( MSIL,或者只是 IL)的輸出是不同的。 ■兩個最高發(fā)展目標 一個用于 Web 應用程序 ( ),另外一個用于普通的 Windows 應用程序( Windows 表格) 。它包括 , .NET公共語言庫( CLR)和 .NET基類庫( BCL)。在這一章中,我們來看一看 .NET平臺的各個組成部分。位圖編輯器、調試器、 Web窗體設計器、 Windows 窗體設計器、 Web服務設計器、 XML編輯器、 HTML 編輯器、 Web 瀏覽器、服務器資源管理器和多語言支持,所有這些都被集成在 IDE中。 NET平臺呈現(xiàn)了 Microsoft思想的重大轉變。重慶大學本科生畢業(yè)論文翻譯 1 譯文: C.NET 開發(fā)者指南 前言 在電腦軟件的歷史上,很少有一種技術能夠得到開發(fā)者和業(yè)界如此強烈的正面響應。為了使 .NET平臺適合于企業(yè)和開發(fā)者,所有這些目標從一開始就被考慮到了。 Visual IDE也已經被整合并裝入了大量的新功能。沒有良好的操作背景是不可能有效地使用這些新工具的來運行你的應用程序。然而,對很多人來說, .NET框架是當 .NET被提到時我們 想象 中 的樣子。 ■基類庫 對 組件的編程和應用程序接口( API)的 廣泛的 收集。在它的好的產品中, 它包括語言所需要的工具和發(fā)展,使 n 層應用這些類型更容易,整齊地作為一個單一的連貫和全面的 API封裝。 這種架構提供了許多好處,至少一個很大的數(shù)目一致的 API。為 Windows開發(fā)平臺軟件始終意味著你會出現(xiàn)錯誤的地方,特別是在錯誤的方式會返回值。微軟目前 針對 .NET 公共語言運行庫 的幾個編譯器 提供 了 IL代碼: C + +的托管擴展的 C#, JAVAScript和 Visual Basic中。您的組件在 C#可以書面提出一個可以由 Fortran采用資訊科技應用捕獲的異常。 .NET公共 語言運行庫調試應用程序,完全支持跨語言的界限。 幾個星期后, 也就是 在二零零一年七月十日微軟給 出 了積極的信號。雖然這在理論上聽起來完善,但在實踐中卻有幾個問題。 支持的版本 誰如果不理解 ―DLL HELL‖,那就是他尚未開發(fā) Windows(或至少支持)軟重慶大學本科生畢業(yè)論文翻譯 5 件很長時間。問題是,一旦在使用時產生了不良的客戶端軟件,那么改變一個組件的接口會被 以前 的 所謂添加新的方法的 行為影響。 支持的開放標準 在今天的世界上,不是每個你可能工作的設備都是運行微軟操作系統(tǒng)或使用英特爾處理器。通常 需要 在幾個目錄中安裝 大量 的文件, 設置 各種注冊表, 安裝 所需的 COM 組件 和 建立 快捷方式等等。微軟堅定地認為:他們十分看好分布式 Web服務概念的公司。 但是, 少為人知 的是, 這些都是 IBM和 Sun的倡議。 這里有一點關于 COM互用問題的更多信息。 in the new .NET platform, these concepts do not exist at all. Another great benefit for .NET developers is its model for error handling via exceptions. Developing software for the Windows platform has always meant you were pulled into its own inconsistencies: particularly in the ways errors were returned. Some functions would return Win32 error codes, some return HRESULTS, and some raise exceptions, requiring the programmer to write different types of errorhandling code. In .NET, all errors are reported in the form of exceptions, therefore greatly simplifying writing, reading, and maintaining code. Due to the Common Language Specification and Common Type System, .NET exceptions transcend module and language boundaries as well. Multilanguage Development 重慶大學本科生畢業(yè)論文翻譯 11 Because many languages target the .NET Common Language Runtime, it is now much easier to implement portions of your application using the language that’s best suited for it. Erstwhile methods, allowing such programming languages as COM or CORBA to interoperate, did so through the use of an Interface Definition Language (IDL). The .NET platform allows languages to be integrated with one another through the use of the MSIL. Although it contains instructions that appear similar to assembly code, such as pushing and popping values and moving variables in and out of registers, it also contains instructions for managing objects and invoking their methods, manipulating arrays, and raising and catching exceptions. The Microsoft Common Language Specification describes what other development tool authors must do in order for their pilers to output IL code that will allow them to integrate well with other .NET languages. Microsoft currently provides several pilers that produce IL code targeting the .NET Common Language Runtime: C++ with managed extensions, C, Jscript, and Visual Basic. In addition, several panies other than Microsoft are producing pilers for languages that also target the .NET Common Language Runtime. Currently having already supported for COBOL, Eiffel, Fortran, Perl, Python, Scheme, and many more have been announced by various vendors. For a current list check: Why should you care about the details of IL? Because this is how .NET manages many of its crosslanguage features. No Interface Definition Language is required to enable crosslanguage functionality because IL metadata handles the entire translation overhead. For instance, with an exception object defined by IL, the same object can be caught regardless of the .NET language used. Your ponent written in C can raise an exception that can be caught by the Fortran application using it. No more worries about different calling conventions or data types, just seamless interoperability. Crosslanguage inheritance is another feature made possible by the use of IL. You can now create new classes based on ponents written in other languages, without needing the source code to the base ponent. For example, you can create a class in C++ that derives from a class implemented in Visual Basic. .NET can realize this because it defines and provides a type system mon to all .NET languages. One of the great challenges of developing applications under the Windows DNA specification was in debugging applications developed in a variety of languages. Because of both the unified development environment of Visual and the use of IL as the output of all .NET languages, crosslanguage debugging is possible without resorting to assembly language. The .NET Common Language Runtime fully supports debugging applications that cross language boundaries. The runtime also provides builtin stackwalking facilities, making it much easier to locate bugs and errors. 重慶大學本科生畢業(yè)論文翻譯 12 Platform and Processor Independence The intermediate language is CPUindependent, and there is much higher level than most machine languages. Once being written and built, a managed .NET application can execute on any platform that supports the .NET Common Language Runtime. Because the .NET Common Type System def