How the Business Team supports the web designers when the MVC components are running on one JVM

As long as the business guys keep the interfaces to their model components consistent, everyone will be happy. The two key interface points in their design are when the controller first interacts with a model component (steps 1 and 2 below), and then later, when a JSP view interacts with the bean it needs (steps 3 and 4 below).

Getting customer data for a client...

image with no caption

1 Having received a request for customer information, the Controller calls the ManageCustomer service component (a Model). The service component does a JDBC call to the legacy database, then creates a Customer bean (this is NOT an EJB, just a plain old JavaBean), populated with customer data from the database.

2 The Controller adds the Customer bean reference to the request object, as an attribute.

3 The Controller forwards to the View JSP. The JSP gets the reference to the Customer bean from the request object.

4 The View JSP uses EL to get the Customer Bean properties it needs to satisfy the original request.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset