On June 7, 8, and 9, the Dutch PHP Conference 2018 was held. Now that all information has settled down, and most talks are available on YouTube, I want to share the talks I liked the most.
Knowing your state machines
Speaker: Tobias Nyholm.
Links: YouTube or SlideShare.
State machines are great at... well, at keeping state. This is a very common task in applications.
Take for example a publishing flow for a blog. An article can have the following states:
- in review
And states have connections to other states:
- draft -> in review
- in review -> rejected
- in review -> published
- rejected -> in review
These connections make up an important part of the business logic of the application. State machines allow you to denote this logic in a very clean way.
Symfony's workflow component makes it easy to work with state machines and related models. There is also a bridge called laravel-workflow to use the component in Laravel projects
Speaker: Pim Elshof.
Links: YouTube or Slide Deck.
Pim gave a quick primer on Domain Driven Design (DDD). Although it is probably safe to say it as much about OOP as it is about DDD.
The key takeaway for me was the following strategy: make the invalid inexpressible. One of the ways this can be done is by using Value Objects, Entities and Services: some of the building blocks of DDD.
Then Pim goes on to define a set of simple steps to clean up code:
- Implement in Entity
- Extract a Value Object
- Refactor Value Object
All aboard the Service Bus
Speaker: Robert Basic.
Links: YouTube or Speaker Deck.
In this talk, Robert introduces the service bus and how it allows one to give structure to your application. Three difference buses are discussed:
- The command bus
- The event bus
- The query bus
Then the basic differences between commands and events are explained. Unfortunately, Robert doesn't really go into detail about the query bus.
Together these buses may be used to follow the Command Query Responsibility Separation (CQRS) pattern. Although I've read that it is best to be cautious about applying CQRS, it really got me thinking about separation of concerns and application structure in general.
The last thing I wanted to mention is the conference social. Beforehand I wasn't too sure if this was for me since I didn't know any other attendees. Luckily I did visit the social and it turned out to be really nice.
That is also why I want to give a shout-out to Ian, Tom and Dave from Bristol (UK). They were great company and I thoroughly enjoyed speaking to some like-minded developers and hear they have basically the same drives, hopes, and fears.
Lastly, I wanted to thank the organizers, staff and fellow attendees that made the conference a great event to attend!