O'Reilly logo

Core J2EE™ Patterns: Best Practices and Design Strategies, Second Edition by Dan Malks, John Crupi, Deepak Alur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required