가장 많이 묻는 면접 질문과 답변 & 온라인 테스트
면접 준비, 온라인 테스트, 튜토리얼, 라이브 연습을 위한 학습 플랫폼

집중 학습 경로, 모의고사, 면접 준비 콘텐츠로 실력을 키우세요.

WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.

Chapter 4

Structural Patterns Part 1: Adapter, Bridge, and Facade

Learn how structural patterns help incompatible APIs work together, prevent hierarchy explosion, and simplify large subsystems.

Inside this chapter

  1. Adapter Pattern
  2. Bridge Pattern
  3. Facade Pattern
  4. Pattern Comparison
  5. Real-World Usage Snapshot

Series navigation

Study the chapters in order for the clearest path from first design principles to advanced Java architecture, framework usage, and interview-level pattern mastery. Use the navigation at the bottom of the page to move through the full tutorial smoothly.

Tutorial Home

Chapter 4

Adapter Pattern

Adapter converts one interface into another that the client expects. It is extremely useful when integrating legacy code, third-party SDKs, vendor APIs, or old internal libraries.

class LegacyPrinter {
    public void printText(String text) {
        System.out.println(text);
    }
}

interface Printer {
    void print(String text);
}

class LegacyPrinterAdapter implements Printer {
    private final LegacyPrinter legacyPrinter = new LegacyPrinter();

    @Override
    public void print(String text) {
        legacyPrinter.printText(text);
    }
}
Chapter 4

Bridge Pattern

Bridge separates abstraction from implementation so the two can vary independently. It is helpful when multiple dimensions of variation exist. For example, shape type and rendering engine, or notification type and delivery provider. Without Bridge, inheritance combinations can explode quickly.

Chapter 4

Facade Pattern

Facade provides a simplified interface over a complex subsystem. A payment facade may coordinate validation, tax computation, inventory reservation, fraud checks, and external gateway calls while exposing one clean method such as placeOrder().

public class OrderFacade {
    public void placeOrder(Order order) {
        validate(order);
        reserveInventory(order);
        chargePayment(order);
        createShipment(order);
    }

    private void validate(Order order) {}
    private void reserveInventory(Order order) {}
    private void chargePayment(Order order) {}
    private void createShipment(Order order) {}
}
Chapter 4

Pattern Comparison

  • Adapter changes an interface.
  • Bridge separates abstraction and implementation.
  • Facade simplifies a subsystem.

They may appear similar at first because all three sit between clients and implementation details, but their intent is different. Understanding intent prevents misuse.

Chapter 4

Real-World Usage Snapshot

Adapters are common in integration code, facades are common in service orchestration, and bridge-like designs appear in cloud abstraction layers, pluggable rendering systems, and strategy-based domain models. These patterns are especially important in enterprise Java where libraries and platforms evolve over time.

Copyright © 2026, WithoutBook.