Messaging as a Programming Model
This book is 100% complete
Completed on 2016-06-01
About the Book
Have you ever heard, objects are communicating by messages? If so, what does that mean? And what relevancy does this particular kind of communication have for your day-to-day coding practice?
I had heard this a long time ago - and never have been able to make sense of it. But why bother? Just calling functions on objects gets the job done, doesn't it. That's how I programmed until a couple of years ago, at least. However my dismay was growing every day. I found it hard to derive classes/objects from requirements. And despite all my best OO-intentions peppered with Clean Code principles my code was hard to read.
So I started to think about whether this was all my fault, and how to try harder to become a good OO-programmer. But then I realized: This wasn't just my problem. Almost every developer I met suffered from the same symptoms. So maybe the true cause of this wasn't our collective dumbness. Maybe the true cause lay in the paradigm.
And that's what I'm believing today. Mainstream object-orientation is more of a problem than a solution, because it's lacking an essential, no, the essential aspect of object-orientation how its inventor Alan Kay meant it to be. This essential aspect is messaging. Yes, the way of how objects are communicating makes a big difference. And glossing this over by just saying "it's like calling a function" has done great harm.
In this little book I´m trying to show you what I think, messaging means and how object-orientation was intended to be. Fear not, I won't try to convince you to switch your language or platform. If you're happy with Java or Ruby or C#, you can continue using it. But how you're using an OO-language's features will change. Hopefully ;-) And doing "OOP as if you meant it" will be easier with some languages than with others.
I'd be happy if you gave messaging a second chance. I'm sure you'll reap benefits from putting it back into the center of your object-oriented programming practice. Your code will become easier to write, read, and change, since it will more closely resemble the requirements and your solution strategy.
[The content of this book is taken from a couple of blog posts. I´ve converted into a Leanpub book for your reading convenience and as a learning experience for myself. I wanted to explore how self-publishing works using the Leanpub platform.]
Messaging as a programming model – Let´s get real
- My Definition of Messaging
- Implementing Messaging
Flows – Visualizing the Messaging Programming Model
- A Simple Visual Notation
- More Flexibility with Functional Units in Flows
Messaging for More Decoupling
- The Principle of Mutual Oblivion
- Refining the Definition Of Messaging
Nested Messaging - Flows on Different Levels of Abstraction
- The Integration Operation Segregation Principle
- Generic Implementation of Flows
- Bus or Flow? - Messaging done one way or the other
Focus on the flow with messaging
- Outside-in design I - User dialog
- Outside-in design II - Interaction flow
- Outside-in design III - Stepwise refinement
- What about objects?
- About the Author
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.