Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ibuildings Blog:
Programming Guidelines - Part 4: Messages
Feb 17, 2016 @ 17:19:17

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
  • Queries
  • Documents
  • Command query responsibility segregation
  • Events

For each section a description of the topic is provided and a bit of sample code is included to help illustrate the change/functionality.

tagged: programming guideline part4 series message object tutorial

Link: https://www.ibuildings.nl/blog/2016/02/programming-guidelines-part-4-messages


Trending Topics: