没有合适的资源?快使用搜索试试~ 我知道了~
POJO Application Frameworks_ Spring Vs. EJB 3
需积分: 9 18 下载量 104 浏览量
2007-12-20
22:05:18
上传
评论
收藏 72KB PDF 举报
温馨提示
试读
8页
POJO Application Frameworks_ Spring Vs. EJB 3
资源推荐
资源详情
资源评论
ONJava.com: POJO Application Frameworks: Spring Vs. EJB 3.0 http://www.onjava.com/lpt/a/5996
1 of 8 2005-7-1 13:36
Related Reading
Enterprise JavaBeans
By
Richard Monson-Haefel
,
Bill Burke
,
Sacha Labourey
Table of Contents
Index
Published on ONJava.com (http://www.onjava.com/)
http://www.onjava.com/pub/a/onjava/2005/06/29/spring-ejb3.html
See this
if you're having trouble printing code examples
POJO Application Frameworks: Spring Vs. EJB 3.0
by Michael Juntao Yuan
06/29/2005
Albert Einstein once said, "Everything should be made as simple as possible, but not simpler." Indeed, the
pursuit of scientific truth has been all about simplifying a theory's underlying assumptions so that we can
deal with the issues that really matter. The same can be said for enterprise software development.
A key to simplifying enterprise software development is to provide an application framework that hides
complexities (such as transaction, security, and persistence) away from the developers. A well-designed
framework promotes code reuse, enhances developer productivity, and results in better software quality.
However, the current EJB 2.1 framework in J2EE 1.4 is widely considered poorly designed and
over-complicated. Unsatisfied with the EJB 2.1 framework, Java developers have experimented with a
variety of other approaches for middleware services delivery. Most noticeably, the following two
frameworks have generated a lot of developer interest and positive feedback. They are posed to become
the frameworks of choice for future enterprise Java applications.
The Spring framework is a popular but non-standard open source framework. It is primarily
developed by and controlled by Interface21 Inc. The architecture of the Spring framework is based
upon the Dependency Injection (DI) design pattern. Spring can work standalone or with existing
application servers and makes heavy use of XML configuration files.
The EJB 3.0 framework is a standard framework defined by the Java Community Process (JCP) and
supported by all major J2EE vendors. Open source and commercial implementations of pre-release
EJB 3.0 specifications are already available from JBoss
and Oracle. EJB 3.0 makes heavy use of
Java annotations.
These two frameworks share a common core design philosophy: they both
aim to deliver middleware services to loosely coupled plain old Java
objects (POJOs). The framework "wires" application services to the
POJOs by intercepting the execution context or injecting service objects
to the POJO at runtime. The POJOs themselves are not concerned about
the "wiring" and have little dependency upon the framework. As a result,
developers can focus on the business logic, and unit test their POJOs
without the framework. In addition, since POJOs do not need to inherit
from framework classes or implement framework interfaces, the
developers have a high degree of flexibility to build inheritance structures
and construct applications.
However, while sharing an overall philosophy, the two frameworks use
very different approaches to deliver POJO services. While numerous
books and articles have been published to compare either Spring or EJB
3.0 to the old EJB 2.1, no serious study has been done to compare Spring
to EJB 3.0. In this article, I will examine some key differences behind the
Spring and EJB 3.0 frameworks, and discuss their pros and cons. The
topics covered in this article also apply to other lesser-known enterprise
资源评论
luanfeng2008
- 粉丝: 6
- 资源: 110
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功