Chapter 4. J2EE Refactorings

Topics in This Chapter

  • Presentation Tier Refactorings

  • Business and Integration Tier Refactorings

  • General Refactorings

Presentation Tier Refactorings

The refactorings in this section apply to the presentation tier.

Introduce a Controller

Control logic is scattered throughout the application, typically duplicated in multiple JavaServer Pages (JSP) views.

Extract control logic into one or more controller classes that serve as the initial contact point for handling a client request.

Introduce a Controller

Figure 4.1. Introduce a Controller

Motivation

Control code that is duplicated in multiple JSP also needs to be maintained in each JSP. Extracting this ...

Get Core J2EE™ Patterns: Best Practices and Design Strategies, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.