Course · Training · Workshop

Clean Code with Java

Write clean, maintainable Java code: design strategies, the right abstraction levels, OOP combined with functional programming, and modern libraries like Lombok, Guava and Vavr.

A two or three day workshop where we explore the principles and practices of Clean Code with Java. We focus on design strategies, abstraction levels, and combining object-oriented with functional programming. Learn how to write elegant, expressive code and effectively use modern Java features.

What participants say

These customers booked courses in the same topic cluster.More customers →

Content

Clean Code is a crucial aspect of software development that ensures our code remains understandable, modifiable, and extensible. In this course, we learn the principles of Clean Code and how to apply them in Java. The focus is on design strategies, finding the right level of abstraction, and writing elegant, expressive code.

The workshop includes the following topics:

– Introduction to Clean Code

  • Overview of Clean Code and expectations for the workshop
  • Why Clean Code matters and how to avoid perfectionism

– Effective Naming and Abstraction

  • The art of naming
  • Identifying the right level of abstraction

– Refactoring and Lean Code

  • Cognitive load as a driver for refactoring
  • Lean Code and Just-Enough-Design

– Design Strategies and Principles

  • Balance between specific and abstract code
  • Reification
  • Avoiding premature abstractions (AHA and WET principles)

– OOP & Functional Programming

  • Combining OOP with functional programming
  • Do or Die Principle (DOD)
  • SOLID, DRY, YAGNI and Law of Demeter

– Null-safe Programming and the Stepdown Rule

  • Null-safe programming
  • The Stepdown Rule

– Elegant and Expressive Code

  • Replace getters with Queries, setters with Domain Methods
  • Flatten conditionals with Monads

– Object Design and Primitive Obsession

  • Elegant Objects
  • Primitive Obsession and Value Objects

– Exception Handling and Data Classes

  • Pluggable exception handling strategies
  • Design of data classes (Lombok, Immutables, pure Java)

– Extended Collections and Dependency Injection

  • Extended Java Collections (Guava, Vavr)
  • Memoization and advanced Dependency Injection patterns (Spring)

– Test Driven Development (TDD)

  • Test-driven components

You will not only get to know these concepts but also apply them practically.

The actual course content may differ from the above depending on the trainer, delivery, duration and the composition of participants.

Request this course in-house

By submitting you accept our Privacy Policy.

Request a public date

No suitable public date? Register without obligation — once there is enough interest we schedule a new public date and let you know first.

Number of participants (approx.)

More than 3 participants? Best to request a dedicated in-house date directly.

By submitting you accept our Privacy Policy.

More about Clean Code with Java

Clean Code in Java goes beyond mere formatting – it encompasses design strategies, abstraction levels, and combining object-oriented with functional programming. This course teaches principles like SOLID, DRY, YAGNI, and the Law of Demeter with a focus on elegant, maintainable Java solutions.

Further resources:

History

The term "Clean Code" was popularized by Robert C. Martin (Uncle Bob), who published the book of the same name in 2008. The principles are based on decades of software development and were shaped by pioneers like Kent Beck, Martin Fowler, and others.

For Java, Joshua Bloch's "Effective Java" and the functional programming movement have become particularly relevant. Modern Java versions (from Java 8 onwards) bring functional concepts like lambdas and streams directly into the language.

Today, Clean Code is a recognized standard in professional software development. Combining it with functional programming, Value Objects, and modern libraries like Lombok, Guava, and Vavr enables elegant, expressive Java solutions.