Tagged articles

flyweight

3 articles · Page 1 of 1
liandk
liandk
Jun 25, 2026 · Fundamentals

Flyweight Pattern Explained with Java Code and Real-World Scenarios

This article introduces the Flyweight design pattern, explains its intrinsic and extrinsic state concepts, presents real-world use cases such as board games and text editors, and provides a complete Java implementation with an abstract piece, concrete piece, factory pool, and test demonstration, highlighting memory savings and potential pitfalls.

Design PatternMemory Optimizationflyweight
0 likes · 5 min read
Flyweight Pattern Explained with Java Code and Real-World Scenarios
IT Niuke
IT Niuke
Jan 2, 2024 · Fundamentals

How the Flyweight Pattern Cuts Memory Use in Real‑World Java Services

The article explains the Flyweight design pattern, shows how a surge of 30 KB country objects caused memory pressure in a marketing service, and demonstrates a Java implementation with Flyweight, FlyweightFactory, and related code, while comparing it to Singleton and caching approaches.

Design PatternsMemory Optimizationcaching
0 likes · 8 min read
How the Flyweight Pattern Cuts Memory Use in Real‑World Java Services
Intelligent Backend & Architecture
Intelligent Backend & Architecture
May 7, 2021 · Fundamentals

Java Structural Design Patterns: Proxy, Adapter, Bridge, Decorator, Facade, Flyweight, Composite

This article provides a comprehensive overview of key structural design patterns—including Proxy, Adapter, Bridge, Decorator, Facade, Flyweight, and Composite—explaining their definitions, advantages, structure, real‑world scenarios, and complete Java implementations with code snippets and diagrams.

Facadeadapterbridge
0 likes · 46 min read
Java Structural Design Patterns: Proxy, Adapter, Bridge, Decorator, Facade, Flyweight, Composite