由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 探讨一个 ORM + web service 的问题
相关主题
java web service 得迷惑java SOAP比restful难学吗?
JAXBXML schema to instance generator?
Web service neededHow to create a binding schema in jaxb.
ETL process in JAVA. --有建议的请回这个贴。什么是JAX WS
怎么把servlet publish成web servicesHelp: web service questions
How to create web service client to remote SSL service (HTTPS)?Job with Oracle PL?
soap binding with CXF前端和后端开发哪个好? (转载)
现在做jasper report,amazon web services了,goodbug我要经常向你请教了。现在hibernate这种流行框架
相关话题的讨论汇总
话题: object话题: xsd话题: orm话题: web话题: service
进入Java版参与讨论
1 (共1页)
S*********t
发帖数: 78
1
我看到很多人都是从数据库来生成domain object(entity)和 xsd ,然后用在web
service 数据传递。
可不可以先写 domain objects 然后用这个object 生成 xsd 呢?
感觉第一种方法 OO 不够好,是以数据库表为驱动的。
大家怎么看这个问题?
g*****g
发帖数: 34805
2
在我看来,web service只是remoting的一种方法,应该对xml透明。
用CXF之类的生成相关的wsdl即可,具体内容不必关心。

【在 S*********t 的大作中提到】
: 我看到很多人都是从数据库来生成domain object(entity)和 xsd ,然后用在web
: service 数据传递。
: 可不可以先写 domain objects 然后用这个object 生成 xsd 呢?
: 感觉第一种方法 OO 不够好,是以数据库表为驱动的。
: 大家怎么看这个问题?

t*******e
发帖数: 684
3

要看是先设计数据库,还是先设计object model,我做的几个项目用hbm2ddl从object
model生成relational schema.和DBA的沟通很重要的,有许多实用的auditing columns
一般Java programmer不会想到。

【在 S*********t 的大作中提到】
: 我看到很多人都是从数据库来生成domain object(entity)和 xsd ,然后用在web
: service 数据传递。
: 可不可以先写 domain objects 然后用这个object 生成 xsd 呢?
: 感觉第一种方法 OO 不够好,是以数据库表为驱动的。
: 大家怎么看这个问题?

t*******e
发帖数: 684
4

我开始的想法和你的类似。但实际上WS已经发展的非常远了。
Object centric web services比较合适企业内部使用,原因是简单,xml透明。但当通
信要跨越corporate boundaries 时,document centric (contract-first) approach
更合适些,这种情况下,method (operation) binding就被忽略了,所有的信息都包含
在XSD之中,包括具体的operations,transaction, security,policy等等。
修改一下,所有的信息都包含在XSD之中,以及SOAP headers里面。

【在 g*****g 的大作中提到】
: 在我看来,web service只是remoting的一种方法,应该对xml透明。
: 用CXF之类的生成相关的wsdl即可,具体内容不必关心。

m******t
发帖数: 2416
5

approach
+1. Any application serious about interoperability has _got_ to
start with the schema and wsdl.

【在 t*******e 的大作中提到】
:
: 我开始的想法和你的类似。但实际上WS已经发展的非常远了。
: Object centric web services比较合适企业内部使用,原因是简单,xml透明。但当通
: 信要跨越corporate boundaries 时,document centric (contract-first) approach
: 更合适些,这种情况下,method (operation) binding就被忽略了,所有的信息都包含
: 在XSD之中,包括具体的operations,transaction, security,policy等等。
: 修改一下,所有的信息都包含在XSD之中,以及SOAP headers里面。

m******t
发帖数: 2416
6

columns
I always generate a draft DDL from the object model, but always
hand-write the final version (working with DBA as you pointed out).
I know the trend is to generate one from the other, but I think
for any non-trivial application, it's really worth it to hand roll
the object model and the db schema, considering how incredibly
critical they are in the entire architecture.

【在 t*******e 的大作中提到】
:
: 我开始的想法和你的类似。但实际上WS已经发展的非常远了。
: Object centric web services比较合适企业内部使用,原因是简单,xml透明。但当通
: 信要跨越corporate boundaries 时,document centric (contract-first) approach
: 更合适些,这种情况下,method (operation) binding就被忽略了,所有的信息都包含
: 在XSD之中,包括具体的operations,transaction, security,policy等等。
: 修改一下,所有的信息都包含在XSD之中,以及SOAP headers里面。

1 (共1页)
进入Java版参与讨论
相关主题
现在hibernate这种流行框架怎么把servlet publish成web services
File generated by Java cannot be read by Android AppHow to create web service client to remote SSL service (HTTPS)?
XSD to java beanssoap binding with CXF
Java/J2EE的书现在做jasper report,amazon web services了,goodbug我要经常向你请教了。
java web service 得迷惑java SOAP比restful难学吗?
JAXBXML schema to instance generator?
Web service neededHow to create a binding schema in jaxb.
ETL process in JAVA. --有建议的请回这个贴。什么是JAX WS
相关话题的讨论汇总
话题: object话题: xsd话题: orm话题: web话题: service