can anybody explain about the model view controller in Java with example.,?

can anybody explain about the model view controller in Java with example.,? it is so confused for me..I referred sun blueprints but it is not so clear.

Model ; it deals with database?
View ; presentation logic oriented ?
Controller ; business logic oriented ??

Replies

  • sookie
    sookie
    Let me try to explain the stuff with the basic architecture (let's forget about MVC for the time being).
    A typical web architecture looks like below

    [​IMG]
    Even in above picture, sometimes Model is also missing. Everything is quite clear in above picture. User request is directly processed.

    Now let's see how a Web MVC looks like
    [​IMG]
    In above diagram the client request is intercepted by a servlet( A controller). It handles the inital processing request and determines which JSP(View) page to display .

    Now Please tell your exact confusion . 😀
  • savitha_chandu
    savitha_chandu
    I'll give you an overview of the components of the Model View Controller design pattern.
    - Model : these are the javabeans with their properties and methods (the getters, setters and constructors). The javabeans correspond to the concepts the users of your web application will use. For example, if your web application sells products, you will certainly have the following java beans : product, customer, order, invoice.
    You could say that this is the heart of the business layer.
    - View : these are the java server pages (JSP's). The JSP's only take care of the presentation of the data.
    Therefor you can call this the presentation layer.
    - Controller : this is the very heart of the application. Since a web application works with request - response, there must be a program able to catch every request and to formulate a response on it. This is the controller or servlet.

    try out this link may be it can help you.
    #-Link-Snipped-#

You are reading an archived discussion.

Related Posts

I want to control a home appliance like a table lamp on or off by giving command from my cell phone to the system which would b fitted in the...
Lots of my classmates will go for advanced java for their upcoming training. can anyone explain me short what is difference between advanced java and core java?
i need ebooks on PIC16f877a and Atmega16/32 microcontrollers at my place, in markets, they don't sell such books, and i can't go to metro cities so i need to download...
OPTILED Lighting International (OPTILED), a pioneer in LED lighting for the past decade, will be showing its full range of products at Light+Building 2010. Frankfurt, Germany – 12 April 2010...
Sir / Madam, My questions is, A positive whole number M less than 100 is represented in base 2 notation, base 3 notation, and base 5 notation. It is found...