ŷ

Jump to ratings and reviews
Rate this book

Composing Software

Rate this book
All software design is composition: the act of breaking complex problems down into smaller problems and composing those solutions. Most developers have a limited understanding of compositional techniques. It's time for that to change.

In "Composing Software", Eric Elliott shares the fundamentals of composition, including both function composition and object composition, and explores them in the context of JavaScript. The book covers the foundations of both functional programming and object oriented programming to help the reader better understand how to build and structure complex applications using simple building blocks.

You'll learn:

•Functional programming
•Object composition
•How to work with composite data structures
•Closures
•Higher order functions
•Functors (e.g., array.map)
•Monads (e.g., promises)
•Transducers
•Lenses

All of this in the context of JavaScript, the most used programming language in the world. But the learning doesn't stop at JavaScript. You'll be able to apply these lessons to any language. This book is about the timeless principles of software composition and its lessons will outlast the hot languages and frameworks of today. Unlike most programming books, this one may still be relevant 20 years from now.

This book began life as a popular blog post series that attracted hundreds of thousands of readers and influenced the way software is built at many high growth tech startups and fortune 500 companies.

229 pages, ebook

Published December 22, 2018

40 people are currently reading
329 people want to read

About the author

Eric Elliott

16books13followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
30 (21%)
4 stars
62 (44%)
3 stars
45 (32%)
2 stars
3 (2%)
1 star
0 (0%)
Displaying 1 - 20 of 20 reviews
Profile Image for Illia.
206 reviews4 followers
May 26, 2019
Very simple concepts explained in a very verbose and complicated manner.
Profile Image for Dongui Llaume.
10 reviews1 follower
November 3, 2020
El contingut és de 5 estrelles, el problema és que al ser una recopilació d'articles, l'estructura del llibre es a vegades repetitiva i poc ordenada.
4 reviews1 follower
March 20, 2020
In some other dimension, if I hadn't been exposed to functional programming (FP) in a non-strict fp language (read ES6) , this book would have been straight 5-star - I think it's a great introduction to functional programming in Javascript (at the very least), if you've never encountered the paradigm before. Otherwise, it feels like preaching to the choir. One thing I'd commend on though is that, unlike other FP-fundamentalists, Eric doesn't treat Object Oriented Paradigm with unnecessary disdain, he engages with it sufficiently before showing how a FP approach in javascript is ultimately more beneficial. The book also highlights TDD(Test-driven development) showing how an FP approach simplifies TDD. However, one of the weakest chapter has to be the Monads - it's as if Eric intended for to be merely a teaser rather than the entire serving. Overall, for Javascript developers, I'd recommend that you start with the book "Function Programming in Javascript" from Manning, get familiar with the key fp js libraries before engaging with this book. Cheers!
111 reviews6 followers
June 28, 2021
Дуже непогана книжка з поясненняями в рідному джаваскріпті. прояснив собі краще монади, функтори, трансдюсери та абстрактні типи данних загалом. Сподобались думки щодо потрібності деяких речей в JS (класи і інші спроби зробити мову схожою на інші "тру" ООП мови). Хотілось би більше структурованості і глибини - деякі розділи написані так шо здається от-от ти дійсно добре в'їдеш в тему і о-па починається наступний розділ зовсім про інше. При цьому я не впевнений, що підійде як вступ в ФП для чайників, по тій же причині - деколи перехід від простих речей до складних є дуже різкий.
а може це все не так, а я просто читав книжку з переривами. :)
Profile Image for Hưng Đặng.
128 reviews68 followers
May 4, 2022
T dừng đọc lúc � 67%. Pure function, functor, monad vẫn còn hiểu và thấy áp dụng. Đến map reduce là chịu vì khó. Curry function khá hay v� lý thuyết nhưng t chưa dùng thực s� thành thạo. Chắc có l� lúc nào có tình huống gặp s� tham khảo lại sách 1 lần nữa.
203 reviews
August 1, 2021
In terms of content its a mixed bag, maybe as a result of originating as a collection of blog posts:

The examples were kind of repetitive in many places and hard to follow when really needed to illustrate - mostly down to heavy use of nested "fat arrow" syntax.

Function and object composition and general software engineering principles were will done and some JS specifics like new rest/spread syntax.

But didn't think the hard stuff - Monads and particularly Kleisli composition - was at all well explained, at least I didn't come away having grokked the pattern and appreciating the underlying usefulness of adopting this approach. Building Lens from the ground up wasn't helpful either - would have preferred if the author had chosen to motivate examples with Ramdjs and deconstruct that.

