• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the advantage of Persistence layer

 
Viswa
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
We can use Torque as Persistence layer to seperate Business logic and DB. What all are the features of using these type of persistence layer above the database?


Thanks in advance.

Cheers,
Viswanath
 
Jeremy Wilson
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Separation of code has been the big advantage for me. All SQL code and configuration is in one location and the application logic uses a common data model. It also allows you to move to different back end implementations without changing application logic. Our application uses hibernate as a persistance layer in small installations and EJB CMP and Session beans for large deployments. The application business logic and views never change, it is common in both deployment scenarios. With out this abstraction we could never do this.
 
Jayesh Lalwani
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Flexibility
If you need to change databases, or if you want to change how you access database(EJB/DAO) then you just change your persistence layer
2) Reusability
I in big enterprise-wide solutions, you might have multiple applications going to the same central database. Having a seperate persistence layer allows you to reuse you database code
3) Division of labor
You can have programmers that have database expertise work on your database layer, and programmers who have domain knowledge can code your business layer. If you muddle them all up, then either you need a programmer who has domain knowledge AND expertise in database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic