In many documents about JSP (by example, JAVA SERVER PAGES and SERVLET DESIGN by J.Akerley, A.Koutsoumbos, M.Hashim and A.Maffione) they suggests
that a JSP page better not using directly the EJBs (entities) but pass by a intermediary bean (a adaptor).
Reasons seems to be:
- To not link JSP code closely with business logic.
- Be sure that the view (JSP page) should not accessing all the code of the entities (EJB).
- Giving the possibility to Gui designers (rather then developers) to build JSP page via a simplify interface
(adaptors rather then entities).
So, my questions is: is there any other reasons to use adaptors in JSP pages rather then entities? Is it just a question of “clean design”?