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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.