I'm investigating presentation layers to be used with spring in our new project. I'm coming from PHP+Prado and want to move to something what is as simple as Prado and more powerfull than PHP.
I 开发者_运维问答like Spring 3 and Spring MVC. It's very simple to learn and start working with. But I'm looking for "view framework" better than simple jsp. I need simple components as Datagrids, Lists, Trees drag-and-drop supported. I've created SpringMVC+Spring Web Flow 2 + Spring Faces + JSF configuration but it's very complicated to create simple things there. I need something simpler.
Do You have any ideas ?
In Java EE there are currently only 2 view technologies: JSP and Facelets. JSP is old and about to retire. Facelets is newer and better and designed with JSF in mind so that they both fits smoothly in each other.
But Spring MVC and JSF are in fact competitors. They both have roughly the same goals and purposes. You should use the one or the other and not mix up them. Mixing two or more MVC frameworks in one page ain't going to work flawlessly. You can however use Spring as DI and/or Security framework in combination with JSF as MVC framework. Spring offers much more than only MVC.
Components like Datagrids, Lists, Trees drag-and-drop supported are not all available in the basic JSF Component implementation. For that you'll need a component library such as PrimeFaces.
See also
- Why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards?
- Using JSF as view technology of Spring MVC
- JSF implementations and component libraries.
I've used Jboss Seam + Richfaces for the last 3 years and find them both useful, but if I were you I'd also check out the Play Framework. It has Spring support and combined with jQuery UI or ExtJS you would get a very simple but highly effective environment. Certainly one reminiscent of developing in PHP from a speed point of view.
If you want those sort of rich controls, then some kind of JSF framework is the way to go. The standard JSF framework is rather poorly designed and inelegant, though.
You should have a look at JBoss Seam as an alternative. It's a top-to-bottom web framework that uses EJB3 and JSF, and it's pretty well integrated, making JSF a lot easier than it would otherwise be.
It's not Spring-based, though, so if your heart is set on Spring, then you need to look at other JSF implementations such as RichFaces.
Spring WebFlow probably isn't necessary for you at all, so I;d ignore that unless you have a good reason.
Jboss Seam offers all that you want. It works with Spring, but provides lot of inbuilt features by itself.
A very powerful and light-weight MVC action based framework is Stripes, give it a try!
Angular or GWT could also be an alternative with proper usage.
As you are coming from PHP, JSP is probably a more suitable view technology than JSF
If you have to use Spring, use Spring 4 (not 3)
Checkout Spring Boot for more rapid development etc..
If you are developing a web application, and SEO isn't important, I would personally go down the Single Page Root with a Javascript Framework + Restful web services. I notice you mention Spring WebFlow + Components. My opinion is these are too heavyweight
If SEO is important, then checkout the Play Framework (I prefer Scala version) with SSP (Scala Server Pages).
精彩评论