• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Client data

 
jacob deiter
Ranch Hand
Posts: 584
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to save client side form-data which were entered by user to database.I have a pojo which represent exact table structure and this pojo is used to save the data into database.

What are best design pattern suitable for this.So I don�t have any dependency between any layers
 
Devender Thareja
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Made your pojo a DTO and pass it to a DAO object. This is DAO pattern. It hides your lower level database access details within the DAO object, hence higher level layers do not have dependency on your database details.
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1103
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use JPA and persist the data. This is the Domain Object pattern.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic