I am comparing ModelMap and Model from Spring MVC. Apart from obvious difference that first is a class and second an interface is there any difference that make a usage of one or another preferable in different situations?
Primarily they are used for same purpose (as from spring MVC documentation):
java.util.Map / org.springframework.ui.Model / org.springframework.ui.ModelMap for enriching the implicit model that is exposed to the web view.
Only I have found out there it that ModelMap
is enhanced Map
, however difference to Model
is still unclear.
Can I conclude from ModelMap javadoc that 'Model' is preferred for java 5?
Check out the Model interface for a Java-5-based interface variant that serves the same purpose.
However it does not seem that ModelMap
would be deprecated or something. But why does ModelMap
does not implement Model
?