免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1372 | 回复: 1
打印 上一主题 下一主题

使用ejb的时机(请各位高手补充)-----摘自java程序设计:j2ee [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-12-29 15:05 |只看该作者 |倒序浏览
使用ejb的时机
1、当所开发的应用系统可能扩展至更大的使用层面,并支持多用户实时访问;
2、当所开发的应用系统需要支持事务管理;
3、如果所开发的系统需要一个安全模型。

不适宜的时机
1、当所开发的应用系统无需考虑任何可扩展性、事务管理或安全问题;
2、所开发的应用系统无需考虑任何平台无关性,并且不但心会在先后的开发工作中依赖相同的支持厂商;
3、当相关的开发团体并无甚多EJB开发经验,并且不希望培训或引入相关经验的时候,选择EJB这项相对基本JAVA开发较复杂的技术,应该说是不明智的。

论坛徽章:
0
2 [报告]
发表于 2003-12-29 18:40 |只看该作者

使用ejb的时机(请各位高手补充)-----摘自java程序设计:j2ee

From Rod Johnson's "Expert One-on-One J2EE Design and Development":

Implications of Using EJB:
- Using EJB makes applications harder to test
- Using EJB makes applications harder to deploy
- Using EJB with remote interfaces may hamper practicing OO design
- Using EJB may make simple things hard
- Reduced choice of application servers

Questionable Arguments for Using EJB:
- To ensure clean architecture by exposing business objects as EJBs
- To permit the use of entity beans for data access
- To develop scalable, robust applications

Compelling Arguments for Using EJB:
- To allow remote access to application components
- To allow application components to be spread across multiple physical servers
- To support multiple Java or CORBA client types
- To implement message consumers when an asynchronous model is appropriate

Important:
EJBs are a good solution to problems of distributed applications and complex transaction management. However, many applications don't encounter these problems. EJBs add unnecessary complexity in such applications. An EJB solution can be likened to a truck and a web application to a car. When we need to perform certain tasks, such as moving large objects, a truck will be far more effective than a car, but when a truck and a car can do the same job, the car will be faster, cheaper to run, more maneuverable and more fun to drive.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP