| Author |
Opinion with db access
|
Davie Lin
Ranch Hand
Joined: Aug 05, 2007
Posts: 294
|
|
Hi everyone, I was wondering if it's better to have the jdbc code in the Controller or the Model? or does that even matter at all. Which is the standard practice amount you experienced programmers? Thanks
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
All DB access should be hidden behind the Model layer in my opinion.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
pravin kantipudi
Greenhorn
Joined: Mar 23, 2008
Posts: 5
|
|
all jdbc code should be in a DAO.Data Access Object pattern. Your controller class should invoke model class which inturn should invoke DAO class to do all jdbc calls hope this explains. Look at DAO pattern for more info
|
 |
Davie Lin
Ranch Hand
Joined: Aug 05, 2007
Posts: 294
|
|
Where can I find more DAO info? Can anyone of you provide me a link that I can do more research about it? Thank you
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
http://en.wikipedia.org/wiki/Data_Access_Object
|
 |
 |
|
|
subject: Opinion with db access
|
|
|