Data-Oriented Programming in Java (MEAP v8)
- Добавил: literator
- Дата: 26-07-2025, 23:30
- Комментариев: 0

Автор: Chris Kiehl
Издательство: Manning Publications
Год: 2025
Страниц: 333
Язык: английский
Формат: pdf, epub
Размер: 16.8 MB
Simplify your Java code with data-oriented programming!
Data is the heart of your code. Data-oriented programming is a programming technique that enables you to precisely model domains and write large enterprise-scale applications that are oriented around the data they manage. Take a data-oriented approach to your Java applications, and you’ll enjoy simpler state management, improved readability, and no more state-related bugs!
Data-Oriented Programming in Java teaches you how to use immutable strongly typed data effectively and take full advantage of the modern data-oriented features built into the Java language.
This book is about data. What it is, how to think about it, how to model it, how to represent it in our code, and all the good things that happen when we do. Programs that are organized around the data that they manage tend to be simpler, smaller, and, most importantly, significantly easier to understand. We’re going to learn how to model data “as data” using Java. Meaning data on its own, as ordinary values, independent of any class, operation, or behavior. We’ll still use those things throughout our programs, but at the heart of everything will be data, and its representation independent of any other code.
We lift data up to this lofty place because it means something within its domain and to the people that use it. Data is more than just a collection of values that gets shoveled around our programs. It’s more than that stuff inside of our objects. Data has a semantics which differentiates it from all the other data it could be. An integer can represent an infinite number of "somethings", but it's only within a particular domain that it becomes something meaningful like an age or population count. It’s by breaking out data on its own that we can focus on this semantic meaning. When we understand our data at a deep level, we unlock new expressive power in our programs.
At its core, data-oriented programming is ultimately just learning to be really, really precise about what we mean. That's pretty much the whole trick. Studying the data on its own enables us to move away from ambiguous generalities and towards explicit representations that capture the essence of what we're modeling. Before we get to the question of "what does it do?", we try to capture something much more fundamental, bordering on philosophical, the question of "What is it?". If we can answer that question and express the data’s meaning in our code, some amazing properties start to emerge which can reshape our programs.
In Data-Oriented Programming in Java and you’ll learn how to:
Model your domain accurately using records, sealed classes, and pattern matching
Use objects to manage side-effects
Harness the power of plain data
Make illegal states impossible to represent
Let the data types guide your implementation
Never write another Null check or experience another NPE!
Data-Oriented Programming in Java shows you how to transform how you think about Java code by adopting a data-first mindset. Author Chris Kiehl has honed his data-oriented Java skills in the trenches of daily development at Amazon. This guide reveals those hard-earned techniques and approaches that will elevate your skills as a Java coder.
about the book
In Data-Oriented Programming in Java you’ll learn what you might have thought was impossible: how to use Java’s type system to make code self-documenting, implicit behaviors explicit, and incorrect states impossible to even compile. This practical book teaches you how to use records, sealed classes, and pattern matching to represent the data in your domain, explore data’s inherent meaning and semantics, and represent them in their code. Each new concept is fully illustrated with a hands-on example that demonstrates how DOP helps you write scalable, testable, and maintainable code.
about the reader
For intermediate Java programmers.
Скачать Data-Oriented Programming in Java (MEAP V08)

[related-news] [/related-news]
Внимание
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.