PHP Forum in Paris
Published on
Dec 4, 2015
Last week, Adrien, Olivier, Jeremy and me went to the PHP Forum that was held in Paris. There was a lot of great conferences about PHP and his ecosystem : Magento (damn), PrestaShop (damn²), and Wordpress (~ damn).
Behat Conference
After the classic opening talk, I directly went to the Behat Conference. Samuel Roze was presenting this conference. It was really interesting. Nowdays, in most PHP applications that are using Behat as a testing tool, we often encouter that kind of problem :
Scenario: New user should see the tutorial
Given I am an anonymous user
And I am on "/inscription"
When I fill in the registration field:
| mr\_app\_registration\_gender | label\_male |
| mr\_app\_registration\_firstName | Gege |
| mr\_app\_registration\_lastName | De La vega |
| mr\_app\_registration\_email | gege@vega.com |
| mr\_app\_registration\_plainPassword | gegegege |
| mr\_app\_registration\_postalCode | 38000 GRENOBLE |
And I press "button\_submit"
Then the url should match "/completer-profil/etape-1"
And I press "label\_button\_next"
Then the url should match "/completer-profil/etape-2"
And I follow "label\_link\_end"
Then I should be on "/"
And the response should contain "label\_close\_tutorial"
Then I am on "/dans-mon-quartier"
And the response should not contain "label\_close\_tutorial"
As you can see, it's not really the purpose of a feature. Most of all, an Product Owner is not able to produce that kind of scenario, because we're putting a lot of UI logic in it.
So Samuel has helped us to understand how we can build proper Behat scenarios (~ 4 lines) that do the job, and leave the implementation in the steps of the context.
You can find his slide at the following address : http://fr.slideshare.net/samuelroze/behat-cest-plus-que-a-behat-is-more-than-that
Flows Conference
Next, we went to a conference of Pascal Martin talking about flows :
Lot of interesting points regarding the diversity of handlers that are available for our everyday work, for example : ftp://, php://, file://, ...
One interesting point was regarding the flow context that helps us to be more productive when working with handlers (http://php.net/context).
Next, Pascal Martin shows us how we can build a chat application with PHP only, by using stream_socket (reactphp and icicle).
Here's the slide : http://blog.pascal-martin.fr/public/slides-flux-forum-php-2015/ (sorry for the english people, but you will understand too) :)
SCRUM Conference
We went to the SCRUM conference that was more like a feedback of how Evaneos changes his way of putting features in their website.
They have talked about the main problem they encountered with SCRUM : at the end of the "classic workflow", developers do not have a word to say regarding the features that they will have to implement.
So Evaneos tried something : breaking that workflow and put the developers directly in the workflow of features decision/priorization.
After encoutering a lot of problems (organization tools, workflow, etc ..), it's seems that all the people at Evaneos seems happy with it : they are a part of the company, and they can directly change the company from the inside. The perfect example of how the intrapreneurship can make people more happy at work.
Meetic and his event architecture
We have seen next a Conference regarding its internal architecture of how they handle events (like RabbitMQ stuff for example).
Put ValueObject in your model
Damien Alexandre started his talk with a reminder about DDD. We have to consider the DDD approach, not like a methodology but like group of best practices, a way of thinking between each project's members.
One of the benefits of using Value Objects is the enrichment of the Ubiquitous Language of your Domain.
The ValueObject is a simple object, immutable, that measures, describes and quantifies. There is no id, the identity is based on its content.
Moreover, in PHP, keep your object immutable is not an easy task. So stay calm and just define some coding standards with the team ;)
Finally he gave some tips to integrate the VO with Doctrine :
-
Embeddable But both have their limits so we will have to deal with it.
You can see the slides here.
Be specific? A clear business and clean code with RulerZ
Kevin Gomez introduced RulerZ. This tool try to answer question : "how do you keep your Doctrine repositories from growing exponentially ?".
Based on the Specification pattern, RulerZ abstracts and simplifies the way we write and compose queries. And the best part is that it works with Doctrine but also with any other data-source.
You can check an introduction with his post.
Comments