I am comparing ModelMap and Model from Spring MVC. Besides the obvious difference in the first class and in the second interface , is there any difference that makes the use of one or the other preferable in different situations?
They are primarily used for the same purpose (for example, from spring MVC ):
java.util.Map/org.springframework.ui.Model/ org.springframework.ui.ModelMap to enrich the implicit model that is displayed on the web page.
Only I found there that ModelMap improved by Map , however the difference before Model is still unclear.
Can I conclude from ModelMap javadoc that "Model" is preferable for java 5?
Check out the model interface for a Java-5-based interface option that serves the same purpose.
However, it does not seem that ModelMap will be obsolete or anything else. But why ModelMap n't ModelMap implement Model ?
sodik source share