Tuesday, July 14, 2009

Fast Lane Reader Pattern - When to use this?

For our last few developments, we follow the Service --> Business --> DAO layer architecture.

We strictly follow that the Service layer can call only Business layer and not DAO, the same way Business layer can call only the DAO layer and not the Service layer, this is approach is very much OK for all the CRUD operations

But this approach is tedious, unnecessary and overhead for some straight forward operations like just to display large data without many validations, manipulations, business logic and so on… in this scenario we use Fast Lane Reader pattern. By this pattern we can call DAO layer directly from Service layer. So we avoid the complexity.

Conditions to use this

1. The data must be sued for Read only purpose and the data access also read only
2. It must be as a tabular form instead of Object form
3. Use only when the Data accuracy is not a crucial factor, means efficiency is more important than the current data.

We could achieve fast retrieval of large data…

We could avoid complexity in code, another way this will increase the design and code complexity by providing another passage to access the data.

0 comments: