mardi 16 juin 2015

I can't understand JSF architecture and how it fits in the JavaEE architecture

I am studying JavaEE and I got confused with JSF architecture and how it fits the JavaEE architecture.

I had a JavaEE crash course at work and they told us that the standard JavaEE architecture is a service based with anemic models.

I am also reading Beginning JavaEE7 book, which is very nice. In the JSF chapter the writer explains that in the MVC pattern, the FacesServlet is the controller, the XHTML page is the View and the Backing Bean (aka [JSF] Managed Bean) is the model (assumption 3).

Now, I find a mismatch about JSF's architecture and JavaEE architecture: It seems that the concept of backing beans is much closer to the rails approach using rich a rich business model (where there would not be a service layer, but the model would be rich and contain the business logic) than the Java service architecture. Meaning the backing bean would represent be the model with the business logic, and not work as a controller that would delegate the execution to a service layer.

I think this mismatch is due a poor understanding of the architecture and how the components fit together. Could you help me understand how does it fit together?

Aucun commentaire:

Enregistrer un commentaire