Pradeep's Blog

Google

Monday, May 22, 2006

Session Façade:

Session façade is one of the design patterns used in enterprise applications. Before I explain how it’s actually implemented lets have a look at the various components that make up the enterprise system.
1. Client: Either a browser or a custom software.
2. Session beans: This is where all the business logic takes place in the enterprise system.
3. Entity Bean: It represents the database in object form.
4. And lastly the database.

Now let’s see how session façade can be implemented for a banking application. Let’s consider that the client can access his account via a browser or ATM. If the client wants to transfer money, from his account to another account, there are few things that have to be done by the bank; check his authorization and his balance.

In session façade the client software would never talk directly to the data base (i.e. the entity bean representing the database) instead it would talk to the session bean where, all the business logic like checking his credit balance and his password would be done. It’s the session bean that talks to the entity bean to get the required data to validate and perform the transfer.

The diagram below shows what I have explained.

0 Comments:

Post a Comment

<< Home