Amazon Prime Free Trial
FREE Delivery is available to Prime members. To join, select "Try Amazon Prime and start saving today with FREE Delivery" below the Add to Cart button and confirm your Prime free trial.
Amazon Prime members enjoy:- Cardmembers earn 5% Back at Amazon.com with a Prime Credit Card.
- Unlimited FREE Prime delivery
- Streaming of thousands of movies and TV shows with limited ads on Prime Video.
- A Kindle book to borrow for free each month - with no due dates
- Listen to over 2 million songs and hundreds of playlists
Important: Your credit card will NOT be charged when you start your free trial or if you cancel during the trial period. If you're happy with Amazon Prime, do nothing. At the end of the free trial, your membership will automatically upgrade to a monthly membership.
$36.16$36.16
Ships from: Amazon.com Sold by: Amazon.com
$25.66$25.66
$3.99 delivery Tuesday, January 28
Ships from: zabinas Sold by: zabinas
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F# 1st Edition
Purchase options and add-ons
You want increased customer satisfaction, faster development cycles, and less wasted work. Domain-driven design (DDD) combined with functional programming is the innovative combo that will get you there. In this pragmatic, down-to-earth guide, you'll see how applying the core principles of functional programming can result in software designs that model real-world requirements both elegantly and concisely - often more so than an object-oriented approach. Practical examples in the open-source F# functional language, and examples from familiar business domains, show you how to apply these techniques to build software that is business-focused, flexible, and high quality.
Domain-driven design is a well-established approach to designing software that ensures that domain experts and developers work together effectively to create high-quality software. This book is the first to combine DDD with techniques from statically typed functional programming. This book is perfect for newcomers to DDD or functional programming - all the techniques you need will be introduced and explained.
Model a complex domain accurately using the F# type system, creating compilable code that is also readable documentation---ensuring that the code and design never get out of sync. Encode business rules in the design so that you have "compile-time unit tests," and eliminate many potential bugs by making illegal states unrepresentable. Assemble a series of small, testable functions into a complete use case, and compose these individual scenarios into a large-scale design. Discover why the combination of functional programming and DDD leads naturally to service-oriented and hexagonal architectures. Finally, create a functional domain model that works with traditional databases, NoSQL, and event stores, and safely expose your domain via a website or API.
Solve real problems by focusing on real-world requirements for your software.
What You Need:
The code in this book is designed to be run interactively on Windows, Mac and Linux. You will need a recent version of F# (4.0 or greater), and the appropriate .NET runtime for your platform. Full installation instructions for all platforms at fsharp.org.- ISBN-109781680502541
- ISBN-13978-1680502541
- Edition1st
- PublisherPragmatic Bookshelf
- Publication dateMarch 6, 2018
- LanguageEnglish
- Dimensions7.5 x 0.65 x 9.25 inches
- Print length312 pages
Frequently bought together
Customers who viewed this item also viewed
From the brand
-
Explore our collections
-
The Pragmatic Programmers publishes hands-on, practical books on classic and cutting-edge software development and engineering management topics. We help professionals solve real-world problems, hone their skills, and advance their careers.
From the Publisher
From the Preface
Many people think of functional programming as being all about mathematical abstractions and incomprehensible code. In this book, I aim to show that functional programming is in fact an excellent choice for domain modeling, producing designs that are both clear and concise.
This book is for experienced software developers who want to add some new tools to their programming tool belt. You don't need to have prior knowledge of domain-driven design or functional programming in order to read this book. This is an introductory book and all the important concepts will be explained as we need them. You should read this book if:
- You are curious to see how you can model and implement a domain using only types and functions.
- You want a simple introduction to domain-driven design and want to learn how it is different from object-oriented design or database-first design.
- You are an experienced domain-driven design practitioner who wants to learn why DDD is a great fit with functional programming.
- You want to learn about functional programming, but have been put off by too much theory and abstraction.
- You want to see how F# and functional programming can be applied to real-world domains.
Editorial Reviews
About the Author
Product details
- ASIN : 1680502549
- Publisher : Pragmatic Bookshelf; 1st edition (March 6, 2018)
- Language : English
- Paperback : 312 pages
- ISBN-10 : 9781680502541
- ISBN-13 : 978-1680502541
- Item Weight : 2.31 pounds
- Dimensions : 7.5 x 0.65 x 9.25 inches
- Best Sellers Rank: #673,879 in Books (See Top 100 in Books)
- #41 in Functional Software Programming
- #132 in Computer Hardware Design & Architecture
- #265 in Object-Oriented Design
- Customer Reviews:
About the author
Discover more of the author’s books, see similar authors, read book recommendations and more.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Customers find the book's content concise, detailed, and well-organized. They appreciate its systematic approach to concepts and find it easy to read. The book demonstrates the benefits of using functional features of F# for business process design. Readers describe it as an enjoyable and readable addition to the Functional DDD community.
AI-generated from the text of customer reviews
Customers find the book's content clear and easy to understand. They appreciate the systematic approach to concepts and how it leads naturally into design and coding. The book explains domain-driven design with F# in a way that is comprehensive and easy to follow.
"...Scott is an excellent F# explainer. He frames useful, believable examples in ways that show off the special qualities of F#...." Read more
"Just as the title says, this book shows how to do domain-driven design using only the functional features of F#...." Read more
"This has significantly influenced how I design software and work with clients. It applies to anyone who codes." Read more
"...Mr Wlaschin is as clear and concise as ever, and somehow manages to pack tons of knowledge on every page in an enjoyable and readable fashion...." Read more
Customers find the book's content and organization great. They appreciate its systematic approach to concepts and find it enjoyable to read. The book delivers on its promises.
"...It's great content, but this book really takes that content and uses a different example to illustrate how DDD is "done" in functional programming,..." Read more
"This is a very good book. It delivers what it promises...." Read more
"...and somehow manages to pack tons of knowledge on every page in an enjoyable and readable fashion...." Read more
"One of the better programming books that I've read in a long time...." Read more
Customers find the book useful for functional programming and DDD. They say it's a great addition to functional programming and an excellent explanation of F#. The book shows how functional programming fits DDD better than OOP.
"...Scott is an excellent F# explainer. He frames useful, believable examples in ways that show off the special qualities of F#...." Read more
"...It turns out that functional programming fits DDD better than object-oriented programming, and while F# is not a perfect functional language, it's..." Read more
"...The project is not too simple. The whole approach really opened my eyes, and I'd like to try something like this on my next project." Read more
"...driven design, type driven design, hexagonal architecture, functional programming, monads, and oh right — F#!..." Read more
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
- Reviewed in the United States on March 20, 2020Scott's book starts off w/analysis, not coding. This is an underdiscussed stage of process development. It leads naturally into the design/coding parts. He shows how the concepts are captured in each department of a business, and how to bridge them successfully in a single system. It permits the local concepts to be silos, but finds a way to carry them across in a way that isn't too tight (requiring cooperative evolution) nor too weak (causing subversion of the interfaces).
Scott is an excellent F# explainer. He frames useful, believable examples in ways that show off the special qualities of F#. Lots of devs will think they don't need F# and can port the ideas to their platform. They should really try F# before dismissing it, though; the benefits are real (concise, bug-resistant, easier for non-devs to read). It can be ring-fenced in a part of the product (e.g. "the business logic") if the other system parts must be coded otherwise.
Read his blog on F#!
- Reviewed in the United States on December 8, 2018I resisted buying this book for a bit because I thought I could find most of this information at F# for Fun and Profit, a website the author maintains. While you can find much of this information there, it's a bit fragmented, as that site is really geared towards getting people on-boarded to F#, in general, especially when coming from an OOP background such as C#. It's great content, but this book really takes that content and uses a different example to illustrate how DDD is "done" in functional programming, specifically with F#. If you're a fan of Scott Wlaschin and of F# for Fun and Profit, you won't be sorry to pick up this book if you're looking to take your FP skills no the next level after coming from an OOP background. Thanks for the book, Scott!
- Reviewed in the United States on October 18, 2019If you have watched a few of Scott Wlaschin's talks at NDC many of the concepts are familiar, but the book takes you through the entire journey. Love it!
- Reviewed in the United States on April 15, 2021This is a very good book. It delivers what it promises.
If you want to go "functional", if you want to learn F# - this is the book for you. You won't find better.
By the way, why you want to "go functional"? To write a better code? You don't have to go all-functional for that. And even if you want to go functional, why F#? why not Haskell? Why not Scala?
Questions such as "Why you want to go functional?" are completely outside of the scope of the book. Which is, again, as promised.
Let's say you want to "go functional" because you don't know how to solve the persistence problem with the OOP (object-oriented-paradigm). It's a very good concern and very good thinking of yours. Because the data persistence is the actual problem. The fact, which author of the book might not be aware of.
He advises to "push persistence to the boundaries of the DDD (domain-driven-design) model". And this is a very good advice, very solid advice. I agree with that 100%.
Still, DDD, in my humble opinion, is actually called to solve the persistence problem, not some other unknown or implicit problem.
You can create a very good data model in any programming language using any programming paradigm if you don't worry about data persistence. But in case you are not aware that the problem exists, why F#? Why functional?
- Reviewed in the United States on March 30, 2021Just as the title says, this book shows how to do domain-driven design using only the functional features of F#. It turns out that functional programming fits DDD better than object-oriented programming, and while F# is not a perfect functional language, it's easily the best on the .Net platform. The book is clear, carefully organized, and should be perfectly accessible to the F# newcomer. Experienced F# programmers who are new to DDD will see how powerful this approach is.
- Reviewed in the United States on September 8, 2023This has significantly influenced how I design software and work with clients. It applies to anyone who codes.
- Reviewed in the United States on August 18, 2018The definitive evidence that statically typed functional languages are the best fit for DDD. Mr Wlaschin is as clear and concise as ever, and somehow manages to pack tons of knowledge on every page in an enjoyable and readable fashion. I would recommend this book for all programmers interested in learning DDD, functional programming or both.
- Reviewed in the United States on March 16, 2018One of the better programming books that I've read in a long time.
I had trouble imagining how you could scale F# to a larger "business" project. Very clear descriptions.
The entire book follows a project from design -> implementation using F#. The project is not too simple.
The whole approach really opened my eyes, and I'd like to try something like this on my next project.
Top reviews from other countries
-
Matteo VReviewed in Italy on November 8, 2021
5.0 out of 5 stars Chiaro anche per chi non programma in funzionale.
Premettendo che ho sempre programmato ad oggetti e neofita sul DDD, ho trovato il libro molto chiaro, non solo per gli esempi fatti, di facile comprensione, anche per chi non ha mai usato F#, ma anche per come viene trattato l'argomento DDD.
-
Àlex LuqueReviewed in Spain on August 10, 2019
5.0 out of 5 stars Ameno y técnico a la vez
El libro está muy bien escrito. Es ameno de leer. El escritor ha hecho un gran trabajo clarificando los conceptos para que sean fáciles de digerir.
En la primera parte explica qué es el Domain-Driven Design y qué beneficios tiene aplicarlo.
En la segunda parte entra más en detalle en el tema y explica cómo modelar la aplicación de ejemplo en F#. Yo no conocía F# antes de comprar el libro pero la puesta en escena del lenguaje es tan clara que me llevo un gran sabor de boca de lo interesante que sería programar en él. Reitero lo increíblemente bien que se explica este hombre.
Ya en la tercera parte, se adentra en el código razonando los porqués de la estructuración bajo el paradigma funcional.
Personalmente, compré el libro recomendado por un experto en FP y tenía razón al decir que la exposición de cómo estructurar un programa funcional es muy clara en este libro. Además, de regalo te llevas el conocer DDD.
-
M.NReviewed in Germany on September 1, 2019
5.0 out of 5 stars Kompakte und verständliche Einführung in DDD und funktionale Programmierung
Das Buch eignet sich gut um in die funktionale Programmierung einzusteigen bzw. sich fortzubilden; für mich als Java-Entwickler war es sehr hilfreich zu sehen wie man Probleme zerlegt und organisiert, wenn man nicht mehr objekt-orientiert arbeiten kann (z.B. ohne Seiteneffekte) und daher anders (und IMHO besser) vorgehen muss; er ist einer der wenigen, die ein (für viele OO-Programmierer ganz neues) Thema wirklich verständlich präsentieren kann.
Man kann sich Scott Wlaschin und seinen Lehrstil auf Youtube ansehen um einen ersten Eindruck zu verschaffen.
- YossuReviewed in the United Kingdom on May 22, 2018
5.0 out of 5 stars A genuine use case for F# at last, and a clear explanation of DDD
As a C# programmer, I get very annoyed by the number of "Why use F#?" and "F# vs C#" articles I see that attempt to sell F# by belittling C#, usually incorrectly. The (very) few convincing articles are usually demonstrating trivial tasks that aren't really challenges in either language. I spent a long time totally unconvinced as to the benefits of F#, until I decided to ignore those articles and just try learning it anyway.
This book is a game changer. Apart from a very clear explanation of DDD[*], the way he explains the evolution of the types, and the simple translation of the simple language that the domain expert(s) can understand into F# is very powerful. You can see how the code itself becomes the documentation. Whilst I don't see curly braces and "get; set;" in C# as noise (my mind filters them out), I can see how a non-developer would struggle to make sense of a C# class, whereas the F# type is so clear that any non-developer could understand it. The domain model can evolve with the code, documenting itself as it goes along.
As for the idea of functional programming vs imperative programming, I'm still not convinced that either has a huge advantage over the other. C# has so many functional features that the lines are becoming increasingly blurred. However, the way he demonstrates splitting the workflow into sections, and piping the output of one into the next is very clear and clean, and his use of section-specific types means you can't really get it wrong. I can see how this approach to coding could drastically reduce the number of bugs. It does lead to a type explosion, but it's probably worth the price, given how simple the types are in the first place. Again, this isn't anything you couldn't do in C#, but it looks a lot cleaner in F#.
If you're still looking to be convinced about F#, you should certainly read this book. Even if you aren't, it's probably still worth reading, as the explanation of DDD is excellent[*], and what he says can be applied to C# as well.
[*] Caveat, I haven't read any other books on DDD, so can only comment on how I found this one, not how it compares with any others
One person found this helpfulReport -
tomatoReviewed in Japan on January 7, 2022
5.0 out of 5 stars 関数型はOOPよりもDDDがやりやすいのかもしれない。
モナドという言葉なしに、モナドの必要性が自然とわかる書き方になっており、関数型言語に詳しくなくても読める。むしろこの本のわかりやすい説明のおかげで関数型言語の理解が深まった。
エヴァンス本よりもわかりやすい実例。よみやすい。(早く和訳本出して欲しい)
値オブジェクトは関数型の型システムの方が実装が楽。型ドリブンに型だけで実装なしに設計できる。
直和型による素直な設計。少しずつ大きくしていける。
関数のパイプラインな設計のおかけで、機能の追加がしやすい。