,

Functional Design

Principles, Patterns, and Practices

Paperback Engels 2023 9780138176396
Verwachte levertijd ongeveer 9 werkdagen

Samenvatting

A Practical Guide to Better, Cleaner Code with Functional Programming

In Functional Design, renowned software engineer Robert C. Martin ("Uncle Bob") explains how and why to use functional programming to build better systems for real customers. Martin compares conventional object-oriented coding structures in Java to those enabled by functional languages, identifies the best roles for each, and shows how to build better systems by judiciously using them in context.

Martin's approach is pragmatic, minimizing theory in favor of "in the-trenches" problem-solving. Through accessible examples, working developers will discover how the easy-to-learn, semantically rich Clojure language can help them improve code cleanliness, design, discipline, and outcomes. Martin examines well-known SOLID principles and Gang of Four Design Patterns from a functional perspective, revealing why patterns remain extremely valuable to functional programmers, and how to use them to achieve superior results. Understand functional basics: immutability, persistent data, recursion, iteration, laziness, and statefulness Contrast functional and object approaches through expertly crafted case studies Explore functional design techniques for data flow Use classic SOLID principles to write better Clojure code Master pragmatic approaches to functional testing, GUIs, and concurrency Make the most of design patterns in functional environments Walk through building an enterprise-class Clojure application

"Functional Design exudes 'classic-on-arrival'. Bob pulls back the curtain to reveal how functional programming elements make software design simple yet pragmatic. He does so without alienating experienced object-oriented programmers coming from languages like C#, C++, or Java."
--Janet A. Carr, Independent Clojure Consultant

Register your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details.

Specificaties

ISBN13:9780138176396
Taal:Engels
Bindwijze:Paperback

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

<p>Foreword xiii<br>Preface xv<br>Acknowledgments xxi<br>About the Author xxiii</p> <p><strong>Part I: Functional Basics 1</strong></p> <p><strong>Chapter 1: Immutability 3</strong><br>What Is Functional Programming? 4<br>The Problem with Assignment 7<br>So Why Is It Called Functional? 10<br>No Change of State? 12<br>Immutability 15</p> <p><strong>Chapter 2: Persistent Data 17</strong><br>On Cheating 19<br>Making Copies 20<br>Structural Sharing 23</p> <p><strong>Chapter 3: Recursion and Iteration 27</strong><br>Iteration 28<br>Recursion 32</p> <p><strong>Chapter 4: Laziness 37</strong><br>Lazy Accumulation 40<br>OK, but Why? 41<br>Coda 42</p> <p><strong>Chapter 5: Statefulness 43</strong><br>When We MUST Mutate 47<br>Software Transactional Memory (STM) 48<br>Life Is Hard, Software Is Harder 51</p> <p><strong>Part II: Comparative Analysis 53</strong></p> <p><strong>Chapter 6: Prime Factors 55</strong><br>Java Version 56<br>Clojure Version 60<br>Conclusion 63</p> <p><strong>Chapter 7: Bowling Game 65</strong><br>Java Version 66<br>Clojure Version 71<br>Conclusion 75</p> <p><strong>Chapter 8: Gossiping Bus Drivers 77</strong><br>Java Solution 78<br>Clojure 88<br>Conclusion 93</p> <p><strong>Chapter 9: Object-Oriented Programming 95</strong><br>Functional Payroll 98<br>Namespaces and Source Files 107<br>Conclusion 108</p> <p><strong>Chapter 10: Types 109</strong></p> <p><strong>Part III: Functional Design 115</strong></p> <p><strong>Chapter 11: Data Flow 117</strong></p> <p><strong>Chapter 12: SOLID 125</strong><br>The Single Responsibility Principle (SRP) 126<br>The Open-Closed Principle (OCP) 131<br>The Liskov Substitution Principle (LSP) 138<br>The Interface Segregation Principle (ISP) 147<br>The Dependency Inversion Principle (DIP) 152</p> <p><strong>Part IV: Functional Pragmatics 181</strong></p> <p><strong>Chapter 13: Tests 183</strong><br>But What about the REPL? 184<br>What about Mocks? 184<br>Property-Based Testing 186<br>A Diagnostic Technique 190<br>Functional 197</p> <p><strong>Chapter 14: GUI 199</strong><br>Turtle-Graphics in Quil 200</p> <p><strong>Chapter 15: Concurrency 215</strong><br>Conclusion 225</p> <p><strong>Part V: Design Patterns 227</strong></p> <p><strong>Chapter 16: Design Patterns Review 229</strong><br>Patterns in Functional Programming 233<br>Abstract Server 233<br>Adapter 236<br>Command 242<br>Composite 249<br>Decorator 260<br>Visitor 264<br>Abstract Factory 274<br>Conclusion 281<br>Postscript: OO Poison? 282</p> <p><strong>Part VI: Case Study 285</strong></p> <p><strong>Chapter 17: Wa-Tor 287</strong><br>Scratch That Itch 309<br>Showers Solve Problems 312<br>It's Time to Wildly Reproduce 322<br>What about the Sharks? 324<br>Conclusion 335</p> <p><strong>Afterword 337</strong></p> <p>Index 341</p>

Managementboek Top 100

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        Functional Design