Java Reference
In-Depth Information
the Order class because users would be frustrated if they could not save the
changes that they made to an order.
Summary of the high-level decisions
The team has made a number of key design decisions. They have decided that the
business logic must be primarily organized using a JDO -based domain model, and
encapsulated using POJO façades that use detached domain objects as DTO s.
Finally, they have decided to use optimistic locking as the database-level concur-
rency mechanism, the Optimistic Offline Lock pattern as the default offline lock-
ing mechanism, and the Pessimistic Offline Lock pattern when necessary.
However, these decisions are not completely set in stone, and they agree to revisit
them as more is discovered about the application during development. Table 2.2
summarizes the architectural choices and options available to the developers.
Table 2.2
Architectural decisions
Decision
Options
Business logic organization strategy
Domain model with transaction scripts
where necessary
Business logic encapsulation strategy
POJO façade
Persistence strategy
JDO for the domain model
Online concurrency strategy
Optimistic locking
Offline concurrency strategy
Optimistic Offline Lock pattern
Pessimistic Offline Lock pattern (if required)
Table 2.2 shows the default design decisions the team made when implementing
each component of the application. However, a developer working on a particular
use case can use a different approach if it is absolutely necessary. For example, she
might discover that the business logic for a use case needs to execute SQL directly
instead of JDO in order to achieve the necessary performance. Let's look at exam-
ples of the decisions that are made when developing individual use cases.
2.7.3
Making use case-level decisions
Mary, Tom, Dick, Harry, and Wanda are each responsible for analyzing one use
case and determining the most appropriate option for each design decision. Nat-
urally, they have to work within the constraints imposed by the architecture that
they have defined. In addition, even though some business logic components are
 
 
Search WWH ::




Custom Search