Spring MVC vs Spring WebFlow - spring

I am doing some research for some social network project which i am going to start. I used Spring before yet i cant make a decision at the moment since there are way too many options to choose.
I would like to use JSF2.0 components on my views , and as far as i figure out webflow is a nice way of doing it yet it is not a must.
What benefits does webflow give over Spring web mvc ? My first impression about WF is it makes things way too complicated.
Thanks in advance

Webflow is about flows in web application.
Think of a Wizzard with several Pages, then Web Flow helps you to connect this Pages (in a flow), and provides a variable scope to connect variable with this flow.
While Spring MVC is "only" about isolated Pages.

Related

Spring Boot/Thymeleaf based large/mid scale application

We are starting out with Spring Boot, and looking for best practices
in implementing a large application. If you can provide links to any large/mid scale open source application
implemented using Spring Boot, that would be helpful.
Also we did research code generated by "JHipster" (jhipster.github.io/) project, which
definitely helps generating lot of boiler plate code like user management, transaction management, REST Services/ AngularJS based application.
The only problem is "JHipster" is AngularJS based. But in our case we
would like to go with "Thymeleaf" based UI.
If you can provide a link to framework/sample application similar to "JHipster",
but based on "Thymeleaf" based UI, that will also be very helpful.
Thanks
JHipster also supports Thymeleaf: by default it generates an AngularJS front-end, and this is its main goal, but you can also use Thymeleaf if you don't want a single Web page application.
If you have a look at the error pages, for example, they are done with Thymeleaf (as the 404 page can't be in the single Web page application, for obvious reasons)

What the difference between struts2 and spring MVC

I am learning Java EE and wanna build up a complete management system for a restaurant. Now I am confused what presentation layer should I use for my RMS because I heard that the struts 2 is one of the best UI layer but, the thing is, if I am using spring for my business logic layer then I can use the spring MVC can't I? By the way, I am really interested to build a complete application which is follow the multi-tier architecture.
Yes, of course you can use Spring MVC.
You can use Struts 2 if you'd like as well, because Spring integrates with it nicely.
But I don't see any reason why you'd want to do that. The person who told you that Struts 2 is
one of the best UI layer [sic]
is misguided. If you compare it to Spring MVC, you'll see that the two are based on similar ideas, but Spring improves on Struts. JSF has superceded Struts as the default Java EE web view technology, so it's not even considered "best" by the Java EE standard.
Stick with Spring. You won't be sorry.
I will not blame struts 2, indeed it's a great product, I work with it every day. But in my experience spring MVC is a lot simpler and clearer. This doesn't mean you don't get as much features.
Try both, and you'll see what I mean.
Tell us which one you choose!

how to access RESTful parameters from ZK GenericForwardComposer when using Spring MVC

i'm working on a project using zk and spring.Basically Spring manages object life-cycle of the objects.i've planned to use cute url.for that i used ZK MVC pattern and added Spring 3 MVC front controller by mapping the requests to the views using mvc:view-controller
<mvc:view-controller path="/" view-name="home"/>
There has been a situation where i would need to access parameters from the cute url (RESTful)
but i couldn't find how to use that.I think also that my fear is to complicate the whole project my mixing the 2 MVC patterns.I posted here on ZK forun but i got no answer so far.I ended up using session for parameter passing.
Is there any way to do that? how would you do that?
thanks for reading.
Have you looked at ZEST yet? My understanding is you can use ZEST for beautifying your urls to ZUML/JSP pages and let ZK MVC take care of the Ajax events.

Tutorial for using spring beans in jsp pages

(I am not familar with technologies related to HTML delivery, like JSP... But I know basic concepts...)
In my application I use Spring Beans and Spring Security together with Blaze DS to communicate with Flex applications over AMF protocol. Everything works just fine.
Now I have a task to deliver some services via HTTP/HTML eg. it should be some sort of servlets or JSP pages that generates HTML for users. To not reproduce all business and data access logic I want to utilize my existing Spring Beans (I love Spring.). So, basically I want to create HTML view for my Spring Beans.
My question: What would be the best way to do it? Which technologies I should use? What guru-guys will suggest?
The best tip would be a link to small tutorial that will explain how to access Spring Beans for JSP pages. I tried to goole myself but there are too much information and I am a little bit nixed up with different version - so I really have no clue what should I start with...
You should look into Spring MVC. You can find an introduction here.
Also the accepted answer to this question discusses how to do what you want specifically (i.e. access your Spring Beans from JSP pages).

spring mvc vs seam

Spring mvc is a framework that has been long time out there, it is well documented and proven technology. A lot of web sites are using spring.
Seam is a framework based on jsf - rich faces implementation.
It has a lot of ajax based components.
It uses some heavy stuff like EJB, JPA.
All of this is prone to errors and this framework is so slow (at my computer it is almost impossible do develop something because it is really slow, especially redeploying on jboss)
But is is very good for back office applications.
Does someone have a professional experience with this two frameworks?
Can you recommend the better one ?
Why?
Regards
I use both: Spring-MVC (2.5) and Seam
Because Seam uses Java Server Faces Technology (A server-side based Technology), behind the scenes, It is better designed for small and medium applications. (Each JSF view Tree is stored on Session - You can store on client side, but be aware bandwidth issues). But it has some advantages:
Typically web application uses the following path
view >> controller >> service >> domain
With Seam, you can get
view >> service >> domain
Or even (by using mediator pattern provided by Seam Framework)
No controller, No service
view >> domain
Besides that,
JSF 2 supports JSR 303 - Bean Validation
You can use Wicket instead of JSF if you want
Conversation and Business process management support
Use can use Spring DI if you want
Spring-MVC
It has a powerful web-Tier infrastructure
Handler Mapping (It chooses which Controller should handle the request)
View resolver (It chooses which View should render the response)
It can be used for large applications
Powerful data-binding
Spring 3.0 supports Annotation-based Controller (JSR 303 - Bean Validation, coming soon)
But i still not use Spring 3.0 because
By using (and extending when needed) MultiActionController, i can get convention over configuration without no xml settings to define your Controller (You just need to set up your MultiActionController as #Component)
SimpleFormController provides similar behavior found in Spring 3.0 annotation based controller
...
About The learning path, i think both are similar.
I have worked professionally with Seam and it is a killer framework. It really boosts up your productivity. You can use POJOs instead of EJBs, if you think EJBs are slowing you down. About the deployment, just consider deploying to Tomcat instead of JBoss. On my machine redeployment in Tomcat is done in a couple of seconds. But I still haven't used Spring MVC to compare them.
We have been using Seam for a very large site using POJOS and communicated with web services or Hibernate deployed on Tomcat. We have found that the back button support does not work well or is prone to being specific to implementation patterns. Additionally, there is a tendency for sessions to grow very large if using server side state. Attempts to reduce the session size impact back button support or iframe usage due to reduce number of view states stored in session. More or less, our issue have all been performance related. The tomcat requires more memory and supports less users when compared to a struts 1.2 or spring mvc. We are using around 50 tomcats to support our userbase.
I have used both SEAM and Spring MVC for a few months.
I prefer Spring MVC to SEAM. BTW I noticed JBoss halted the SEAM3 development.
I found a interesting article about comparison of SEAM and Spring MVC.
The link is
http://java.dzone.com/articles/why-java-ee-lost-and-spring?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+javalobby%2Ffrontpage+%28Javalobby+%2F+Java+Zone%29&utm_content=Google+Reader
Thanks
I have used both Seam 3 and Spring 3 frameworks.While Seam 3 is easier to code and has a lot of features supporting session management and transaction management ,the performance is slow.Spring is much faster.

Resources