最近在學著使用的工具,
一邊翻manual也一邊翻譯成文件,順便推廣給版上的同好們。
英文原文來自
http://xdoclet.sourceforge.net/xdoclet/index.html
────────────────────────────────
Welcome! What is XDoclet?
XDoclet is an open source code generation engine. It enables
Attribute-Oriented Programming for java. In short, this means that you can
add more significance to your code by adding meta data (attributes) to your
java sources. This is done in special JavaDoc tags.
主要是用來產生自動產生code的引擎,
從撰寫javadoc的屬性中,可以增加程式碼的意義。
XDoclet will parse your source files and generate many artifacts such as XML
descriptors and/or source code from it. These files are generated from
templates that use the information provided in the source code and its
JavaDoc tags.
從樣板產生需要的許多文件(如xml描述檔)
XDoclet lets you apply Continuous Integration in component-oriented
development. Developers should concentrate their editing work on only one
Java source file per component.
簡單來說
可以用修改一個檔案的方式完成相關一連串檔案的處理
減少一些多餘的處理過程。
This approach has several benefits:
這個方法的一些好處
1.You don't have to worry about out dating deployment meta-data whenever you
touch the code. The deployment meta-data is continuously integrated.
你不需要擔心當你處理這些資料時會有過期的發佈 meta-data,
發佈的資料是持續性的處理。
2.Working with only one file per component gives you a better overview of what
you're doing. If your component consists of several files, it's easy to lose
track. If you have ever written an Enterprise Java Bean, you know what we
mean. A single EJB can typically consists of 7 or more files. With XDoclet
you only maintain one of them, and the rest is generated.
一個component只專注在一個檔案可以有助益你瞭解你正在做的事情的概要。
如果你的元件由多個檔案組合,容易漏掉其中幾個的蹤跡,
如果你曾經寫過EJB,你會知道我在說什麼。
單一EJB通常會帶有七個以上的檔案,
使用Xdoclet你只要處理其中一個,其他的就會被產生。
3.You dramatically reduce development time, and can concentrate on business
logic, while XDoclet generates 85% of the code for you.
當XDoclet幫你產生85%程式碼時,你可以戲劇性的減少開發時間,
並且可以專注在企業邏輯,
Currently XDoclet can only be used as part of the build process utilizing
Jakarta Ant.
目前XDoclet只能在 ant 的 build access 被當作擴充的一項處理來使用。
Although XDoclet originated as a tool for creating EJBs, it has evolved into
a general-purpose code generation engine. XDoclet consists of a core and a
constantly growing number of modules. It is fairly straightforward to write
new modules if there is a need for a new kind of component.
雖然XDoclet 原本是產生EJB的一個工具,
他逐漸形成通用的code產生引擎。
XDoclet 由一個核心跟不斷新增的模組構成。
你可以非常簡單地去寫新模組,如果新種類的component需要。
XDoclet comes with a set of modules for generation of different kinds of
files. Users and contributors can write their own modules (or modify existing
ones) if they wish to extend the functionality of XDoclet.
XDoclet 帶來一群產生不同種類程式碼的模組,
使用者和貢獻者可以撰寫自己的模組(或修改已經存在的一些),
如果它們希望擴充XDoclet的功能。
────────────────────────────────
後面還有一段是使用XDoclet的幾個理由,摘要如下:
1.減少多餘的工作
2.使J2EE變得簡單
3.支援伺服器與工具
4.可擴充性
5.開放、分散式的開發
────────────────────────────────
TonyQ 按:
我會研究這個主要是希望由 model的 java 檔的註解,
產生hibernate 的 hbm檔。
--
http://tony1223.no-ip.org:1986/JSPWiki/Wiki.jsp?page=XDoclet_1
--
What do you want to have ? / What do you have?
從書本中,你可以發現我的各種興趣。
從CD中,你可以瞭解我所喜歡的偶像明星。
或許從文字你很難以瞭解一個人,但從物品可以。
My PPolis , My past. http://ppolis.tw/user/Tony1223
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.134.27.68
※ 編輯: TonyQ 來自: 220.134.27.68 (06/08 00:58)