Khush
Khush

Reputation: 853

Spring web flow v/s simple mvc controllers

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.

Upvotes: 1

Views: 2587

Answers (2)

Ali.Mojtahed
Ali.Mojtahed

Reputation: 2587

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

Upvotes: 2

commit
commit

Reputation: 4807

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.

Upvotes: 1

Related Questions