
- 360 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Functional Reactive Programming
About this book
Summary Functional Reactive Programming teaches the concepts and applications of FRP. It offers a careful walk-through of core FRP operations and introduces the concepts and techniques you'll need to use FRP in any language.Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology Today's software is shifting to more asynchronous, event-based solutions. For decades, the Observer pattern has been the go-to event infrastructure, but it is known to be bug-prone. Functional reactive programming (FRP) replaces Observer, radically improving the quality of event-based code. About the Book Functional Reactive Programming teaches you how FRP works and how to use it. You'll begin by gaining an understanding of what FRP is and why it's so powerful. Then, you'll work through greenfield and legacy code as you learn to apply FRP to practical use cases. You'll find examples in this book from many application domains using both Java and JavaScript. When you're finished, you'll be able to use the FRP approach in the systems you build and spend less time fixing problems. What's Inside
- Think differently about data and events
- FRP techniques for Java and JavaScript
- Eliminate Observer one listener at a time
- Explore Sodium, RxJS, and Kefir.js FRP systems
About the Reader Readers need intermediate Java or JavaScript skills. No experience with functional programming or FRP required. About the Authors Stephen Blackheath and Anthony Jones are experienced software developers and the creators of the Sodium FRP library for multiple languages. Foreword by Heinrich Apfelmus. Illustrated by Duncan Hill. Table of Contents
- Stop listening!
- Core FRP
- Some everyday widget stuff
- Writing a real application
- New concepts
- FRP on the web
- Switch
- Operational primitives
- Continuous time
- Battle of the paradigms
- Programming in the real world
- Helpers and patterns
- Refactoring
- Adding FRP to existing projects
- Future directions
Tools to learn more effectively

Saving Books

Keyword Search

Annotating Text

Listen to it instead
Information
Chapter 1. Stop listening!
- What FRP is
- What events are, and how they cause trouble
- What FRP is for: the problem weāre trying to solve
- The benefits of FRP
- How an FRP system works
- A different way of thinking that underlies FRP
1.1. Project, meet complexity wall
- Itās shelved.
- Itās rewritten from scratch, and a million dollars later, it hits the same wall again.
- The company staffs up. As the team expands, its productivity shambles off into the realm of the eternal quagmire. (Often the company has been acquired around this time.)
- It undergoes major refactoring, leading eventually to maintainable code.
1.2. What is functional reactive programming?
- Itās a replacement for the widely used observer pattern, also known as listeners or callbacks.
- Itās a composable, modular way to code event-driven logic.
- Itās a different way of thinking: the program is expressed as a reaction to its inputs, or as a flow of data.
- It brings order to the management of program state.
- Itās something fundamental: we think that anyone who tries to solve the problems in the observer pattern will eventually invent FRP.
- Itās normally implemented as a lightweight software library in a standard programming language.
- It can be seen as a complete embedded language for stateful logic.
1.2.1. A stricter definition
Iām glad youāre starting by asking about a specification rather than implementation first. There are a lot of ideas floating around about what FRP is. For me itās always been two things: (a) denotative and (b) temporally continuous. Many folks drop both of these properties and identify FRP with various implementation notions, all of which are beside the point in my perspective.By ādenotative,ā I mean founded on a precise, simple, implementation-independent, compositional semantics that exactly specifies the meaning of each type and building block. The compositional nature of the semantics then determines the meaning of all type-correct combinations of the building blocks.
Definition
Table of contents
- Copyright
- Brief Table of Contents
- Table of Contents
- Foreword
- Preface
- Acknowledgments
- About this Book
- About the Cover
- Chapter 1. Stop listening!
- Chapter 2. Core FRP
- Chapter 3. Some everyday widget stuff
- Chapter 4. Writing a real application
- Chapter 5. New concepts
- Chapter 6. FRP on the web
- Chapter 7. Switch
- Chapter 8. Operational primitives
- Chapter 9. Continuous time
- Chapter 10. Battle of the paradigms
- Chapter 11. Programming in the real world
- Chapter 12. Helpers and patterns
- Chapter 13. Refactoring
- Chapter 14. Adding FRP to existing projects
- Chapter 15. Future directions
- Appendix A. Sodium API
- Appendix B. The six plagues of event handling
- Appendix C. Comparison of FRP systems
- Appendix D. A section for managers
- Appendix E. Denotational semantics of Sodium
- Index
- List of Figures
- List of Tables
- List of Listings
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app