Functional Design: Principles, Patterns, and Practices

id: 983298 not VIP Open in MaM

By Robert C Martin

Language: English

Category: Ebook - Computer/Internet

Categories: Computer/Internet

Size: 36.2 MiB epub Files: 2

Uploader: redw00d

Uploaded At: 2023-11-15 12:21:47

September 21, 2023

Description

Book description
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.

Table of contents

Cover Page
About This eBook
Halftitle Page
Title Page
Copyright Page
Dedication
Contents
Foreword
Preface

A Brief History of Functional and Procedural Programming
On Clojure
On Architecture and Design
On Object Orientation
On “Functional”
Acknowledgments
About the Author


I: Functional Basics
1. Immutability
What Is Functional Programming?
The Problem with Assignment
So Why Is It Called Functional?
No Change of State?
Immutability
2. Persistent Data
On Cheating
Making Copies
Structural Sharing
3. Recursion and Iteration
Iteration
Recursion
4. Laziness
Lazy Accumulation
OK, but Why?
Coda
5. Statefulness
When We MUST Mutate
Software Transactional Memory (STM)
Life Is Hard, Software Is Harder
II: Comparative Analysis
6. Prime Factors
Java Version
Clojure Version
Conclusion
7. Bowling Game
Java Version
Clojure Version
Conclusion
8. Gossiping Bus Drivers
Java Solution
Clojure
Conclusion
9. Object-Oriented Programming
Functional Payroll
Namespaces and Source Files
Conclusion
10. Types
Conclusion


III: Functional Design
11. Data Flow
12. Solid
The Single Responsibility Principle (SRP)
The Open-Closed Principle (OCP)
The Liskov Substitution Principle (LSP)
The Interface Segregation Principle (ISP)
The Dependency Inversion Principle (DIP)
IV: Functional Pragmatics
13. Tests
But What about the REPL?
What about Mocks?
Property-Based Testing
A Diagnostic Technique
Functional
14. GUI
Turtle-Graphics in Quil
15. Concurrency
Conclusion
V: Design Patterns
16. Design Patterns Review
Patterns in Functional Programming
Abstract Server
Adapter
Command
Composite
Decorator
Visitor
Abstract Factory
Conclusion
Postscript: OO Poison?
VI: Case Study
17. Wa-Tor
Scratch That Itch
Showers Solve Problems
It’s Time to Wildly Reproduce
What about the Sharks?
Conclusion
Afterword
Index
Code Snippets

Other Torrents