Win a copy of Mastering Non-Functional Requirements this week in the Design forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can i use static DB connection and DAO methods?  RSS feed

 
Miri Yusifli
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If my app is local app , can i use static DB connection and DAO methods . My app is mobie app and dont use internet , just one user will use it on every devices. Is to use static DAO methods true?
 
Knute Snortum
Sheriff
Posts: 3714
90
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's fine to have your DB connection be a singleton, not just static.  I've always written my DAOs as non-status classes. 
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!