Frameworks| Hibernate| Struts| JSF| JavaFX| Ajax| Spring| DOJO| JDO| iBatis| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials:
 

Software Solutions and Services
 

 
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments
 
MVC Architecture 
 

The main aim of the MVC architecture is to separate the business logic and application data from the presentation data to the user.

 

MVC Architecture

                         

The main aim of the MVC architecture  is to separate the business logic and application data from the presentation data to the user.

Here are the reasons why we should use the MVC design pattern.

  1. They are resuable : When the problems recurs, there is no need to invent a new solution, we just have to follow the pattern and adapt it as necessary.
  2. They are expressive: By using the MVC design pattern our application becomes more expressive.

1).  Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.  

2). View : The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if there is any modification in the business logic. In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes.

3). Controller:  Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.

Difference between Model 1 and Model 2 architecture:

Features of MVC1:

  1. Html or jsp files are used to code the presentation. To retrieve the data JavaBean can be used.
  2. In mvc1 archictecture all the view, control elements are implemented using Servlets or Jsp.
  3. In MVC1 there is tight coupling between page and model as data access is usually done using Custom tag or through java bean call.

Features of MVC2:

  1. The MVC2  architecture removes the page centric property of MVC1 architecture by separating Presentation, control logic and the application state.
  2. In MVC2 architecture there is only one controller which receives all the request for the application and is responsible for taking appropriate action in response to each request.

                         

» View all related tutorials
Related Tags: c programming apache web com development asp ui framework build application io components make sed get ip hook vi concepts

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

44 comments so far (
post your own) View All Comments Latest 10 Comments:

well guys it's a MVC topic not Struts so comment relating the topic.

It would be nice if this tutorial is expanded to include various examples from PHP, RoR and other framework's in language to tell how MVC is used and the directory structure is maintained so everyone can have a deeper understanding.

Posted by Adeel Shahid on Friday, 12.12.08 @ 05:21am | #82680

I want Struts,JMS ,Hibernate architecture

Posted by Naidu on Wednesday, 06.18.08 @ 10:08am | #63687

it is very useful

Posted by srikanth on Monday, 04.21.08 @ 13:33pm | #57392

I need to know the basics about struts....

Posted by Sathya Priya on Wednesday, 03.19.08 @ 16:19pm | #53314

who to work struts & explain it struts config mappings.

Posted by ashokraja on Wednesday, 02.20.08 @ 15:40pm | #49200

Have any disadvantag in java?

Posted by Raja Mohamed on Monday, 02.18.08 @ 10:23am | #48868

Hello everybody,,,,,,,,i would like to know to know the FAQ's asked in interviews.

Posted by aravind on Friday, 02.15.08 @ 18:09pm | #48405

should have some examples too for explanation

Posted by abhishek on Saturday, 02.9.08 @ 18:20pm | #47698

Explain about struts framework?

Posted by haji on Thursday, 01.24.08 @ 11:31am | #45985

what are the new Struts versions?

Posted by kalil on Saturday, 01.19.08 @ 23:06pm | #45620

Training Courses
Tell A Friend
Your Friend Name
Website Designing Services
 
Web Designing Packages From $150!
 
Website Designing Company Web Hosting
 
Website Designing Quotation
 
Search Tutorials:

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.