Perhaps the biggest challenge a developer faces is understanding the problems that a software system needs to solve. Domain modeling is a technique for creating a conceptual map of a problem space such as a business system or a scientific application, so that the developer can write the software more efficiently. The domain model doesn't present a solution to the problem, but instead describes the attributes, roles, and relationships of the entities involved, along with the constraints of the system.
Reactive application design, which uses functional programming principles along with asynchronous non-blocking communication, promises to be a potent pattern for developing performant systems that are relatively easy to manage, maintain and evolve. Typically we call such models "reactive" because they are more responsive both to user requests and to system loads. But designing and implementing such models requires a different way of thinking. Because the core behaviors are implemented using pure functions, you can reason about the domain model just like mathematics, so your model becomes verifiable and robust.
Functional and Reactive Domain Modeling teaches you how to think of the domain model in terms of pure functions and how to compose them to build larger abstractions. You will start with the basics of functional programming and gradually progress to the advanced concepts and patterns that you need to know to implement complex domain models. The book demonstrates how advanced FP patterns like algebraic data types, typeclass based design, and isolation of side-effects can make your model compose for readability and verifiability.
On the subject of reactive modeling, the book focuses on higher order concurrency patterns like actors and futures. It uses the Akka framework as the reference implementation and demonstrates how advanced architectural patterns like event sourcing and CQRS can be put to great use in implementing scalable models. You will learn techniques that are radically different from the standard RDBMS based applications that are based on mutation of records. You'll also pick up important patterns like using asynchronous messaging for interaction based on non blocking concurrency and model persistence, which delivers the speed of in-memory processing along with suitable guarantees of reliability.
দেবাশিস ঘোষ-এর জন্ম ৪ ডিসেম্বর ১৯৭১, হাওড়ায়। বিজ্ঞানে স্নাতক। স্নাতকোত্তর ডিপ্লোমা জার্নালিজম ও মাস কমিউনিকেশনে। চলচ্চিত্র ও প্রকাশনা বিষয়ে শিক্ষা গ্রহণ করেছেন। প্রথম চাকরি হিন্দুস্থান টাইমসের বিপণন বিভাগে। পরে বিভিন্ন সংবাদপত্র সংস্থায় বিজ্ঞাপনের কাজ। সাংবাদিকতার হাতেখড়ি আনন্দবাজার পত্রিকার হাওড়া ক্রোড়পত্রে। আকাশবাণীর সংবাদ বিভাগে কাজের অভিজ্ঞতাও রয়েছে। ছোটদের জন্য গল্প লিখেছেন আনন্দবাজার পত্রিকার রবিবাসরীয় আনন্দমেলা এবং শুকতারা-য়। আবৃত্তি, ছবি আঁকা, বই পড়া ভালবাসেন।
this is the best book to read right after you've finished "functional programming in scala" and wondering "ok.. functional programming is fun, but how to use it in the real world"
That's a really useful book, integrating great ideas from domain driven design, functional programming and reactive design principles. It is sometimes a little focused on tools but that's not bad and I don't know any other way for explaining this ideas in a useful way. Anyway, this book is a must if you love new ideas and patterns in modeling and FP
This is a very good breadth first overview of sensible functional programming practices, put into the context of industry software. If you're a programmer, you should read it. Mostly because ignorance the of great compositional power of functional programming will keep you in the dark about a way of organizing code that is ravishingly beautiful.
Than being said, during my development as a software engineer I have been constantly introduced to new concepts: some enlightening, some not. But no other book has made me feel like a "monkey with a keyboard" when it comes to how I relate my own knowledge, experience, and wisdom to what is possible. I though I was very familiar with the abstractions that are possible with functors, monads, applicatives, and a good type system... until I read this book. I've been using "high level programming languages" the wrong way my entire life.
I've been to the mountain top and now I see a way forward.
Interesting algebraic approach to Domain-driven Design coming from a strongly typed language. Probably the first time I've understood the value of Free Monads in an application context.
As a first serious foray into Domain Driven Design by someone who hasn't touched Scala for years (and only did very briefly back then) this book could've been a total miss for me. But it wasn't. It nicely covered multiple topics which I found relevant to what I've been thinking about recently and the Scala-isms were overwhelming only in few select parts. That being said, there were parts of the book that were very specifically about either Scala itself or about its libraries and so whose applicability to other languages is likely low.
One of the things I hoped to find ideas for when picking up this book was modularizing and combining stream-based code with non-stream-based code. This and the testability of these modules. This is something I've seen cause a lot of confusion in the system when streams are also used to evoke effects on the state in its surrounding environment. Unfortunately I don't think I found too much clarity on that front from this book.
Other questions, such as when to use the actor model and various monadic approaches have luckily gotten great answers from this book. Although the combining of effects with monad transformers is still a bit unclear for me. This is something which I've thought about doing even in languages with lesser type systems when compared to that of Scala or Haskell.
Functional programming is, in a sense, the next step in the evolution of pattern-based programming and this work by Debasish Ghosh helps point the way to building successfully on these functional patterns. Debasish shows us how to unify the world of domain-driven design, as laid out so well by Eric Evans and Vaughn Vernon, with the powerful constructs of functional programming in a way that will lead to better and more maintainable software. Don't be fooled, this is not an easy book to read, at least not if you're new to FP concepts, but if you feel like you want to push yourself to the next level and build better software, this is a must read.
Note: I was, at least early on, a technical reviewer for this book. However, I receive no compensation for the ultimate success of this work. I simply believe it's an incredibly useful and important guide and want to ensure others are aware of it.
A very good book summarizing FP concepts - the one I've desperately needed 4-5 years ago when I've started my FP journey. I would recommend it reading before you start the Chiusano's "Functional Programming in Scala", it was a clear and refreshing read.
This book advocates some nice ideas around reactive and stream-oriented systems. It's a very nice read, provided that one can pay attention not to get lured by the overzealous focus on category-theory flavor of FP.
This FP flavor is quite similar to the OOP design patterns popularized by the GoF book: - Has too much boilerplate coming from solution space. - Promotes a clunky layer of "general purpose DSL" on top of a general purpose programming language, which doesn't compose as well (both within itself, and with the underlying language). - Illustrates the need for better language designs (e.g. dotty's "effect typing", or first-class management of dependencies between modules), but introduces hacks as solutions.
Good book, but was somehow hard to read for me because of the author's writing style. In the beginning of each chapter there is a rather lengthy description of things you will learn in this chapter. Instead I would love to see a deeper dive into details of certain topics. At the end of the day it's worth reading because of ideas presented there, but don't expect an easy walk in the park.
If one is wondering how to design a project even after going through the basics of functional programming - then this book can provide a reasonable start.
It should be read after reading the red book - functional programming in Scala. As this book fills that gap from knowing the functional patterns and using/fitting them in the project design.
It uses familiar domain - banking - for the example domain. Throughout the book, it goes on refining and enhancing this sample project using the ideas presented for domain modeling, functional programming, and reactive design. This made it quite comprehensible to follow along.
This is the book which made me 'see' the power of types in functional programming. The author's explanation of Kleisli and Free monads with their usage made me appreciate/see the power of 'typed' functional programming in how these abstractions help in giving mathematics like functional composition and maintaining the purity/referential transparency of the code. I was kind of blown away with the Free monads!
Now for the cons, which I found mainly with the writing style. In every few sentences, author either address the reader 'you' or himself 'I'. It feels like reading a text generated from a classroom lecture.
Another minor thing again with the writing style - Instead of saying that something is a violation of 'software principles' again and again, it would be better to leave the discussion after explaining why that something is bad.
Also, the book felt somewhat verbose and could be reduced at least to 60-70% of its current size.
A very practical book from the start, yet well-grounded and insightful. After reading Functional Programming in Scala I was left with some abstract concepts that I didn't really know how to apply. This book explains them (monoids, functors, applicatives, monads), as well as other ones like actors and streams, but with very concrete examples within the domain of personal banking (an example domain the author uses, not that this book is about banking). Speaking about domains, the author also articulates the topics with various Domain Driven Design concepts, which will get you started on DDD if you haven't read anything about it, or will make it clearer how to take advantage of it (functionally) in Scala. If you're serious about developing software professionally in Scala, this book is a must-read.
Quite good. Some eye-opening pages/chapters/examples. The companion code that can be downloaded is very neat indeed. The whole book is well done. Don't expect a deep dive, it's just scratching the surface of a variety of topics - plenty of food for thought and inspiration to go off and look into those Kleisli, Free monads and Akka Streams in more depth. I think I will now continue with an Akka book.
A great book on functional approach and patterns for "real life" modeling. You certainly need some background on FP to be able to grasp it ("the red book" is a must), but it's a nice read to learn how to implement FP solutions.
The only reason to rate this book as 4 instead of 5 is that it feels unbalanced. It could've skipped the strategic part of DDD and Scala basics, and focus more on more complex concepts and implementations.
I found plenty of clarifications about how to practically apply functional concepts to day today tasks. The book unifies many of the techniques I am studying in a consistent explanation that "finally makes sense". I would advice this book to every advance developer that wants to apply good programming practices like domain driven design using functional paradigms as an alternative to the classic OOP way.
Book about everything and nothing. If you want to learn DDD you should read ..., if you want to learn Reactive you should read ..., if you want to learn Akka you should read ..., if you want to learn CQRS you should read ... and so on. Too much focused on the frameworks and libraries instead of general concepts.
First things first: if you're not into Scala, it's not a book for you. Also - if you're not familiar with Scalaz, it would make a lot of sense to get along with that lib first - makes reading the book far less painfully.
Back to the book itself - quite uneven. Some generic content regarding functional & regarding principles - not really interesting & easily available in plenty of other sources. But also contains some actual functional modelling considerations (shouldn't be that surprising, keeping the title in mind ...) - this stuff is much more rare & hence valuable. What about these then? Well, if you're expecting anything like PPP of DDD (by Millett) or Reactive Messaging Patterns (by Vernon) than this is not something you'll get - this book is far less about modelling & far more about FP - mainly composition & modularization using FP.
Sadly, I couldn't get rid of the impression that author gets very selective in terms of patterns / techniques used - but the content that actually got into the book is quite decent - e.g. usage of reactive streams in modelling, practical application of free monads to avoid "happy path" syndrome, practicalities of polymorphism in FP, etc.
To summarize: this book didn't really rock my world, but I've already re-visitted two particular, narrow topics because they were intriguing enough to encourage further research.
I like the book but I think I should read it at least once again. Probably my level in functional programming is too low - some concepts in the book required hard brainwork. Besides the Scalaz library is used in the exapmles and I'm not quite familiar with it.
Object-oriented ideas have long influenced the approach to software design and implementation across many commercial application domains. Recently however, there is growing interest in the benefits of a more widespread adoption of functional programming approaches. These benefits include increased reuse and composability, ease of understanding and testing, improved scalability and so forth.
This book draws together ideas from the three fields of domain-driven design, functional programming and reactive programming to provide a detailed and insightful exposition of modern approaches to domain modelling and implementation.
Domain driven design concepts permeate the book, with examples drawn from a simplified banking domain. The book explores the relationships between domain driven design concepts, such as bounded contexts, ubiquitous language, values, aggregates, repositories and so forth and their mapping to design processes, functional models and programming constructs specifically implemented in Scala.
The book describes the development of functional models using immutable data structures expressed as algebraic data types and manipulated by APIs abstractly expressed as algebras over those types and concretely implemented by interpreters. In addition, the book describes practical implications of the functional programming concepts of building programs as expressions rather than sequences of imperatives and representing types of computation using functional structures such as functors, monoids and monads. Functional programming ideas are explored in terms of being pragmatic modelling and programming tools rather than as theoretical concepts.
The book goes on to describe reactive systems programming, using techniques from functional programming to compose reactive effects such as Futures, as well as describing the use of messages and Actors in developing non-blocking APIs. Stream processing is introduced as a core technique for building reactive systems and the book provides a detailed look at Akka Streams. A chapter also provides discussion of alternative persistence techniques which support reactive systems, including Command Query Responsibility Segregation and event sourcing.
Running to a little under three hundred pages, the book is detailed and fast paced, with lots of example code snippets supported by an online repository containing a full, working code as well as pointers to other references. To help the reader navigate and assimilate the subject matter, each chapter contains an introductory map of its content, and a useful summary of its key points.
This is a great book for readers who want to explore modern ideas in systems design and implementation, and is one which warrants detailed study. However, some prior knowledge of functional programming and Scala is required.