作者TonyQ (骨头)
看板java
标题[文件] xdoclet简介
时间Sun Jun 8 00:44:57 2008
最近在学着使用的工具,
一边翻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)