|
|
От: |
Gollum
|
|
| Дата: | 17.07.03 11:49 | ||
| Оценка: | |||
The Sun Java Pet Store makes heavy use of Bean Managed Persistence (BMP) in its middle-tier
Enterprise Java Beans (EJB). Essentially, this provides the objects a mechanism to persist their
state to the database. The .NET Pet Shop takes a different approach in that the middle-tier
components make calls to stored procedures in the database. Using stored procedures at the
database level is well established as a best-practice for distributed applications. It provides a
cleaner separation of code from the middle-tier and also helps clarify the transaction context and
scope.Only basic queries are encapsulated in the stored procedures; business logic remains in
the middle tier .NET classes.