Review on Expert J2EE 1

J2EE Myths
1. Portability;
过分强调可移植性,会失去一些平台所特有的能力,增大投入,降低生产力。应该是Design Once, Re-implement a Few

Interface Anywhere.
2. Performance:
不能依靠应用程序服务器和硬件来提高性能,在设计时就应该把性能因素考虑进去。
3. Transparent:
尽管应用程序服务器可以管理很多底层的工作,但是不能完全依赖。
4. J2EE-EJB:
EJB并不是在所有的地方都能适用。
5. 适用性:
J2EE并不能解决所有问题,不能让所用的技术来决定解决问题的方法。

Goals of an Enterprise Architecture.
1. Be robust,reliable, and bug free
2. Be performant and scalable
3. Take advantage of OO design principles
4. Avoid unnecessary complexity
5. Be maintaninable and extensible
6. Be delivered on time.
7. Be easy to test
8. Promote reuse.
下面两点是由商业需求所决定的,并不是所有Enterprise Architecture都需要。
1. Support for multiple client types.
2. Portability.

Whether to User a Distributed Architecture
Benefits:
1. Support different type of client.
2. 可以将组件发布到多个服务器,解决瓶颈问题。

Problems:
1. Performance(remote call)
2. Complexity
3. Contraint on practicing OO design.

分布式并不是取得scalable, robust的唯一方法。同时,随着技术的发展,已可以避免通过RMI来使用EJB,例如Local

interface, soap web service.

When to Use EJB
EJB并不是J2EE中必要的技术,如果客户需求中需要分布式结构,并且使用RMI作为远程协议时才有必要使用EJB

在以下情况中使用EJB有优势:
1. Remote access over RMI
2. Distributed applications
3. Support multiple type of client
4. Message-driven application

在以下情况中需要衡量
1. Multi-threaded code
2. Transaction managemnet
3. Role-based security

Accessing Data
数据访问策略的选择是决定性能的关键
不管选择怎样的数据访问方法,最好能通过一抽象层将商业逻辑和具体数据访问实现相分离。

1. Entity Beans
考虑效率、复杂度、对container的依赖性
2. JDO
3. O/R Mapping
4. JDBC,可以作为O/R Mapping的补充。

State Management
Application that do not maintain server-side state is more scalable than application that do.
In cluster, the server-side state must be replicated.

存放地点:
HTTP session object, stateful session bean.

Enterprise Archtecture
Divide into UI, Business, EIS tiers
Each tier should only depends on the tier immediately beneath it.

Four J2EE Architectures:
1. Web application with business component interface
2. Web application accessing Local EIB
3. Distributed application with remoted EJB
4. Web application exposing web services interface.
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值