
Explore data oriented programming in modern Java, moving beyond rigid responses to rich data models for microservices, with modern features like records and pattern matching.
Master how to tailor a canonical constructor for a Java record to enforce a business rule, like uppercasing the last name, without rewriting every field.
Explore the modern switch expression in a country-based tax example, avoiding fall-through, handling nulls and defaults, and using yield for multi-line cases.
Demonstrate a sealed contact type with email and phone records, and use pattern matching in a login verification service to send multi-factor authentication codes accordingly.
Model loan status with sealed interfaces and a loan processor that transitions from submitted to reviewed to approved or denied, using handle methods and credit score and annual income eligibility.
Determine loan interest rates by type: personal, auto (car or motorcycle by engine cc), and property (residential or commercial), then approve the loan and apply the computed rate.
Model an either type in Java by building a sealed interface with left and right cases, returning either a failure or success value and wrapping third-party phone or email types.
Demonstrate a generic result type for an http client response in a demo, building an external service client with a logger and returning a string via result.success or result.failure.
Explore polymorphic deserialization with Jackson to map json into sealed types like email or phone contacts. Use json subtypes and type information to preserve type safety in microservice communication.
Learn how to implement polymorphic deserialization with Jackson by using a type field to map mixed info fields to email and phone types, including default handling when type is missing.
Outline the order workflow from placed to fulfilled, detailing state transitions through validated, invoiced, and shipped, and cover pricing with tax, discounts, validation, payment, and shipping via external service APIs.
Validate customer id, product id, and quantity at rest controller. Generate an order id in the service and pass a create order command to the orchestrator, including the order request.
Learn why we create a product client interface for a single implementation, guided by dependency inversion, to enable future-proofing and clear contracts for potential gRPC use.
Implement a shipping service that builds a shipping request from the order, including the recipient and shipment items by product id and quantity, and schedules shipping using the shipping client.
Implement the order orchestrator with injected validator, price calculator, payment billing, and shipping services. Drive state transitions from placed to fulfilled through validated, price, invoice, and shipped states.
Expose spring beans in the config package and implement a logging interceptor for the client http requests, logging method, url, and body to aid debugging across five microservice clients.
Configure a Spring application by building an application configuration class that wires rest clients for product, customer, payment, billing, and shipping services, plus validator, price calculator, and order services.
Prerequisite: Prior knowledge of Java (up to version 17)
--
Lets deep dive into Data Oriented Programming (DOP) in Java. A modern, practical, and forward-looking programming paradigm that is reshaping how Java applications are designed and developed.
In this masterclass, you will learn how to write clearer, safer, and more maintainable Java code by shifting your mindset from objects and inheritance to data and behavior separation. Through hands-on lessons and real-world use cases, you will discover how to leverage Java’s latest language features Records, Sealed Types, and Pattern Matching to build data-centric applications that are easy to reason about and evolve.
What You Will Learn
Crash Courses on Key Modern Java Features
Records: Learn how Java Records simplify data modeling, enforce immutability, and reduce boilerplate & when to choose records over classes.
Sealed Types: Master sealed classes and interfaces to build expressive, restricted hierarchies and eliminate misuse of inheritance.
Pattern Matching: Simplify conditionals using pattern matching with switch expressions, including nested and guarded patterns.
Foundations of Data Oriented Programming
Understand the principles of DOP and how it contrasts with traditional OOP.
Dive into Algebraic Data Types (ADTs) in Java using Records and Sealed Types to model domain logic precisely and safely.
Practical Use Cases and Real-World Integration
Implement DOP in real-world scenarios, from API modeling to complex business rules.
Serialize and deserialize sealed hierarchies using Jackson including how to work with polymorphic types in JSON.
Explore data modeling, validation logic, and how DOP can simplify state machines, complex business workflows.
Better Error Handling
Use sealed hierarchies to represent all possible error cases.
Apply pattern matching to handle errors in a concise and exhaustive way. No missed edge cases.
Hands-On Final Project
Why Take This Course?
This course is designed for Java developers who want to:
Stay ahead with modern Java features
Write more declarative, composable, and readable code
Replace legacy boilerplate with expressive data models
Understand the real value of Records, Sealed Types, and Pattern Matching beyond syntax
Learn data oriented thinking, ADTs, and functional ideas without leaving Java
Whether you are building APIs, business systems or modern backend services, this course will transform how you model, process, and reason about data in Java.