This course shows you how easy it can be to make your code—even legacy code—testable.
You have enough experience building software systems that you know automated developer tests are important in order to continue to deliver features safely.
You've given up on "unit tests" and now everything is an "integration test", yet bugs continue to escape. Despite your best efforts, you struggle with tests that are slow, unreliable, or hard to understand. When you make a change, far-flung tests seem to fail for no obvious reason.
The problem isn't you, it's the way your code is organized. You need a way to have your tests give you useful feedback that tells you precisely where things went wrong.
You need to create clear boundaries between your valuable domain logic and the code that connects it to the rest of the world. Hexagonal Architecture helps you do that.
You'll be guided, step-by-step—with hands-on exercises and detailed solutions—through every part of the architecture:
If you struggle to write JUnit tests for your code, especially when you have complex domain (business) logic mixed with I/O and calls to external services, then this course will help you organize (and re-organize) your code to make testing easier.
Whether you write code in a "monolith" or as microservices, you'll find you'll quickly be able to apply the Hexagonal Architecture to your own work.
After taking the [live] course, I finally have clarity about where code belongs and why. Now when I refactor, I know what direction to take to make the architecture better. I am also much better able to explain and justify to my colleagues why the code is better.
This course assumes you are fluent in reading Java 8 (or later) code and can write Java without much help. If you're new to Java, or don't have much experience with writing unit tests, this course probably isn't for you.
The course is taught using Java and the powerful development environment, IntelliJ IDEA from JetBrains. I use IntelliJ IDEA because of its powerful refactoring tools, which you will learn along the way.Spring Boot
For the sections that integrate with external services and databases, Spring Boot both the latest 2.x and 3.x versions are used. You don't have to be an expert in Spring Boot, everything you need to know will be covered.
I've been coding Java in some of the largest codebases at eBay, Google, Apple, and others.
Through the years, I've learned that testability of code is vital to sustaining development and avoiding tech debt. Everything I've done for the past 20+ years has been about finding ways to make that easier.
I've spent over 2 years creating, teaching, and refining this course, pulling in everything I know about writing and refactoring to testable code. I've taught this course as a live workshop over 40 times to over 700 developers at large companies around the world.
Now I'm thrilled to bring it to you as a self-paced course.
The course consists of ten in-depth modules, combining diagram-packed explanations with lots of test-driving of code and advanced refactoring techniques.
After learning about the different parts of Hexagonal Architecture, we dive into our course project: a game of Blackjack.
Through over a dozen exercises—with detailed walk-throughs for each one—we'll transform the console-based game into one with a web UI. Along the way, we separate the code, placing each piece of code where it belongs, guided by the fundamental rules of Hexagonal Architecture.
Each module has multiple segments that will be released when completed. (Availability dates are subject to change.)
Compares and contrasts Hexagonal Architecture to ones you might be familiar with.
Stop trying to test code that mixes Domain Logic with I/O and infrastructure.
Create a console-based adapter that holds all of the console-specific code. Learn about Data Transfer Objects and packaging your code.
Status: In Progress
How do you test collaborating objects that are unreliable or unpredictable? Test Doubles.
Status: Coming in March
Introduce a Spring MVC-based Web UI adapter using the Predictive TDD process. The UI uses Spring Boot and the Thymeleaf Template Engine.
Status: Coming in March
The Application Services Layer (also called Use Case Layer) and the Domain Layer have very specific purposes.
Status: Coming in March
Ports give us a testable way to send information to an external service.
Most applications need to store and retrieve data from a database. This is how to do it the test-driven way.
External services have information our application needs, this is how we get it.
Each application has its own needs, but with Hexagonal Architecture, they are structured in a similar way. Let's dig into some other applications using this architecture.
Learning about Hexagonal Architecture helped me focus on what really matters: the domain. I was able to fix anemic domain models in my projects and put the behavior where it belonged. I can now keep the outside world well-isolated from the domain code, which makes those projects more flexible and easier to maintain.
My test suites are now faster, because more of my tests run against the core of my system and never touch slower infrastructure.
Learn at your own pace
All 10 Modules
As they're released.
Ask questions and discuss the material with the community.
Full source code
You'll get all the code from exercise solutions, lesson demonstrations, and more.
Weekly Office Hours
No access to weekly, live office hours.
No access to monthly, deep-dive workshops.
No access to weekly, learning ensembles.
Everything in the Basic Journey, plus 3 months of learning help with
Weekly Live Office Hour Zoom
Get questions answered and access to recorded office hour sessions.
Live workshops on related topics, with access to recordings.
Access to private Discord channels for more personal help.
Join 2-4 others to practice skills in live group coding sessions (details).
3 months of everything in the Basic Journey and Group Guided Tour, plus
2 hours of Private Coaching
1-on-1 time with Ted: get direct help with course exercises, feedback on your code, or discuss software development.
Priority Access to Learning Ensembles
Space will always be available for Private Guided Tour members.
Got a Question? Here's Answers to Common Ones.
Once I've processed your purchase, you'll get access to all published course segments and the private Discord channel. You'll then get emails as new course segments are published. If you buy the Guided Tour (group or private), you'll also be invited to join the private Discord channels when you complete your purchase.
It's expected (but not guaranteed—I'm only human) that all modules will be complete in early 2024. If you purchase the course during this limited Early Access, you get new content as it's completed.
That matches the expected time for me to release the entire course. Once the 3 months are up, the course will go on sale again with a variety of subscription options for continued Guided Tours (the tour never ends!). As early-access buyers, you'll get a discount on any subscription offered.
Excursions are mini-modules that are first presented as live webinars for those in the Group Guided Tour or Private Guided Tour groups. Planned excursions include:
Yes. All videos are in English and have English closed captioning (subtitles). Separate transcriptions are also available for each video.
All the code is in Java, so you will at least need to be able to read Java code.
C#: Java and C# are similar enough that you will likely get a lot out of the course.
PHP: I have had a number of people who code in PHP who found the course valuable.
[A cohort-based class is where students all move through the course materials together at the same time.]
While everyone will get newly completed videos and materials at the same time, this is not a "cohort" class where you are expected to finish watching the videos and doing the exercises by a deadline. For those in the Guided Tours, the questions and discussion will naturally be about any recently released materials, but we will also discuss topics related to the course.
You might know them under the name Mob Programming.
Every week, I gather 3-5 coders in a live session over Zoom to practice our skills in TDD, refactoring, object-oriented design, and hexagonal architecture. Over the 90-120 minute session (length varies), every person gets several chances at being the "driver" (the one who types) and the "navigator" (the one who provides directions to the Driver).
These private, small, hands-on groups provide the best way to practice and learn new skills. Because they need to be small, availability is on a first-come, first-serve basis (multiple ensembles are run each week). Those who purchase the Private Guided Tour will never be denied access to an Ensemble. If you are in the Group Guided Tour, you might be denied access if space has filled up.
Yes! Contact me at email@example.com and provide details about your team or organization.
This is an advanced course, but if you think you're ready, email me at firstname.lastname@example.org. Let me know you're a student and where you're enrolled, and I'll give you a discount coupon.
I believe in providing Purchase Power Parity. Email me at email@example.com and let me know what country you're in, and I'll give you a discount coupon.
If you're not happy, then I'm not happy. Let me know within 30 days of your purchase, and I'll refund your entire purchase price. No questions asked, and you get to keep any materials you've already downloaded.
If you still have questions, email me at: firstname.lastname@example.org.
IntelliJ IDEA and the IntelliJ IDEA logo are registered trademarks of JetBrains s.r.o. Logo Copyright © 2022. Neither Ted M. Young, nor this course are affiliated with JetBrains, other than the support from free product subscriptions supplied by JetBrains.
Copyright © 2022-2023 Ted M. Young. All rights reserved.