Академический Документы
Профессиональный Документы
Культура Документы
Design Pattern :
A repeatable solution for a commonly occurring software problem
4. Now unless these delegates have ServiceLocator they will have duplicate
code for the look up service.
5. So we put all the look up logic in locator and thus increase cohesion for the
business delegates
3. Using BD and SL we hide the complexity from controller and jsp but we have
2 problems both related to the fact the bean the jsp is dealing with is a stub
to a remote object.
a. All those fine grained network calls are likely to be a big performance
issue.
i. Each EL triggers a network call. So it is a bandwidth/latency
issue
ii. On top of that these calls may cause problems on server. Each
call might lead to a separate transaction and database load(and
possibly store) on the server.
b. The JSP is not the right place for handling exceptions that might occur
if the remote server crashes.
4. Why not the JSP talk to the bean instead of a stub.
TO
Business service might want its data in a big message. Service creates a serializable
java object with lot of instance variables.
Revisiting MVC
Improved Controller
Front Controller