【正文】
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è)計外文文獻(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è)計外文文獻(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è)計外文文獻(xiàn)及譯文 15 中文譯文: 第一章 Java IDE 和其他 觀察 Eclipse 就 像觀察一顆切割良好的鉆石。你能看到什么,取決于觀察的角度和觀察的深度。在某些觀察者得眼中, Eclipse 是個具有一般 IDE 環(huán)境應(yīng)有的特性的 Java IDE,包括編輯器、調(diào)試器和具有各種 偏好定制 的項目構(gòu)造器。而在另一些人眼中, Eclipse 是工具集成的通用框架,具有擴(kuò)展的、靈活的 API 插件。在 的主頁上這樣說明,“ Eclipse 是一種通用的工具平臺,一個開放的可擴(kuò)展 IDE,并沒什么特別之處?!? 上述兩種觀 點都是有效的解釋。隨著 Eclipse 社區(qū)的迅速壯大,其他用戶還會把他看做一種建模工具、一種商業(yè)原則管理應(yīng)用程序、一種商業(yè)程序設(shè)計器、一種 C++語言編寫的嵌入式系統(tǒng)的開發(fā)平臺,或者一種編寫 HTML 和進(jìn)行文檔管理的環(huán)境。如果采用多功能客戶平臺( RCP)配置。 Eclipse 就是任何終端用戶客戶應(yīng)用程序的基礎(chǔ)。 介紹 Eclipse 的各個方面的書已經(jīng)有很多。本書則是把 Eclipse 作為一個構(gòu)造 Java 應(yīng)用程序的全面開發(fā)環(huán)境來介紹的。這些 Java 應(yīng)用程序可能是其他開源工具、大型的企業(yè)系統(tǒng)或者新的 Eclipse 插件。無論 是項目小組還是個人開發(fā)者,本書都很適用。 Eclipse 是由項目小組采用現(xiàn)代的敏捷開發(fā)過程開發(fā)的。 Eclipse 是由大型的分布式項目組采用迭代式開發(fā)方法,使用 eclipse 本身夜以繼日地進(jìn)行重構(gòu)和測試開發(fā)成的。因此,eclipse 非常適用于采用這種開發(fā)方法的所有項目。本書介紹了幾種敏捷開發(fā)小組常見的情況,詳細(xì)解釋了 Eclipse 如何協(xié)助完成這些任務(wù)。 本章將介紹 eclipse 的下列方面: Eclipse 平臺體系結(jié)構(gòu)的構(gòu)造模塊 其他 Eclipse 項目提供的開發(fā)組件 用 Eclipse 進(jìn)行敏捷開發(fā) Eclipse 平臺體系結(jié)構(gòu) 由于 Eclipse 的解釋多種多樣,因此很難簡潔地說明它的體系結(jié)構(gòu)。最一般的說法是“用于創(chuàng)建和部署插件的開發(fā)和運(yùn)行環(huán)境的一種抽象視圖”。此外,還有一種功能視圖,把Eclipse 描述為靈活的、可擴(kuò)展的集成開發(fā)環(huán)境( IDE)。我們采用后面一種觀點,把注意力放在 Eclipse 如何用一種并行的方式提高軟件開發(fā)工作的生產(chǎn)效率。 山東建筑大學(xué)畢業(yè)設(shè)計外文文獻(xiàn)及譯文 16 Eclipse IDE 如下所示: 多平臺。 的目標(biāo)操作系統(tǒng)是 Windows、 Linux( motif 和 GTK)、 Solaris、AIX、 HPUX 和 Mac OSX。 多語言。雖然 Eclipse 是用 Java 語言開發(fā)的,但是它支持用 Java、 C\C++和 Cobol編寫應(yīng)用程序,此外它還支持 Python、 Perl、 PHP 和其他語言。 Eclipse 的插件則必須用 Java 編寫。 多角色。除了編寫程序, Eclipse 還支持建模、測試、編寫網(wǎng)頁和許多其他角色。 圖 11 展式了 Eclipse IDE 的功能構(gòu)造模塊。每個模塊構(gòu)造在它之下的基礎(chǔ)模塊之上。正是 Eclipse 平臺的模塊性,使它獲得了空前的增長。整個平臺對于其他開源產(chǎn)品或者是添加了新模塊的商 業(yè)產(chǎn)品來說,都是開源和免版稅的。 深色的模塊是本書介紹的重點。不過,我們會同時介紹一些插件,對于專業(yè)任務(wù)它們能提高平臺的能力。這樣的例子有基于 Web 的應(yīng)用程序的單元測試框架、靜態(tài)代碼分析工具和確保與編碼標(biāo)準(zhǔn)一致的樣式檢查程序。 本章接下來的幾節(jié)將介紹圖 11 中示出的構(gòu)造模塊。 Eclipse 運(yùn)行平臺 核心的運(yùn)行時平臺提供了如下最基本的服務(wù): 插件注冊。裝載插件并管理可用插件的注冊表。 資源。管理操作系統(tǒng)文件和文件夾的獨立于平臺的窗口,包括鏈接資源的位置。 UI 組件。 Eclipse 的 用戶界面組件是以 SWT 和 JFace 庫為基礎(chǔ)的。 更新工具。 Eclipse應(yīng)有程序?qū)Π惭b和更新來自 URL可尋址位置(包括遠(yuǎn)程的 Inter站點)的插件具有內(nèi)置的支持。 山東建筑大學(xué)畢業(yè)設(shè)計外文文獻(xiàn)及譯文 17 幫助工具。所有插件共享一個通用的幫助工具。 Eclipse 的獨立于平臺的資源模型是在 IDE 中表示對象、文件夾和文件的重要基礎(chǔ),第 3 章“管理項目”中將介紹這一點。更新工具可以輔助你用新的插件定制 IDE,第 9 章“更新 Eclipse IDE”將介紹它。 所有這些基本服務(wù)都是在非常小的內(nèi)核上做為插件實現(xiàn)的。 Eclipse 把所有東西都設(shè)計為插件, 目的是完全一致地對待所有開發(fā)者(和所有插件)。這能確保該工具對平臺自身和任何客戶都有效。 集成開發(fā)環(huán)境 Eclipse IDE 通過多種語言和多種角色的開發(fā)活動提供了一個通用的用戶環(huán)境。構(gòu)造在 IDE 基礎(chǔ)之上的插件不必凡事從頭做起。 最重要的 IDE 特性如下: 共享窗口。許多 Eclipse 特性共享一個窗口,用于顯示和編輯屬性,羅列在代碼中發(fā)現(xiàn)的語法錯誤以及列出工作任務(wù)。 視圖。視圖將把一組相關(guān)的窗口組織成合適的特定任務(wù)(如 Java 開發(fā)、調(diào)試和版本 控制)的布局。 首選項。一個對話框?qū)压ぷ髌脚_中安 裝的所有插件的首選項設(shè)置頁面集中在一起。 搜索引擎。平臺的搜索引擎提供了搜索資源和表示結(jié)果的一般功能??梢杂觅Y源特定的搜索標(biāo)準(zhǔn)(如 Java、 C++或 UML 模型資源)對這一工具進(jìn)行擴(kuò)展。 調(diào)試。為構(gòu)造調(diào)試器和啟動器定義獨立于語言的調(diào)試模型和 UI 類。 Ant 項目構(gòu)造文件。 Ant 提供了通用的靈活構(gòu)造服務(wù),可以擴(kuò)展到專門的任