Hi I have worked with JSF which is a component based MVC framework . I know a lot of web projects use Spring as their technology and Spring falls under the category "action based UI framework " . I want to know what is the difference here ? Which one is more advanced and gives more flexibility to the users ? Some pros and cons ?
相关问题
- java.lang.NullPointerException at java.io.PrintWri
- h:selectOneMenu in p:dataTable doesn't submit
- How to dynamically load partial view Via jquery aj
- PrimeFaces block UI does not work when the compone
- org.apache.commons.fileupload.disk.DiskFileItem is
相关文章
- spring-mvc a标签带参怎样向controller发送请求。路径格式?
- Java spring framework - how to set content type?
- Java/Spring MVC: provide request context to child
- Spring 5 Web Reactive - Hot Publishing - How to us
- Forward request from servlet to jsp
- Spring MVC project not able to publish and run… Me
- Intercept @RequestHeader exception for missing hea
- superclass mismatch for class CommentsController (
Component Based Web Framework is a way of implementing Web (HTTP) based applications similar to thick-client applications where user operates on GUI controls which fire actions as a result of events. Here views (web pages) are central piece of the application.
Action Based Web Framework puts emphasis on request-response nature of HTTP protocol, where requests represent actions to be performed (in general: request URI maps to operation, request parameters/body maps to operation arguments). Here views are just a way of rendering the results of operations/actions.
Both models have pros and cons. The former seems easier (especially if one has Swing background) but in the long term the req-res nature of HTTP comes in the way of programmer. The latter is more natural fit to HTTP and allows to write more testable code (controllers).
p.s. Java web apps went from MVC to Component based frameworks, or rather first there were Struts et al, and then JSF. In .NET world first there was ASP.NET and then ASP.NET MVC.