Ibuildings has posted the fourth part of their "Programming Guidelines" series to their blog, sharing even more helpful hints and tips you can apply to your everyday development. In this new post author Matthias Noback talks about messaging in your application, not in output to the user but in the communication between parts of your system.
In the previous parts of this series we looked at how to get rid of complexity at the level of algorithms. After discussing the problem of nulls in your code, we looked at object lifecycles and how to encapsulate them properly. Now that we have objects that can be constructed and changed only in valid ways, we need to look at how they communicate with each other and how we can improve our code with regard to that aspect.
He then breaks up the rest of the article into a few sections:
- Object communication
- Message categories
- Command/Query Separation Principle
- Implementing commands
- Command query responsibility segregation
For each section a description of the topic is provided and a bit of sample code is included to help illustrate the change/functionality.