1

I have been doing some research about spring web flows and have some questions for which I cannot find any clear answers.

Question 1: Does Spring Web Flow replace a simple MVC Controller? Can we have a simple MVC Controllers and Web flow configured in one project?

I withdraw question 2 as I was looking at documentation for a Spring web flow 2.0.9.

1
  • 1. Yes. 2. YOu can access all the objects Web Flow uses in each scope, so I don't really understand the question. Commented Sep 16, 2013 at 8:17

2 Answers 2

2

you can do anything with spring MVC,web flow often use to reduce flow base code such shopping car ,for example If you want implement shopping cart you have to write controller code for each step,even if you are not using database ,that take too long time to get parameters and path again to view response and hold them in DOM ,Web flow help you to keep this information until flow going to be finish, But in spring ,Java server face is base on web flow. Web Flow can not replace in all manner with MVC, for some reason:

1-MVC architecture helps isolate between html designer and java developer ,in web flow you can not do this!

2-In MVC you can make layers such database layer, business layer,service layer in simple way ,It reduce complexity of program ,and reuse again in other controllers injecting same service trigger, in Web flow ,trigger depend on flow step,you can use it again but in less functionality,for example you can not inject controller from controller.

3-Ajax in spring 3 has killer usage,I prefer Jquery response body over JSF ajax usage

Sign up to request clarification or add additional context in comments.

Comments

1

If you are using Spring MVC, it will completely replace simple MVC structure, however you must have knowledge of Simple MVC as well. Refer documentation

http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/mvc.html

And model is a part of Spring MVC you can find it in document. However I did not get your 2nd question.

4 Comments

No it wont. You can perfectly have 1 part of the application with normal controllers and other (complexer?) parts of the application with Spring Web Flow. It isn't a Spring MVC or Spring Web Flow question...
@M.Deinum Can you provide an example of such a hybrid solution?
Yes absolutely i didn't say that you cannot have both together i have answer about spring mvc replace simple mvc structure and I had provide documentation link so he can get more idea about.
The sample application which is part of the book Pro Spring MVC and numerous application I've written for clients (which I cannot publish).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.