A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
  • Newsletters

design patterns

A collection of 2 posts
Making ServiceLoader usable: a provider factory
Java

Making ServiceLoader usable: a provider factory

I keep coming back to java.util.ServiceLoader. I have used it to put a JSON layer behind a contract, so the core code carries no direct dependency on any particular JSON library, and I can swap the implementation without touching callers. The same shape works for JWT handling, where the concrete library might be jose4j or another JOSE implementation, and you can easily find other decoupling use-cases.

Jul 12, 2026
Thoughts on object creation
Development

Thoughts on object creation

Creational patterns were first described in the famous Gang of Four’s Design Patterns. The book presents each pattern in a dedicated chapter and follows a strict structure for each one: intent, motivation, applicability, structure, participants, collaborations, consequences, implementation, sample codes, known uses, and related patterns. The intent pattern presents a succinct goal of the pattern, while the applicability tells when you should use it.

Aug 31, 2025
A Java geek © 2008-2026
v. cc69df72aff120d74e5461c4d5381f0d4d42ec8c/15438100578
Latest Posts