For grokking functional programming with JS it is hard to beat Luis Atencio's book.

Book comes as a bound A4/Letter format - which is unusual for software engineering books - but the large print was easy on the eyes.
Profile Image for Ian.
94 reviews3 followers
December 14, 2022
When books contain dense, area-focused technical information, I take my time with them. That's what happened with this book. As a self-taught, software engineer, this book contained essential computer science terms and techniques re:ease of composing, functional software (mostly using JavaScript examples, so running the examples in the console log is prime time).

I leave you with some notes from the book, "some" because I started taking notes half-way through reading this book. Here are my notes:

Here is the link for the Medium article series that were used to write this book (open-source link):
Profile Image for Yannick Grenzinger.
57 reviews6 followers
February 2, 2021
I quickly read this book because I already learned about FP in my adventures around Haskell and during the read I had mixed feelings :)

The good parts:
- a gentle introduction to some important concepts of OOP and especialy FP (immutability, higher order function, currying... even functor, monad, lenses, transducers)
- the author has a good historical knowledge of OOP and FP which convey good perspective
- The "elements of style" chapter is gold when you know that naming and readability are ones of the hardest things in computer science

The bad parts:
- somewhat at some point the concepts are too much simplified
- I know that JS is a Scheme at its heart but its a language which tries to do a lot without much rigor and trying to explain paradigms and (difficult) concepts with it is sometimes very ankward (especially lenses).

Finally I think the best way is to learn on a real Typed FP language and then come back to JS with this knowledge. Maybe a more challenging journey but somewhat more robust ;)
16 reviews
May 2, 2021
A great book that doesn't just teach you Functional Programming (FP) in JavaScript, but rather teaches you Software Composition using FP. As Eric Elliot put it in the book:
You are always composing software. You just do it better when you know you are doing it.


The book explains FP step-by-step, taking you through a lot of examples, to help you understand the concept a lot better.

This book does not try to prove that FC is better than OOP, or any other programming paradigms, but rather teaches you FP in the hopes that you will be able to integrate it well with other programming paradigms to simplify your code.
Profile Image for Héctor Iván Patricio Moreno.
408 reviews21 followers
April 17, 2023
En realidad es una colección de blogposts sobre programación funcional abarcando diferentes temas:

- Funciones puras
- Composición de funciones
- Functores
- Monadas
- Lentes funcionales
- Transductores
- Testing y mocking

Por ser una colección de posts escritos independientemente, se repite bastante información básica, por lo que la experiencia del libro no es tan disfrutable.

En los temas difíciles me perdí bastante, creo que hicieron falta mejores ejemplos junto con explicaciones más sencillas. Lo recomiendo solamente si eres muy nuevo en la programación funcional, sin ponerle mucho empeño a los temas como functors, monads y transductors.
10 reviews
April 23, 2020
It's a very interesting book and I learned a lot about functional programming and his different philosophies. That being said, it's very easy to get confused by the examples. Maybe I'll read it again some day when my JavaScript are even more advanced, but I think it's a really good attempt at trying to explain those difficult functional programming concepts, but it's not for everyone.
Profile Image for Josh Farrant.
10 reviews
January 1, 2022
A bit repetitive in places, but there were a lot of interesting points to take away and think about. It helped solidify my thoughts on functional programming and composition specifically, and gave me an introduction to functors, monads, and transducers that I'm sure will help inform further learning on these topics.

I'm sure I'll be revisiting this book again in the future.
Profile Image for Ivan JIJON.
5 reviews
January 18, 2023
I agree with all the commenters on that it has a lot of repetition and it feels like a collage of many articles and blog posts (which it actually is).
Nevertheless it has been helpful in my learning and understanding of functional programming.
Profile Image for Marcos.
11 reviews2 followers
October 21, 2020
Not being a JavaScript developer, maybe I cannot really appreciate this book. I did find interesting te first, more general part, that talks about functional programming concepts.
5 reviews
December 30, 2021
A great introduction into functional programming concepts. I wished the examples were a bit more in-depth, but it was a great read nonetheless.
Profile Image for Evan.
67 reviews
November 30, 2022
Approachable, non-academic introduction to functional programming concepts.
46 reviews1 follower
June 5, 2023
This book starts really slow, but it picks up the pace in the end. Explaining more applicable ideas from functional programming to OOP engineers.
Displaying 1 - 20 of 20 reviews

Can't find what you're looking for?

Get help and learn more about the design.