1.) Functional flow/ Architecture
a.) Only for 6+/7+years
b.) Explain the flow of process/business
2.) Technical Flow/Architecture
a.) Upto 5+ years
b.) Explain technologies /components that are involved in the project
1.)What is need of Business Deligate to convert VO class object to DTO class object ?
a.) If Business Deligate is not there servlet component directly prepares DTO class object by receiving and translating form data and passes to service class, if service class excepts certain input in other format like numeric employee number as string employee number then we need to modify servlet component code i.e For the changes that happened in business tier service component we have to modify servlet component of presentation tier
b.) If Business Deligate is taken then it gets original form data as VO class object having string inputs and converts VO class object to DTO class object to pass to service class
c.) If service class excepts inputs in different format from DTO then we need to change code of Business Deligate which belongs to Business Tier and need not to touch the code of servlet component of Presentation Tier
2.)How do you propagate the Exception that are raised in servlet and to End user ?
a.) If you place try-catch block in service/ DAO class the raised exception will not be propagated to next component because try-catch block suppress or eats the exception to overcome these problem declare the exception to be thrown using throws statement in DAO, service classes
b.) DAO class throws the exception to service class
c.) service class throws the exception to controller servlet and these servlet catches and handle the exception and uses rd.forward in catch block to forward the control to error pages. In these approach one practical problem is there i.e: if technologies of DAO,service class changes the exception will change and it leads to modifying the code of servlet component(Presentation Tier)
d.) To overcome these problem make Business Deligate class getting technology specific exceptions of service,DAO classes and translate them project specific user defined exception and propagate that exception to servlet component, it is like converting SQLException to Patient already register exception(user defined exception) due to these any change in service or DAO technologies we just need to change the code of Business Deligate not the code of servlet component
e.) Develop Presentation Tier and Business Tier components having loose coupling
a.) In spring project architecture there is no necessity of Business Deligate because we can do it responsibilities with the direct facilities of spring components
1.) The technologies used in DAO, service layer throw unchecked exceptions, so the propagation of exception take place automatically, moreover spring itself converts technology specific exceptions into common DataAccessException and we can configure error page for these exception in controller classes shown below
a.) Only for 6+/7+years
b.) Explain the flow of process/business
2.) Technical Flow/Architecture
a.) Upto 5+ years
b.) Explain technologies /components that are involved in the project
Servlet & JSP Project Architecture:-
1.)What is need of Business Deligate to convert VO class object to DTO class object ?
a.) If Business Deligate is not there servlet component directly prepares DTO class object by receiving and translating form data and passes to service class, if service class excepts certain input in other format like numeric employee number as string employee number then we need to modify servlet component code i.e For the changes that happened in business tier service component we have to modify servlet component of presentation tier
b.) If Business Deligate is taken then it gets original form data as VO class object having string inputs and converts VO class object to DTO class object to pass to service class
c.) If service class excepts inputs in different format from DTO then we need to change code of Business Deligate which belongs to Business Tier and need not to touch the code of servlet component of Presentation Tier
2.)How do you propagate the Exception that are raised in servlet and to End user ?
a.) If you place try-catch block in service/ DAO class the raised exception will not be propagated to next component because try-catch block suppress or eats the exception to overcome these problem declare the exception to be thrown using throws statement in DAO, service classes
b.) DAO class throws the exception to service class
c.) service class throws the exception to controller servlet and these servlet catches and handle the exception and uses rd.forward in catch block to forward the control to error pages. In these approach one practical problem is there i.e: if technologies of DAO,service class changes the exception will change and it leads to modifying the code of servlet component(Presentation Tier)
d.) To overcome these problem make Business Deligate class getting technology specific exceptions of service,DAO classes and translate them project specific user defined exception and propagate that exception to servlet component, it is like converting SQLException to Patient already register exception(user defined exception) due to these any change in service or DAO technologies we just need to change the code of Business Deligate not the code of servlet component
e.) Develop Presentation Tier and Business Tier components having loose coupling
Spring Project Architecture:-
a.) In spring project architecture there is no necessity of Business Deligate because we can do it responsibilities with the direct facilities of spring components
1.) The technologies used in DAO, service layer throw unchecked exceptions, so the propagation of exception take place automatically, moreover spring itself converts technology specific exceptions into common DataAccessException and we can configure error page for these exception in controller classes shown below
- @Controller
- public class MyController{
- @ExceptionHandler(value=DataAccessException)
- public string handlerException(){
- return "error"
- }
- }
b.) Controller class that takes the responsibilities of giving command object having form data but we convert these command object to DTO object to pass to service class
Note: Don't pass command object to service class directly because command class is bound with presentation tier controller component
Note: Don't pass command object to service class directly because command class is bound with presentation tier controller component
your giving clear definition spring ,jsp architecture .
ReplyDeletethanks for your nice article
java training institutes in chennai |
java j2ee training institutes in velachery