MVC architecture
5 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Abha_Salhotra
Posted On:   Friday, May 28, 2004 11:34 PM


I am new to J2EE technology.I want to know that in MVC architecture, which component talks with databse(i.e. where do we write SQL queries), Servlet or Bean? i am not using EJBs, but Java Bean in my project. Are EJBs essential in MVC architecture? Desperately need to clarify the basics of MVC Architecture.


thankx in advance
Abha

Re: MVC architecture

Posted By:   narender_reddy  
Posted On:   Tuesday, June 8, 2004 04:06 AM

Hello Abha,

MVC is a j2ee design pattern which specifies that
model,view,controller s must be loose coupled.in wide
if we r using applets then the event
source,eventlisteners,eventhandling logic are independent from each other. in same way if we consider web
application


-- the browser/clientend -- view

--- servlet/jsp---------------controllers

---- ejb/-------------------model



these must be as independent as possible.

-The main objective is to delegate the resposiblities to
different components. hope u got it?let me know issues

regarding this if there are any.

Re: MVC architecture

Posted By:   narender_reddy  
Posted On:   Tuesday, June 8, 2004 04:04 AM

forgot to tell you that a good architecture will never allow a servlet or jsp page to talk with database directly.as the same case with EJB's also.there must an interface.Regarding DB the beterway is to write in Entity beans .

Re: MVC architecture

Posted By:   narender_reddy  
Posted On:   Tuesday, June 8, 2004 04:02 AM

forgot to tell you that a architecture will never allow a servlet or jsp page to talk with database directly.as the same case with EJB's also.there must an interface.Regarding DB the beterway is to write in Entity beans .

Re: MVC architecture

Posted By:   narender_reddy  
Posted On:   Tuesday, June 8, 2004 03:39 AM

Hello Abha,

MVC is a j2ee design pattern which specifies that
model,view,controller s must be loose coupled.in wide
if we r using applets then the event
source,eventlisteners,eventhandling logic are independent from each other. in same way if we consider web
application


-- the browser/clientend -- view

--- servlet/jsp---------------controllers

---- ejb/-------------------model



these must be as independent as possible.

-The main objective is to delegate the resposiblities to
different components. hope u got it?let me know issues

regarding this if there are any.

Re: MVC architecture

Posted By:   Sean_Owen  
Posted On:   Saturday, May 29, 2004 07:05 AM

Search for a tutorial for "MVC" on the internet -- you will find a lot of information. The MVC architecture is a generic idea and does not require a particular technology. You could use JavaBeans or EJBs as part of the "model". In J2EE, a good way to employ the MVC architecture is to use Struts in your web application. It is a widely-used and effective MVC framework for J2EE web applications. See the Struts tutorial for good information about how "MVC" maps to a Struts application.
About | Sitemap | Contact