Why is JSF considered MVP but not MVVM framework

大憨熊 提交于 2019-12-13 19:10:14

问题


From the wiki page about JSF I've learnt that it's considered as an MVP framework. But I cannot realy understand why.

Actully, beans do not contain a reference to View in themselves. There's also a data bidinig mechanism between Facelets and Managed beans.

So I would say that Managed Beans are more ViewModel than Presenter, as that Presenter usually contain a View interface in itself like in that example.

QUESTION: Why is JSF considered MVP but not MVVM framework?


回答1:


MVVM is mainly a desktop application oriented pattern. When considering MVVM in web application perspective, there would be a controller in the client side. JSF doesn't have such one. When still speaking about web applications, if you were using e.g. Spring MVC in server side with e.g. AngularJS or Node.js in client side, you may speak about MVVM.



来源:https://stackoverflow.com/questions/36580401/why-is-jsf-considered-mvp-but-not-mvvm-framework

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!