OnJava:利用metadata来验证数据

王朝java/jsp·作者佚名  2006-01-09
宽屏版  字体: |||超大  

很多开发人员都在不停的抱怨他们不得不管理数量众多的XML配置文件。随着java新版JDK(Tiger)带来新的元数据,那些框架下的公共配置将通过annotation写入到java源代码中。

在这篇文章中我们将通过一个数据验证框架的例子来回顾现有的配置数据管理,以及元数据将给我们带来那些好处。

Many developers have been complaining about having to manage numerous XML configuration files alongside their Java code. With the recent addition of metadata to Java, common configuration details in frameworks can now be rolled right into your Java files through annotations. For a brief introduction to metadata and annotations, see Sun's article "J2SE 5.0 in a Nutshell."

In this article, we will summarize how configuration data is managed today and what metadata will offer in the future, followed by an implementation of how annotations can be used in a simple validation framework

原文见:http://www.onjava.com/pub/a/onjava/2005/01/19/metadata_validation.html

(另:在第二期的java电子杂志里也将专门论述annotation)

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有