• Post Reply Bookmark Topic Watch Topic
  • New Topic

MVC Design Isssue  RSS feed

 
Uma Kanth
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where should I do my database operations either in bean(class) or in the controller(servlets or jsp)?
I have checked out the previous threads but they are not clear
Please help me?
 
Ninad Koyande
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ideal way in MVC is to carry to interactions with legacy application or Databases in beans rather than servlets.
When an application scales, the complexity of it also increases as new design strategies are required. Scaling requires clustering of servers, load balancing, and sharing of resources, which in turn, create new issues if you have them in the servlets i think it would create problems in maintaing application
 
Ninad Koyande
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just in case you are using struts for your MVC based application your code for database interaction will be in Action classes after carrying out your validation in ActionForm classes.
 
Napa Sreedhar
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Business logic and database operations can be put in beans. Resource sharing, threading and many other issues are handled efficiently by the EJB container(Application server).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!