Hi,
A question regarding to the Petstore example included in the Springframework distribution package (Struts implementation):
1. Is it a common practice to use Domain Object (like Order, Product) directly in Action and ActionForm ? I read somewhere talking about DTO/Value Object. So what's the pros and cons of using Domain Object directly in Web tier ?
I was having the impression that web tier should only handle Strings (may be plus Boolean). However, the Petstore actually stores Order directly in the ActionForm and let JSP access the non-string properties directly:
In ViewOrder.jsp, we have:
<c:out value="${order.orderId}"/>
orderId is an integer.
I thought we should use BeanUtils to do some data conversion.
thanks


Reply With Quote