Java Reference
In-Depth Information
Part 3
Variations
Part 2 described one effective way to design the business and database access
tiers. In part 3, you will learn about other approaches. Chapter 8 describes how
you can dispense with the façade that encapsulates the business logic. Although
exposing the domain model to the presentation tier might sound like heresy,
doing so has its benefits. There is less code to write and maintain. It also avoids
some of the potential problems with using detached objects. But as you will dis-
cover, in order to use this approach you must solve some tricky database connec-
tion and transaction management issues.
I'm a great fan of using object-oriented design and ORM frameworks. But some-
times this approach doesn't make sense. In chapter 9 you will learn when you
should consider implementing the business logic using a procedural design and
accessing the database using i BATIS . This chapter describes how to develop a pro-
cedural business logic starting from a use case and how to structure it in a way that
makes it easier to maintain. You will learn how to access the database using
Spring's i BATIS support classes.
Dissatisfaction with EJB motivated the Java community to adopt alternative
frameworks such as Spring, Hibernate, and JDO . In response, EJB has evolved and
embraced many POJO and lightweight framework concepts. Chapter 10 examines
EJB 3 and compares it to JDO , Hibernate, and Spring. You will learn about the ben-
efits and drawbacks of EJB 3 . This chapter describes how to use EJB 3 to persist the
domain model developed earlier in chapter 2 and exposes some significant limita-
tions. It also looks at how to implement the session façade developed in chapter 7
as an EJB 3 session bean. You will learn how to use EJB 3 dependency injection to
assemble an application. This chapter also describes how to integrate EJB 3 depen-
dency injection with Spring to enable the injection of POJO s.
 
Search WWH ::




Custom Search