It's not a secret anymore!
The moose likes JSF and the fly likes MVC Model 2 and JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "MVC Model 2 and JSF" Watch "MVC Model 2 and JSF" New topic

MVC Model 2 and JSF

eve agostini
Ranch Hand

Joined: Nov 01, 2005
Posts: 43
I'm trying to correctly collocate these three elements one with each other. Model 2 seams to somhow respect MVC pattern, but searching throughout the web I found some people saying that Model 2 frameworks do not really respect MVC pattern, but they simplify it using a "watered down" version of the pattern, while JSF is much closer to it.
Actually when I look at the event handling model of JSF and compare it to the architecture of Struts (for example) I notice that difference.
What do you think about it?
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Sun is well-known for hijacking long existing pattern names and using them in new contexts in ways that are confusing, if not misleading. Using MVC in a web context and numbering it is just one example.

And I'd agree that JSF is closer to MVC, if only because it actually makes use of the Observer pattern.

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Sergey Smirnov
Ranch Hand

Joined: May 29, 2003
Posts: 167
This is a very interesting article about JSF and patterns:

"In conclusion

The JSF framework leverages Singleton, Model-View-Controller, Factory Method, State, Composite, Decorator, Strategy, Template Method, and Observer design patterns. It's a robust framework in that its architecture is based on already proven design patterns, which are utilized very nicely in the JSF framework."

Sergey :
I agree. Here's the link:
subject: MVC Model 2 and JSF
It's not a secret anymore!