In a new post to his site Nikola Posa takes a look at naming conventions in code and makes some recommendations based on his own work.
In the last couple of months, I spent a lot of time studying Proophessor Do demo project that showcases features of Prooph components, all with the aim of mastering CQRS/Event Sourcing concepts. Along the way, something else turned my attention away from the main topic - unconventional, but clean and concise naming convention for class and method names.
This was a true eye-opener for me, I immediately liked the idea and after adapting it a bit I started practicing it at work. Excited and full of enthusiasm, I shared my findings and opinions with the rest of the world.
- Anti-pattern 1: Prefixes/suffixes convention for Interfaces
- Anti-pattern 2: Archetype suffix convention for domain classes
- Anti-pattern 3: "get" prefix convention for property accessors
He finishes the post with some final thoughts and a "TL;DR" image showing a "right" and "wrong" way to structure your code.