Java Omnibus
OOAD & Architecture / J2EE / Jakarta EE Patterns / J2EE vs Spring Pattern Mapping
J2EE Spring Mapping Architecture
J2EE / Jakarta EE Patterns

The fastest way to learn J2EE patterns today is to translate them into the architecture vocabulary you already use.

Many Java developers have used these patterns in practice without learning their classic names. This page gives a direct map from J2EE vocabulary into Spring-era and modern enterprise Java architecture.

Why This Topic Matters

Why this enterprise design language still helps

Once the mapping becomes visible, the pattern catalog stops feeling historical and starts feeling practical. You can discuss coarse-grained application services, filter chains, DTO boundaries, repositories, and gateways with more precision.

Core Explanation

The main idea

Frameworks changed how these patterns are implemented, not whether they exist. Spring controllers often act within Front Controller style flows. Filters remain Intercepting Filters. Application services commonly play the role of Session Facades. Repositories or DAOs encapsulate persistence. Web clients and gateways still look like brokers or adapters.

The point of this mapping is to preserve architectural intent when the framework has already automated part of the mechanism.

Concept Breakdown

Key ideas to keep in mind

Concept

Classic name

A pattern name from the J2EE catalog that describes the role clearly.

Concept

Modern surface

The framework construct or application layer where the same concern usually appears today.

Concept

Decision value

The mapping helps decide what a class or layer should own rather than merely what annotation it needs.

Pattern mapping table

Pattern mapping table

Classic pattern Typical Spring / modern equivalent Key design concern
Front ControllerDispatcherServlet, API edge controllerCentral entry point and shared request coordination
Intercepting FilterServlet Filter, Spring Security chainCross-cutting request processing
Service to WorkerController + application service + rendered responseSeparate request handling from business work and rendering
Session FacadeApplication service / use-case serviceCoarse-grained orchestration boundary
Transfer ObjectDTO / API model / projectionData contract across boundaries
DAORepository, DAO, persistence adapterEncapsulated data access
Web Service BrokerGateway, integration client, anti-corruption adapterShield the core from external protocol details
Service LocatorRegistry or legacy bean lookupCentralized lookup, often superseded by explicit DI
Real-World Usage

Where this helps in practice

  • Onboarding teams that know Spring but not classic enterprise pattern terminology
  • Explaining how legacy Java designs evolved into framework-driven architectures
  • Helping reviews move beyond annotation-level discussion into boundary-level discussion
Trade-Offs

What to watch carefully

Mappings are useful when they clarify a role. They are less useful when they imply that a framework class automatically guarantees a sound design. A Spring controller can still violate Front Controller principles if it becomes a business dump.

Common Mistakes

Misreadings to avoid

  • Confusing framework constructs with complete architectural solutions
  • Assuming repositories eliminate the need to think about data access boundaries
  • Calling everything a service without distinguishing orchestration from domain behavior
  • Believing older names are irrelevant because implementations changed
Related Pages

Related concepts


What To Read Next