Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java EE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:寻最佳系统构架? [Re:floater]
yadan



Jute User


发贴: 226
积分: 30
于 2003-06-18 14:46 user profilesend a private message to usersend email to yadansearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
谢谢大家,特别是floater斑竹!Smile
小弟还有一些问题麻烦。。。。。


1. Persist layer should be coded against interfaces so that you can switch between different implementations, like jdbc, entity beans, hibernate, jdo, etc.

这条太好了。持久层做成接口,用实体bean、jdbc、jdo实现都可以。客户端只要知道这个接口就行。确实很好。小弟经验少,有点肤浅的问题,实体bean、hibernate产生的类等怎么和自己系统定义的接口很好的关联?我的意思是这样的:
假设系统定义一个接口:

public interface User extends java.io.Serializable
{
public long getID();
............
}

对接口User用EJB实体bean来实现,

public interface UserEJB extends EJBObject
{
............
}
public class UserEJBBean implements EntityBean
{
.........
}
public interface UserEJBHome extends EJBHome
{
.........
}

UserEJB怎么和User接口很好地关联?


3. Web or GUI interface should be isolated too. Application/business logic should be coded in javabean or standard class, session beans should serve as glues at best, or simply out of the picture if entity bean is not used.

sessin bean最好作为粘合剂?(业务逻辑和数据层之间的?)或者说如果实体bean不用的话,session bean也彻底不要了(out of the picture是这个意思么,见笑Tongue)。如果session bean不要,GUI的程序有什么方式得到远程对象?




话题树型展开
人气 标题 作者 字数 发贴时间
8423 寻最佳系统构架? yadan 549 2003-06-18 10:03
8075 Re:寻最佳系统构架? jameszhang 61 2003-06-18 11:28
7494 Re:寻最佳系统构架? bujinwang 680 2003-06-18 11:43
7430 Re:寻最佳系统构架? floater 791 2003-06-18 12:26
7459 Re:寻最佳系统构架? yadan 1110 2003-06-18 14:46
7400 Re:寻最佳系统构架? floater 1443 2003-06-18 22:22
7424 Re:寻最佳系统构架? yadan 1104 2003-06-19 10:23
7361 Re:寻最佳系统构架? floater 188 2003-06-19 12:51
7650 Re:寻最佳系统构架? juweiping 183 2003-06-19 13:34
7447 Re:寻最佳系统构架? yadan 280 2003-06-19 15:08
7625 Re:寻最佳系统构架? juweiping 151 2003-06-19 15:49
7446 Re:寻最佳系统构架? yadan 238 2003-06-19 16:07
7544 Re:寻最佳系统构架? Julian13 1236 2003-06-19 09:09
7373 Re:寻最佳系统构架? floater 1313 2003-06-19 12:49
7771 Re:寻最佳系统构架? juweiping 163 2003-06-19 16:26

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923