Software Development
Object-Oriented Design and Patterns in Java
An applied design course for Java developers whose code works but resists change. Participants examine cohesion, coupling, and the SOLID principles, then work through creational, structural, and behavioural patterns as trade-offs, including the cases where a pattern costs more than it returns.
Overview
Practical learning for workplace transfer.
Pattern knowledge is usually acquired as a catalogue, and the result is predictable: factories that wrap a single constructor, strategy hierarchies with exactly one implementation, and an abstraction layer written for a second database that never arrives. Every one of those decisions is defended as good design while it quietly raises the cost of the next change. This course treats a pattern as a decision with a price. Participants refactor real Java code, name the forces that justify each structure, and practise removing patterns that no longer earn their keep, using records, sealed types, and pattern matching where the language now does the work.
Prerequisites
Working knowledge of Java syntax, classes, interfaces, and collections. Experience maintaining a Java application is an advantage.
Objectives
- Evaluate a design by its cohesion, coupling, and the changes it makes cheap or expensive.
- Apply the SOLID principles to Java code without inflating the class count.
- Choose between inheritance, composition, and delegation using explicit trade-offs.
- Implement creational and structural patterns only where construction or boundaries genuinely vary.
- Replace classic patterns with records, sealed types, and switch pattern matching where the language now suffices.
- Refactor an existing Java module toward a design that absorbs the next requirement.
Target audience
- Java developers with a year or more of production experience
- Technical leads responsible for code structure and review standards
- Backend engineers maintaining long-lived business applications
- Software architects validating designs before implementation begins
- Developers preparing to break a monolithic application into modules
- Engineers who have inherited codebases they did not design
Program outline
A clear structure for the learning journey.
Program outline
Outline points are grouped in one designed block instead of being treated as separate module cards.
Module 1: Design Forces: Cohesion, Coupling, and Change
What a design optimizes for: the changes the team expects to make next
Measuring cohesion and coupling on real Java classes and packages
Abstraction that pays for itself versus speculative generality
Reading an unfamiliar codebase for the design decisions nobody wrote down
Module 2: SOLID in Practice, Not in Theory
Single responsibility applied at module level rather than method level
Open-closed through extension points that are genuinely used
Liskov substitution and the contracts an inheritance hierarchy silently promises
Interface segregation and dependency inversion inside Java service code
Module 3: Object Construction and Creational Patterns
Factory method and abstract factory where instantiation genuinely varies
Builder for wide constructors, optional fields, and validated objects
Singleton, its testing cost, and why dependency injection replaces it
Prototype and object pooling, and the common cases where neither is warranted
Module 4: Structural Patterns and System Boundaries
Adapter and facade for taming third-party and legacy interfaces
Decorator versus inheritance for layering behaviour at runtime
Composite for recursive structures and the traversal cost it introduces
Proxy for lazy loading, access control, and remote invocation
Module 5: Behavioural Patterns and Runtime Variation
Strategy, and when an enum or a lambda is the better answer
Template method versus composition for sharing an algorithm skeleton
Observer, event publication, and the debugging cost of indirection
State, command, and visitor weighed against their maintenance burden
Module 6: Modern Java and Design Simplification
Records and sealed interfaces replacing value objects and type hierarchies
Switch pattern matching as an alternative to visitor and double dispatch
Removing a pattern safely by locating every remaining caller first
Closing design review on a module brought by the participants themselves
Materials provided
- Course workbook, annotated code samples, and reference notes
- Hands-on lab environment and starter repositories
- Exercises, checklists, and reusable code templates
- 4D Certificate of Completion
- Post-course technical guidance
Training Options
Programs can be delivered in-house, online, or in a blended format depending on your team's schedule, location, and learning objectives. When an external certificate or exam is included, certification rules and fees remain under the relevant awarding body's policies, while 4D provides the training and preparation support.
Why choose 4D
4D runs this course on Java code your own team wrote, not on shapes and animals. Each day closes with a design review in which trainers and participants argue the trade-offs of a genuine module, agree which abstractions to keep, and mark the ones to remove before they harden into architecture nobody dares to touch.
Related courses
Python Programming Fundamentals
A hands-on introduction to Python for engineers and analysts who need working code rather than tutorial fragments. Participants build fluency with data types, collections, functions, files, and error handling, then assemble a small program that reads real data and produces a usable report.
View courseIntermediate Python and Clean Code Practices
Designed for developers whose Python works but is difficult to change. The course covers dataclasses, generators, decorators, context managers, and type hints, then applies the refactoring moves that turn a nine-hundred-line module into small tested units guarded by black, ruff, and mypy.
View coursePython Automation and Scripting for Work Tasks
Aimed at teams losing hours every week to repetitive file, spreadsheet, and reporting work. Participants automate those tasks with Python: batch file handling, Excel and CSV processing, REST API calls, email alerts, and scheduled jobs that run unattended and report clearly when something fails.
View course