dcsimg
Should Beans access directly to DB to full themself und to update db?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Michael_Decker
Posted On:   Thursday, December 2, 2004 08:25 AM

Hello! I had a discussion about beans. We use beans to transfere information from controller/businesslogic to view (MVC-Model: http://java.sun.com/developer/technicalArticles/javaserverpages/servlets_jsp/ near at bottom). So a few people think, it would be better, to implement all load from db und update to db functions into that bean. Other people (like me) think, we had to create a special class to manage updating of db with bean-datas and filling bean with datas from db. So I would be interested, what you think... And what are your expiriences...    More>>

Hello!


I had a discussion about beans. We use beans to transfere information from controller/businesslogic to view (MVC-Model: http://java.sun.com/developer/technicalArticles/javaserverpages/servlets_jsp/ near at bottom).
So a few people think, it would be better, to implement all load from db und update to db functions into that bean. Other people (like me) think, we had to create a special class to manage updating of db with bean-datas and filling bean with datas from db.

So I would be interested, what you think... And what are your expiriences...

   <<Less

Re: Should Beans access directly to DB to full themself und to update db?

Posted By:   guru_prasanth  
Posted On:   Friday, December 31, 2004 02:42 AM

beans should not directly acess database.I am assunming beans in ur application are nothing but entity objects.what u can do is write a dao class which with do the data access and set the values of database to ur entity objectsn and vice versa.just check the DAO patter and VO pattern
About | Sitemap | Contact