What flaws do you see in the following design, (and what would be your ideal architecture suggestion) for a typical web 3-tier application?
My current blueprint appr
Your above approach sound good.
But I think you should use UI-Beans. Of course this UI-Bean should be effectively immutable. As soon as it is created its state (and the encapsulated domain object) should not be changed.
Very simplified example:
class UIBean {
DomainObject o;
public String getDescription(){
return trimToSummaryText(o.getDescription());
}
private static String trimForSummaryText(){
....
}
}
Main pros:
Yes, it involves more java-classes for that. But this abstraction layer is nearly always fine as soon as your webapp and pages grow.