All About Java

Java based MVC Architecture

Java based MVC Architecture

Web Frameworks are all very different and have been typically created for different reasons and to achieve different goals. Java based web frameworks are

  • Spring MVC
  • JSF
  • Struts
  • Google Web Toolkit
  • Play
  • Wicket
  • Grails
  • Vaadin
  • Tapestry
  • MVC 1.0
  • Stripes
  • and many more

Java MVC is a design paradigm or design pattern that emerged out of user interface development. Java based MVC frameworks has been evolving over the last 10 to 15 years. In Java, there are two kinds of MVC architecture. They are:

  1. UI Component Oriented MVC Architecture
  2. Action Oriented MVC Architecture

UI Component Oriented MVC Architecture

These are component based. It is also called as Pull based MVC Architecture. In the UI component oriented MVC architecture implementations, the view layer is the starting point and working back. In this rachitecture UI components are simply pieces of UI controls that are reusable and define functionality and behavior.

This kind of architecture focus on rich UI development. The responsibility of view’s is to pull the data from multiple controllers and render itself. The controller will not give any data.

Among the subsequent client request, client state information’s are maintained in these kind of frameworks. It reduces the extra no of lines of code maintain the state information’s.

Example of UI Component Oriented MVC Architecture

Action Oriented MVC IArchitecture

These are lightweight request based framework. It is also called as Push based MVC Architecture. In this kind of framework the controller will process requests/actions from the UI components, and then decide the view to be rendered in response to each request. State often is not save across different requests.

Here, the controller will give the appropriate data to the view to render.

Among the subsequent client request, client state information’s are not maintained in these kind of frameworks.

Examples of Action Oriented MVC Architecture

After the introduction of Java SE annotations concept, these Action Oriented MVC Architecture frameworks frequently used annotations to extremely reduce the amount of configuration needed in the XML file.

Comments are currently closed.