Which is better when I'm going to select java framework to work with portlet environment SpringMVC Portlet or JSF 2 with portlet bridge, actually this question is not easy to answer, Spring MVC Portlet is a copy of Spring MVC framework, it is built for portlet development without need for any explicit bridge to make it work in portlet environment, for JSF it is a standard framework and very powerful spicily after new feature in JEE 6 which is providing DI (Dependency Injection) out of the box, in below is my try to compare both framework hope that I can get answer to my question,please help me to get the final comparison of both frameworks
| Spring MVC | JSF |
| request-based framework like Struts | component-based framework |
| Spring Portlet MVC Framework provides easy integration with popular view-rendering technologies such as JSTL, Apache Tiles, Apache Velocity, and FreeMarker | Normally using jsp but jsf2 coming with Facelets as preferred presentation framework, and have multiple component libs |
| HTML5 support coming with variant technologies used for presentation frameworks, for ex. Thymeleaf | HTML5 will be supported in JSF
2.2, but there are some component lib that started to make support for HTML5
like myFaces and primeFaces http://myfaces.apache.org/html5/index.html |
| Support Restful, and support messages converters for JSON and XML | No Restful support |
| have all features of Spring like: DI, AOP, integration with most persistence framework, using XML, annotation, or Java | jsf 2 have Managed bean injection using annotation |
| Spring Portlet MVC is like a mirror image of Spring MVC but it is a dedicated framework for developing portlets. It doesn't hide the multiple request processing phases of portlets, making it a more intuitive framework to develop portlets using Spring Portlet MVC | it is required Portlet Bridge to allow JSF applications to run within a Portlet environment |
| UI Design is flexible as it is use variant presentation framework. | UI Design have to be linked to Component lib that used with JSF2 like primeFaces and myFaces otherwise you have to customize your UI Component. |
| portlets developed using Spring Portlet MVC in any portlet container without making any changes | portlets developed using IBM Struts Portlet Framework or IBM JSF Framework have a dependency on IBM WebSphere Portal runtime |
| understands that the portlet's request processing (render, action, event, resource) | encapsulate the portlet's action and render phases of request processing into one phase |