【正文】
pers. How many ponents the .NET platform have? Different people have different answers. Servers such as BizTalk and SQL Server, as well as services such as .NET My Services and its first visible ponent, .NET Passport, are being described by some as integral parts of the .NET platform. Noheless, the .NET Framework, as far as many of us are concerned, can be anything that we can imagine when referring to .NET. It 重慶大學本科生畢業(yè)論文翻譯 9 prises Visual (), the .NET Common Language Runtime (CLR), and the .NET Base Class Libraries (BCL). The other ponents may be required by specific applications, but they are not the necessary part of all .NET applications. Looking at the overall architecture, .NET consists of three primary ponents: ■ The .NET Framework A pletely new application development platform. ■ Several .NET products Various applications from Microsoft based on the .NET Framework, including new versions of Exchange and SQL Server, which are Extensible Markup Language (XML)–enabled and integrated into the .NET platform. ■ Several .NET services Provided by Microsoft for developing applications running under the .NET Framework. Microsoft’s Hailstorm project actually attempts to package some of the most crucial Web Services under the Microsoft brand name. The .NET Framework itself can be divided into three parts: ■ The CLR A managed execution environment that handles memory allocation, error trapping, and interacting with the operatingsystem services. ■ The Base Class Library An extensive collection of programming ponents and application program interfaces (APIs). ■ Two toplevel development targets One for Web applications () and the other for regular Windows applications (Windows Forms) The advantages offered by the .NET Framework include shorter development cycles (code reuse, fewer programming surprises, support for multiple programming languages), easier deployment, fewer data typerelated bugs due to integral type safety, reduced memory leaks attributed to the garbage collector, and, in general more scalable, reliable applications. Microsoft .NET and Windows DNA If the propagation regarding .NET sounds familiar, there’s a good reason: The .NET platform is the next generation of Windows DNA. However, although Wi ndows DNA offer some of the building blocks for creating robust, scalable, distributed systems, it generally had little substance in and of itself. Windows DNA was a technical specification that focused on building software based on Microsoft server products, utilizing numerous technologies and languages (ASP, HTML, JavaScript, MTS, COM, and so on), many of which are quite unrelated from a developer’s point of view. The servers and languages involved all have varying APIs and type systems, making interoperability a challenge at best. Herein lies the big difference: .NET is much more than a specification. A product in its own right, it includes the tools and languages required to make developing these types of ntiered applications easier, neatly packaged as a single coherent and prehensive API. Microsoft .NET Architecture Hierarchy The pile of .NET families of languages are, in essence, different from the 重慶大學本科生畢業(yè)論文翻譯 10 output of Microsoft Intermediate Language (MSIL, or just IL) rested on the Common Language Specification. The primary types of application development are Web Forms, Web Services, and Windows Forms applications. These applications municate by way of using XML and Simple Object Access Protocol (SOAP), getting their functionality from the Base Class Library and running within the Common Language Runtime environment. Visual Studio .NET is not required in order to develop .NET Framework applications。 譯文原出處 : C.NET 開發(fā)者指南 C . N ET Web Developer39。微軟并沒有想迫使公司放 棄現(xiàn)有的 COM組件,特別是因為現(xiàn)在微軟自己的產(chǎn)品很多是基于 COM的 .COM組件中的消息,這些消息是在 .NET運行 的時候 ,它的互操作層通過非法侵占來處理所有管理運行和 COM組件系統(tǒng)之間 翻譯時 傳遞的,就像與非托管代碼一樣。一個 COM客戶端可以調用 .NET組件,就好像這是一個 COM服務器一樣。 ■使用 COM組件 這應該是你調用 DLL函數(shù)的相同原因。您最終可能會在不同的情況使用不同的代碼 ■調用 DLL函數(shù) 現(xiàn)在有許多函數(shù)都綁定了 DLL。 與非托管代碼的互用 正如你可能已經(jīng)猜到了,與非托管代碼是不被 .NET 公共語言運行庫管理的代碼。正如我們前面討論的,這些都是用來在 .NET并都在競爭。每條信息提供商已經(jīng)開發(fā)不同的接口來訪問他們的服務器上的數(shù)據(jù)和流程。 其實是 各種服務器和應用程序在后臺 運行,當 訪問幾個遠程站點的信息 時 , 服務器 結合自己的用戶信息數(shù)據(jù)庫, 合并成一個集成產(chǎn)品 ,用戶 則瀏覽 傳遞到瀏覽器上的 信息 。例如, 現(xiàn)在, 當用戶與門戶網(wǎng)站互動 時 ,在 他們 看來 是與一個遠程服務器 打交道。 分布式體系結構 今天的分布式應用程序與未來的 那些 仍然 有很大的不同。 .NET組件中不引用注冊表,由于元數(shù)據(jù)和引用的使 用,組件描述是自發(fā)重慶大學本科生畢業(yè)論文翻譯 6 的。即使 專門設計 一種 第三方 軟件 ,使 得 更容易開發(fā) 一些 工具,但要正確 地 在檢索中 安裝一個應用仍然是一項艱巨的任務。完全卸載的應用程序幾乎是不可能的,即使他們提供卸載功能,大多數(shù)仍會遺留很多字節(jié)以及碎片。由于這一點,大多數(shù)公司 對于 用于開發(fā)他們的安裝程序的第三方工具 很不滿意 。通過許多基于開放標準 .NET的基礎并 向 ECMA(一個國際標準組織)提交對 C#和 .NET公共語言基礎結構的標準草案,微軟希望 籍由 軟件的未來版本看到其超出自己的 領 域。因為 SOAP 是一個類似于 HTTP 的簡單的基于文本的協(xié)議,它可以輕易地穿過防火墻,不像 DCOM或 CORBA。 為了 實現(xiàn) 開放的標準 , .NET的建構是基于 XML和 SOAP的, 它將使你 可以通過 Inter 激活 應用程序,而不論其背后依托標準的信息基礎是什么設施。我們將在后面的章節(jié)涵蓋了更多關于配件和版本如何工作的內容。雖然目前的 DLL和 COM的對象包含了許多不同 的 版本信息,但是操作系統(tǒng)不會真正使用任何這些信息。如果應用程序安裝運行后,應用程序應該始終運行。 不過它也有解決方法, 由于 COM對象是被加載在注冊表中的信息,所以只需替代該 DLL或應用程序目錄,那么這個問題便不會發(fā)生。不幸的是,軟件開發(fā)人員經(jīng)常是 玩弄 主義者, 留下 一些 ―漏洞 ‖的功能玩弄一些人。這雖然違背了共享庫的目的,但它是一個解決問題的方法。 但是,如果 現(xiàn)在他們的新軟件不工作 了 , 那么 就是 DLL HELL發(fā)揮作用了。對于外行,當客戶使用您的應用程序相同的 DLL之一安裝了一個軟件包時,你會發(fā)現(xiàn)自己就身在 DLL HELL之中。在本章 后面的內容,我們涉及 .NET如何進行已經(jīng)經(jīng)過嚴格的引用計數(shù)或手動內存管理方法改進的垃圾收集工作。他們不信任任何人能利用管理資源并將之照顧好。因此,除非它們是隱式解構,不然他們的內存可能永遠不會被發(fā)現(xiàn)。最常見的是循環(huán)引用問題,即一個對象到另一個對象,它本身包含一個回到第一個對象的引用。 從 Visual Basic開發(fā)人員或有 COM背景與未來技術的相關的人員 的角度來說,這項技術在 只有 一個對 象 而且 沒有其他物體對其引用 的時候 會 恢復內存,而且基本上它不再需要使用內存。 自動內存管理 提到內存泄漏問題,可能一個開發(fā)環(huán)境中并沒有提供自動內存 來 管理開發(fā),從而導致調試無數(shù)個小時。該小組正在開發(fā)一個 C#語言的編譯器,以及 .NET公共語言運行庫,而且關于基類庫的工作也開始了。一個深藍設計的 .NET,這 是一 個為 Linux用戶界面設計的流行的 Gnome計劃的開源版本。這個 測試版本 目前預計將在 2021年 上半年 的 某個時候 發(fā)布。 雖然在寫這篇文章的 時候, .NET應用程序只能運行在 Windows 平臺。 .NET應用程序可以 在任何平臺上支持寫、新建以及托管,這樣就可以支持 .NET公共語言運行庫。運行庫還提供了內置的堆疊設施,使其更容易找到漏洞和錯誤。由 于統(tǒng)一的 Visual IL都 使用 了 .NET語言作為輸出,跨語言調試就 不 會排斥匯編語言。 .NET 可以實現(xiàn)這一點,因為它定義和類型系統(tǒng) 都 提供了一個共同的 .NET語言?,F(xiàn)在您可以創(chuàng)建源代碼,而 且 無需再 為 新類 中的基本