Home > Articles > Programming > Java

  • Print
  • + Share This
This chapter is from the book

Presentation Tier Bad Practices

In this part of the book, we highlight what we consider to be bad practices in the presentation tier.

In each section, we briefly describe the bad practice and provide numerous references to design issues, refactorings, and patterns that provide further information and preferable alternatives. We do not provide an in-depth discussion of each bad practice, but rather present a brief synopsis as a starting point for further investigation.

The "Problem Summary" section provides a quick description of a less than optimal situation, while the "Solution Reference" section includes references to:

  • Patterns that provide information on context and trade-offs;

  • Design considerations that provide related details;

  • Refactorings that describe the journey from the less than optimal situation (bad practice) to a more optimal one, a best practice, or pattern.

Consider this part of the book as a roadmap, using the references to locate further detail and description in other parts of the book.

Control Code in Multiple Views

Problem Summary

Solution Reference

  • See "Introduce a Controller" on page 74.

  • See "Localize Disparate Logic" on page 83.

  • See "Front Controller – "Command and Controller Strategy" on page 179.

  • See "View Helper" on page 186

  • See "Guarding a View" on page 38.

Exposing Presentation-Tier Data Structures to Business Tier

Problem Summary

Solution Reference

  • See "Hide Presentation Tier-Specific Details From the Business Tier" on page 91.

Exposing Presentation-Tier Data Structures to Domain Objects

Problem Summary

Solution Reference

  • See "Hide Presentation Tier-Specific Details From the Business Tier" on page 91.

Allowing Duplicate Form Submissions

Problem Summary

Solution Reference

  • See "Introduce Synchronizer Token" on page 77.

  • See "Controlling Client Access" on page 38.

  • See "Synchronizer (or D_ vu) Token" on page 43.

Exposing Sensitive Resources to Direct Client Access

Problem Summary

Solution Reference

  • See "Hide Resource From a Client" on page 100.

  • See "Controlling Client Access" on page 38.

Assuming <jsp:setProperty> Will Reset Bean Properties

Problem Summary

Solution Reference

  • See "Helper Properties—Integrity and Consistency" on page 46.

Creating Fat Controllers

Problem Summary

Solution Reference

  • See "Introduce a Controller" on page 74.

  • See "Front Controller–"Command and Controller Strategy" on page 179.

  • See "Localize Disparate Logic" on page 83.

  • See "View Helper" on page 186.

  • + Share This
  • 🔖 Save To Your Account