Web architecture: MVC, Lazy initialization, Data transfer Objects, Open Session In View, is there a consensus approach?

前端 未结 4 731
醉酒成梦
醉酒成梦 2021-01-20 11:52

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

4条回答
  •  逝去的感伤
    2021-01-20 12:37

    Despite the question was last answered about year ago, perhaps the answer appears helpful to someone. Overall outlined by you architecture is fine, the only detail to add is: usually for passing data between layers (e.g. View and Service) instead of mentioned above UiBean-s so called DTOs (Data Transfer Objects) are used, these are plain POJOs with appropriate fields/setters/getters.

    In one of previous/early versions of Java EE spec "DTO" term was mistakenly mixed with "ValueObject", though they have bit different purposes.

    Hope, this helps.

提交回复
热议问题