银英作为科幻的硬伤- -| 回首页 | 2005年索引 | - -Java的前世今生

Annotation Sucks?!- -

                                      

http://forum.javaeye.com/viewtopic.php?t=14482

http://www.almaer.com/blog/archives/000993.html

引用:

I am getting to play with Hibernate 3, and they have done a nice job. I was poking around the Caveat Emptor example from Hibernate in Action, which was updated for Hibernate3.

...

Is this better than XML? To have this code sucked in?

NOTE: You don't have to use the annotations of course.

robbin 写道:
一直比较反感annotation,把Java代码弄得不像代码的样子,看起来就不爽。

关键是耦合太深。就拿hibernate来说吧,若是用XML,数据库改个字段名,服务器这边只需要改XML文件;若是用annotation,就得改source code,然后recompile。关键是在server上要改东西很可能压根找不到source code,或者找到也不一定有环境编译,这就比较恶心了。

- 作者: 透明 2005年07月9日, 星期六 17:23

Trackback

你可以使用这个链接引用该篇日志 http://publishblog.blogdriver.com/blog/tb.b?diaryID=800873

回复

- 评论人:我心飞翔12

Wed Jul 13 11:04:53 CST 2005  作者邮箱  作者Blog

:)

评论内容: