【正文】
testing with JUnit. Programmers continually write unit tests, which must run flawlessly for development to continue. Refactoring your code. Programmers restructure the system without changing its behavior to remove duplication, improve munication, simplify program logic, or add flexibility. Continuous integration with Ant. Integrate and build the entire system many times a day, 山東建筑大學(xué)畢業(yè)設(shè)計(jì)外文文獻(xiàn)及譯文 13 every time a task is pleted. Integrating one set of changes at a time makes it easy to identify problems and prevents a surprise at the end of an iteration. Team ownership. This requires good tools that enable efficient code sharing and a team culture that encourages such behavior. Coding standards. In agile development processes, the code is of central importance in documenting system design and behavior, and this is possible only when consistent coding standards are used. Part 2 of this book explains how Eclipse supports each of these agile development practices. Detailed examples are based on a sample application used throughout all chapters. . Sample Application We39。ll use a consistent, practical example throughout this book. The example application is built in two iterations of an agile development process. The goal is to present a realistic situation that demonstrates the power of Eclipse without allowing the application39。s plexity to interfere with your understanding of Eclipse. The development iterations will be used to build the following application features: Product Catalog. Create a domain model representing product catalog information with several kinds of catalog items, including products, services, and product bundles. Each catalog item includes pricing data and a reference to the supplier. ECommerce Components. Create a reusable library of ponents for representing electronic merce data. This Java library will be based on the XML Schemas and specifications published by the OASIS Universal Business Language (UBL) technical mittee. . Distilled The functional architecture of the Eclipse platform is posed of building blocks that add new features to the core runtime platform. Several hundred Eclipse subprojects and independent open source or mercial products build on this platform. Generic IDE support is provided, which is then specialized for Java, C/C++, Web Tools, and other development activities. The generic IDE is a teamoriented workbench supporting multiple 山東建筑大學(xué)畢業(yè)設(shè)計(jì)外文文獻(xiàn)及譯文 14 perspectives, views, search facilities, debugging, and more. Java Development Tools (JDT) adds specific support for configuring Java projects and a rich environment for editing and debugging. Other languages, such as C/C++, are supported with optional plugin features available from the Eclipse Web site and other independent projects. The Web Tools Platform (WTP) project is the newest addition to the Eclipse family and will provide an extensible, standardsbased platform for J2EE and Webcentric applications development. Eclipse provides a development platform that supports and accelerates the iterative agile development cycle. Specialized features are included for continuous testing, refactoring, continuous integration, collective ownership, and coding standards. 山東建筑大學(xué)畢業(yè)設(shè)計(jì)外文文獻(xiàn)及譯文 15 中文譯文: 第一章 Java IDE 和其他 觀察 Eclipse 就 像觀察一顆切割良好的鉆石。你能看到什么,取決于觀察的角度和觀察的深度。在某些觀察者得眼中, Eclipse 是個(gè)具有一般 IDE 環(huán)境應(yīng)有的特性的 Java IDE,包括編輯器、調(diào)試器和具有各種 偏好定制 的項(xiàng)目構(gòu)造器。而在另一些人眼中, Eclipse 是工具集成的通用框架,具有擴(kuò)展的、靈活的 API 插件。在 的主頁(yè)上這樣說(shuō)明,“ Eclipse 是一種通用的工具平臺(tái),一個(gè)開(kāi)放的可擴(kuò)展 IDE,并沒(méi)什么特別之處?!? 上述兩種觀 點(diǎn)都是有效的解釋。隨著 Eclipse 社區(qū)的迅速壯大,其他用戶(hù)還會(huì)把他看做一種建模工具、一種商業(yè)原則管理應(yīng)用程序、一種商業(yè)程序設(shè)計(jì)器、一種 C++語(yǔ)言編寫(xiě)的嵌入式系統(tǒng)的開(kāi)發(fā)平臺(tái),或者一種編寫(xiě) HTML 和進(jìn)行文檔管理的環(huán)境。如果采用多功能客戶(hù)平臺(tái)( RCP)配置。 Eclipse 就是任何終端用戶(hù)客戶(hù)應(yīng)用程序的基礎(chǔ)。 介紹 Eclipse 的各個(gè)方面的書(shū)已經(jīng)有很多。本書(shū)則是把 Eclipse 作為一個(gè)構(gòu)造 Java 應(yīng)用程序的全面開(kāi)發(fā)環(huán)境來(lái)介紹的。這些 Java 應(yīng)用程序可能是其他開(kāi)源工具、大型的企業(yè)系統(tǒng)或者新的 Eclipse 插件。無(wú)論 是項(xiàng)目小組還是個(gè)人開(kāi)發(fā)者,本書(shū)都很適用。 Eclipse 是由項(xiàng)目小組采用現(xiàn)代的敏捷開(kāi)發(fā)過(guò)程開(kāi)發(fā)的。 Eclipse 是由大型的分布式項(xiàng)目組采用迭代式開(kāi)發(fā)方法,使用 eclipse 本身夜以繼日地進(jìn)行重構(gòu)和測(cè)試開(kāi)發(fā)成的。因此,eclipse 非常適用于采用這種開(kāi)發(fā)方法的所有項(xiàng)目。本書(shū)介紹了幾種敏捷開(kāi)發(fā)小組常見(jiàn)的情況,詳細(xì)解釋了 Eclipse 如何協(xié)助完成這些任務(wù)。 本章將介紹 eclipse 的下列方面: Eclipse 平臺(tái)體系結(jié)構(gòu)的構(gòu)造模塊 其他 Eclipse 項(xiàng)目提供的開(kāi)發(fā)組件 用 Eclipse 進(jìn)行敏捷開(kāi)發(fā) Eclipse 平臺(tái)體系結(jié)構(gòu) 由于 Eclipse 的解釋多種多樣,因此很難簡(jiǎn)潔地說(shuō)明它的體系結(jié)構(gòu)。最一般的說(shuō)法是“用于創(chuàng)建和部署插件的開(kāi)發(fā)和運(yùn)行環(huán)境的一種抽象視圖”。此外,還有一種功能視圖,把Eclipse 描述為靈活的、可擴(kuò)展的集成開(kāi)發(fā)環(huán)境( IDE)。我們采用后面一種觀點(diǎn),把注意力放在 Eclipse 如何用一種并行的方式提高軟件開(kāi)發(fā)工作的生產(chǎn)效率。 山東建筑大學(xué)畢業(yè)設(shè)計(jì)外文文獻(xiàn)及譯文 16 Eclipse IDE 如下所示: 多平臺(tái)。 的目標(biāo)操作系統(tǒng)是 Windows、 Linux( motif 和 GTK)、 Solaris、AIX、 HPUX 和 Mac OSX。 多語(yǔ)言。雖然 Eclipse 是用 Java 語(yǔ)言開(kāi)發(fā)的,但是它支持用 Java、 C\C++和 Cobol編寫(xiě)應(yīng)用程序,此外它還支持 Python、 Perl、 PHP 和其他語(yǔ)言。 Eclipse 的插件則必須用 Java 編寫(xiě)。 多角色。除了編寫(xiě)程序, Eclipse 還支持建模、測(cè)試、編寫(xiě)網(wǎng)頁(yè)和許多其他角色。 圖 11 展式了 Eclipse IDE 的功能構(gòu)造模塊。每個(gè)模塊構(gòu)造在它之下的基礎(chǔ)模塊之上。正是 Eclipse 平臺(tái)的模塊性,使它獲得了空前的增長(zhǎng)。整個(gè)平臺(tái)對(duì)于其他開(kāi)源產(chǎn)品或者是添加了新模塊的商 業(yè)產(chǎn)品來(lái)說(shuō),都是開(kāi)源和免版稅的。 深色的模塊是本書(shū)介紹的重點(diǎn)。不過(guò),我們會(huì)同時(shí)介紹一些插件,對(duì)于專(zhuān)業(yè)任務(wù)它們能提高平臺(tái)的能力。這樣的例子有基于 Web 的應(yīng)用程序的單元測(cè)試框架、靜態(tài)代碼分析工具和確保與編碼標(biāo)準(zhǔn)一致的樣式檢查程序。 本章接下來(lái)的幾節(jié)將介紹圖 11 中示出的構(gòu)造模塊。 Eclipse 運(yùn)行平臺(tái) 核心的運(yùn)行時(shí)平臺(tái)提供了如下最基本的服務(wù): 插件注冊(cè)。裝載插件并管理可用插件的注冊(cè)表。 資源。管理操作系統(tǒng)文件和文件夾的獨(dú)立于平臺(tái)的窗口,包括鏈接資源的位置。 UI 組件。 Eclipse 的 用戶(hù)界面組件是以 SWT 和 JFace 庫(kù)為基礎(chǔ)的。 更新工具。 Eclipse應(yīng)有程序?qū)Π惭b和更新來(lái)自 URL可尋址位置(包括遠(yuǎn)程的 Inter站點(diǎn))的插件具有內(nèi)置的支持。 山東建筑大學(xué)畢業(yè)設(shè)計(jì)外文文獻(xiàn)及譯文 17 幫助工具。所有插件共享一個(gè)通用的幫助工具。 Eclipse 的獨(dú)立于平臺(tái)的資源模型是在 IDE 中表示對(duì)象、文件夾和文件的重要基礎(chǔ),第 3 章“管理項(xiàng)目”中將介紹這一點(diǎn)。更新工具可以輔助你用新的插件定制 IDE,第 9 章“更新 Eclipse IDE”將介紹它。 所有這些基本服務(wù)都是在非常小的內(nèi)核上做為插件實(shí)現(xiàn)的。 Eclipse 把所有東西都設(shè)計(jì)為插件, 目的是完全一致地對(duì)待所有開(kāi)發(fā)者(和所有插件)。這能確保該工具對(duì)平臺(tái)自身和任何客戶(hù)都有效。 集成開(kāi)發(fā)環(huán)境 Eclipse IDE 通過(guò)多種語(yǔ)言和多種角色的開(kāi)發(fā)活動(dòng)提供了一個(gè)通用的用戶(hù)環(huán)境。構(gòu)造在 IDE 基礎(chǔ)之上的插件不必凡事從頭做起。 最重要的 IDE 特性如下: 共享窗口。許多 Eclipse 特性共享一個(gè)窗口,用于顯示和編輯屬性,羅列在代碼中發(fā)現(xiàn)的語(yǔ)法錯(cuò)誤以及列出工作任務(wù)。 視圖。視圖將把一組相關(guān)的窗口組織成合適的特定任務(wù)(如 Java 開(kāi)發(fā)、調(diào)試和版本 控制)的布局。 首選項(xiàng)。一個(gè)對(duì)話(huà)框?qū)压ぷ髌脚_(tái)中安 裝的所有插件的首選項(xiàng)設(shè)置頁(yè)面集中在一起。 搜索引擎。平臺(tái)的搜索引擎提供了搜索資源和表示結(jié)果的一般功能。可以用資源特定的搜索標(biāo)準(zhǔn)(如 Java、 C++或 UML 模型資源)對(duì)這一工具進(jìn)行擴(kuò)展。 調(diào)試。為構(gòu)造調(diào)試器和啟動(dòng)器定義獨(dú)立于語(yǔ)言的調(diào)試模型和 UI 類(lèi)。 Ant 項(xiàng)目構(gòu)造文件。 Ant 提供了通用的靈活構(gòu)造服務(wù),可以擴(kuò)展到專(zhuān)門(mén)的任