Architectural Differences in Java MVC Web Frameworks

I am trying to choose an AJAX-friendly Java environment for my first web application, and I am interested in first understanding the architectural differences between the different flavors that are there.

I like the concept of MVC frameworks, and therefore I primarily consider the following:

  • Any kind of JSF (ICEFaces, RichFaces, PrimeFaces, etc.).
  • Spring Web Stream
  • Zk
  • Gate

I downloaded each of these projects and tried to follow their samples / tutorials, and there is so much information to swallow. I decided that I would take a breather and come here to cover some preliminary first.

I am wondering how each of these frameworks implements the MVC pattern . Obviously, something rooted in JSF (like ICEFaces) will have a different architecture than Spring. I am sure this is a huge question, so I am not looking for a full-blown tutorial on each of these frameworks; I’m just curious about what artifacts (Java sources, XML configuration files, etc.) a developer must write in order to create a single page controlled by AJAX using them. I'm interested in the differences in their approach, nothing more.

For example, I would suggest that each structure at some point uses the FrontController (or its sympathies) to map HttpRequests to the right of the Controller . This means that the Controller (bean) some processing may have got into the database to get some information (using ormapping and generating the Model ), and then build a View / HttpResponse to send back to the client. This is a simplification, I'm sure, but there should be an easy way to explain the high-level architecture about how each of these frameworks runs what.

+4
source share
3 answers

Struts uses an ActionServlet (now Struts2 is just an action), because the controller and model and jsp are the view.

For Spring, MVC is achieved using the DispatcherServlet, which does routing, and the model is not tied to any wireframe-related object that you can use.

JSF - UI jsp or jsf, model - ManagedBean, Controller - FacesServlet.

I did some similar searches for my own project a while ago, see the links below:

Comparison based on several parameters: http://static.raibledesigns.com/repository/presentations/ComparingJavaWebFrameworks.pdf

Difference Between JSF and Struts

http://struts.apache.org/2.0.14/docs/what-are-the-fundamental-differences-between-struts-and-jsf.html

A little related post

https://stackoverflow.com/questions/7633583/which-mvc-is-better-spring-or-struts

Spring and JSF

http://blog.springsource.org/2007/04/21/what-spring-web-flow-offers-jsf-developers/

Spring MVC: http://static.springsource.org/spring/docs/2.0.x/reference/mvc.html

Best option for JSF component library: Primefaces based on your own experience

From IBM Clearing FUD: http://www.ibm.com/developerworks/library/j-jsf1/

Hope this gives you some insight.

+1
source

Take a look at Matt Ryde to talk about comparing JVM web frameworks here . You might also consider Spring MVC and Tapestry `.

In addition, the link gives you a matrix of the capabilities of various java web frameworks.

0
source

You should also check the playback structure. I used it a bit and really love it.

It is very easy to start with a minimal configuration (reminiscent of Rails).

http://www.playframework.org/

0
source

Source: https://habr.com/ru/post/1382730/


All Articles