چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Functional Design and Architecture: Examples in Haskell

Alexander Granin;

قیمت نهایی

۴۹٬۰۰۰ تومان

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

نویسنده
Alexander Granin;
سال انتشار
۲۰۲۴
فرمت
EPUB
زبان
انگلیسی
حجم فایل
۸٫۹ مگابایت
شابک
9781617299612، 1617299618

دربارهٔ کتاب

Design patterns and architectures for building production quality applications using functional programming. Functional Design and Architecture is a pioneering guide to software engineering using Haskell and other functional languages. In it, you’ll discover Functional Declarative Design and other design principles perfect for working in Haskell, PureScript, F#, and Scala. In Functional Design and Architecture you will learn • Designing production applications in statically typed functional languages such as Haskell • Controlling code complexity with functional interfaces • Architectures, subsystems, and services for functional languages • Developing concurrent frameworks and multithreaded applications • Domain-driven design using free monads and other functional tools • Property-based, integrational, functional, unit, and automatic whitebox testing Functional Design and Architecture lays out a comprehensive and complete approach to software design that utilizes the powerful and fascinating ideas of functional programming. Its examples are in Haskell, but its universal principles can be put into practice with any functional programming language. Inside, you’ll find cutting-edge functional design principles and practices for every stage of application development, from architecting your application through to running simple and maintainable tests. About the technology Functional programming affects every aspect of software development, from how you write individual lines of code to the way you organize your applications and data. In fact, many standard OO patterns are unsuitable or unnecessary for FP applications. This book will reorient your thinking to align software design with a functional programming style. The examples are in Haskell, but the ideas are universal. About the book Functional Design and Architecture teaches you how to design software following the unique principles of functional programming. You’ll explore FP-first paradigms like Functional Declarative Design by building interesting applications, including a fun spaceship control simulator and a full-fledged backend framework. This is an opinionated book and you may disagree on some points. But we guarantee it will make you think in a fresh way about how you design software. What's inside • Control code complexity with functional interfaces • Architectures, subsystems, and services for functional languages • Domain-driven design using free monads • Property-based and automatic whitebox testing • Recalibrate OO designs for functional environments About the reader For experienced developers who know a functional language. Functional Design and Architecture Copyright dedication contents front matter preface acknowledgments about this book Who should read this book? How this book is organized: A roadmap About the code liveBook discussion forum about the author about the cover illustration Part 1. Introduction to functional declarative design 1 What is software design? 1.1 Why functional programming? 1.2 Software design 1.2.1 Requirements, goals, and simplicity 1.3 Essential and accidental complexity 1.3.1 Low coupling, high cohesion 1.3.2 Interfaces, inversion of control, and modularity 1.3.3 Functional design 1.4 Design in mainstream paradigms 1.4.1 Imperative design 1.4.2 Object-oriented design 1.4.3 Object-oriented design principles 1.5 Software design in functional languages 1.5.1 Immutability, purity, and determinism 1.5.2 Strong static type systems 1.5.3 Patterns and idioms 1.5.4 Monads Summary 2 The basics of functional declarative design 2.1 The engineering approach 2.1.1 Software architecture classification 2.1.2 Design tools and abstractions 2.1.3 Top-down iterative development process 2.1.4 Collecting requirements 2.1.5 Requirements in mind maps 2.2 Application architecture 2.2.1 Architecture layers 2.2.2 Embedded domain-specific languages 2.2.3 Modularization of applications Summary Part 2. Minimum viable product 3 Drafting the MVP application 3.1 Goals, requirements, and plans 3.1.1 Minimum viable product 3.1.2 Andromeda software requirements 3.1.3 The hardware subsystem 3.1.4 Logic control scripts 3.2 Designing the architecture 3.2.1 Defining architecture components 3.2.2 Defining modules, subsystems, and relations 3.2.3 Defining the application architecture 3.2.4 Module organization 3.3 Naive implementation of the hardware subsystem 3.3.1 The structure of the hardware subsystem 3.3.2 Algebraic definition of HDL 3.3.3 Functional interface to the hardware subsystem Summary 4 End-to-end design 4.1 Finding the place for the end-to-end design 4.1.1 Identifying and fixing wrong dependencies 4.1.2 Improving models and naming 4.1.3 Improving the Hdl language and interpreter 4.1.4 Tests as a final consumer 4.2 Functional services 4.2.1 Layers and sublayers 4.2.2 The Service Handle pattern 4.2.3 Hardware service 4.2.4 Mocking with the Service Handle pattern 4.2.5 Type class-powered service handle Summary Part 3. Domain-driven design 5 Embedded domain-specific languages 5.1 Approaching embedded DSLs 5.1.1 Everything is an eDSL 5.1.2 Domain specific vs. domain centric 5.2 Modeling eDSLs with algebraic data types 5.2.1 Clarifying the requirements 5.2.2 Modeling eDSLs with ADTs 5.2.3 Modeling multiple interacting eDSLs 5.2.4 Decoupling languages with parameterized ADTs 5.3 Implementation of eDSLs 5.3.1 Runtime objects and lifetimes 5.3.2 Impure stateful interpreters Summary 6 Domain modeling with free monads 6.1 Introducing free monads 6.2 Free monads as a functional interface 6.2.1 Decoupling of computation and interpretation 6.2.2 The Free Monad pattern 6.2.3 Advantages and disadvantages 6.3 How free monads work 6.3.1 Wrapping languages into the free monad 6.3.2 The Free type 6.3.3 The functor instance 6.3.4 Learning the recursive free type 6.3.5 Interpretation of free monadic scripts 6.4 Free monadic eDSLs 6.4.1 Improving eDSLs with the free monad 6.4.2 Hierarchical free eDSLs Summary Part 4. Stateful and reactive applications 7 Stateful applications 7.1 Stateful functional programming 7.1.1 Simple stateful application 7.1.2 Purity, layering, state, and design 7.2 State-handling approaches 7.2.1 Argument-passing state 7.2.2 Pure state with the state monad 7.2.3 Bringing pure state into your monadic eDSLs 7.2.4 Impure mutable state Summary 8 Reactive applications 8.1 Actor model 8.1.1 Simulation of actors 8.1.2 The architecture of the simulator 8.1.3 The MVar Request–Response pattern 8.2 Implementing the simulator 8.2.1 Simulator as an actor 8.2.2 Stateful simulation model Summary Part 5. Designing real-world software 9 Concurrent application framework 9.1 Multithreaded applications 9.1.1 Why is multithreading hard? 9.1.2 Bare threads 9.1.3 Separating and abstracting the threads 9.1.4 Threads bookkeeping 9.2 Software transactional memory 9.2.1 Why STM is important 9.2.2 STM-powered runtime of the framework 9.2.3 Incorporating STM Summary 10 Foundational subsystems 10.1 Logging subsystem 10.1.1 Logger design 10.1.2 Global static mutable logger 10.1.3 Structured logging interface 10.1.4 Structured logging implementation 10.2 Advanced state management 10.2.1 Wrapping STM with the Typed-Untyped design pattern 10.2.2 State subsystem and logging 10.2.3 Trackable state 10.3 Resource initialization and the Bracket pattern 10.3.1 RAII in OOP languages 10.3.2 The Bracket pattern Summary 11 Persistence: Key–value databases 11.1 Raw untyped key–value database subsystem 11.1.1 Native key–value database libraries 11.1.2 String-based key–value database interface 11.2 Type-safe key–value database subsystem 11.2.1 Basic key–value database model 11.2.2 Approaching the type-level design 11.2.3 Type-safe key–value database model 11.2.4 Generic type-safe key–value interface Summary 12 Persistence: Relational databases 12.1 Relational database model 12.1.1 Designing relational database model ADTs 12.1.2 Primary keys and the HKD pattern 12.1.3 Polymorphic ADTs with the HKD pattern 12.2 Relational database subsystem 12.2.1 SQL connectors 12.2.2 The consequences of complexity and high coupling Summary 13 Error handling and dependency inversion 13.1 Error handling through architectural layers 13.1.1 Errors vs. exceptions 13.1.2 Error domains 13.1.3 Native exception-handling schemes 13.1.4 Exceptions in free monadic languages 13.2 Functional interfaces and dependency inversion 13.2.1 The Dependency Inversion principle 13.2.2 Service Handle pattern 13.2.3 ReaderT pattern 13.2.4 Free monad 13.2.5 GADT 13.2.6 Final tagless/mtl 13.2.7 Comparison of the approaches Summary 14 Business logic design 14.1 Command-line client application 14.1.1 API data model and HTTP schema 14.1.2 Command-line interaction 14.1.3 HTTP client functionality 14.2 Server application 14.2.1 Extended HTTP schema 14.2.2 Using the framework for business logic 14.2.3 Web server 14.2.4 Validation Summary 15 Testing 15.1 Testing in functional programming 15.1.1 Testing basics 15.1.2 Property-based testing 15.1.3 Property-based testing of a free monadic scenario 15.1.4 Integration testing 15.1.5 Acceptance testing 15.2 Advanced testing techniques 15.2.1 Testable architecture 15.2.2 Mocking with free monads 15.2.3 White-box unit testing 15.2.4 Testing framework 15.2.5 Testability of different approaches Summary Appendix A. Plenty of monads Appendix B. Stacking monads with monad transformers Appendix C. Word statistics example with monad transformers Appendix D. Automatic white-box testing index

قیمت نهایی

۴۹٬۰۰۰ تومان