Visiting Lisbon for SymfonyCon 2018
Last week we have been attending this year's SymfonyCon in Lisbon. It was a great event with the main room being a parking garage! Sounds quite bad, but actually they were preparing the room very well as you can see in the following tweet:
Apart from the conference we had an awesome time in Lisbon. I can totally recommend to visit it and enjoy the nice views over the Lisbon hills as well as their awesome cuisine.
About local development servers, workflows, messaging, distributed applications, ...
After a very warm welcome the conference started with the keynote held by Fabien Potencier, creator of Symfony. After presenting the new Symfony Mailer component at the SymfonyLive in London he continued his "Back to the basic" series with a local development server. It is incredible how well it integrates with the Symfony Cloud, makeing fixing bugs using the data from the production environment a breeze. And the best improvment in general is that the delivered Symfony binary allows to use the console with the same environment variables as the webserver. That's something that was always a hassle if running many applications on the same machine, as that usually means you have to put these environment variables in your vhost configuration making it impossible to reuse it in the console.
Next were two intersting talks about the Symfony Workflow component and one about Flysystem. The latter would have been interesting because we are currently integrating a feature in our MediaBundle to store data on different cloud storages. But I chose to see the talk about the workflow component which would be an awesome fit for our drafting functionality (which we already knew before). A valuable lesson taught by Tobias Nyholm was how to find less obvious use cases for the workflow component. He also mentioned that there is almost no need for him defining his own events because he can reuse the ones emitted by the Workflow component, with the big advantage that he knows it is guaranteed that an impossible state is not reached.
The next talk I have seen was about the Symfony Messenger component. It is a new component in Symfony which is still experimental, meaning it will still change quite a lot. It allows to decouple code by using messages which can be reused as well in commands as in controllers. We are already experimenting with this component in some projects to gain some experiences with it. I can imagine that we'll also be using it in one of the future versions of Sulu. But not before it loses its experimental status and we do another major release. So, that might take a while.
The first talk in the afternoon was about static code analysis in PHP, a super interesting topic. Since I've already made good experiences with flow in our new frontend stack I am a big fan of static code analyzing in general. It helps to avoid errors quite early and shows them to you before they even occur during runtime. I have already started a PR to integrate PHPStan before that talk but it motivated me to continue working on it at the Hackday on Saturday.
The composer creator Jordi gave us an insight about how to build web applications with multi region hosting. He was showing us two use cases. The first one was packagist, the backend for composer which we are almost using every single day. He was also explaining the tradeoffs he choose to not waste too much time on tiny issues which didn't bother any user at all. The second more elaborated use case was the Teamup calendar. The most important takeaway here was that 200ms for a network request doesn't feel too bad, but if that is caused primarily by latency this adds up with every single access of a remote service like a database query. Therefore it really makes sense to put some energy into this, if you are delivering for a geographically distributed audience.
The final talk of the first day was from Denis Brumann, explaining some patterns behind Doctrine like the IdentityMap and the Unit of Work. It was a talk totally worth watching because I think that it is always good to know at least some of the internals of the libraries you are using every day, since that makes debugging stuff a lot easier.
... and micro services, security, event sourcing, E2E tests, ...
The second keynote was about building a micro service architecture and all the stuff that could go wrong while doing it. So maybe the most important thing about microservices was already said by Anthony Ferrara already over a year ago in one of his tweets:
My suggestion: unless you have a 5+ person ops team, & at least 3 devs focused only on developer tooling & automation: avoid microservices.— Anthony Ferrara (@ircmaxell) 15. September 2017
The first talk after the second day's keynote was about Symfony security which was pretty basic. But it was nice to take a step back and see if the knowledge you have gained in the last few years is still applicable, or if you should think more about relearning stuff.
Event sourcing is a hot topic in the PHP community since quite some time now, so there had to be another talk about it. To make it even more interesting Tim Huijzers chose a very special domain: Beer! It was a very solid presentation of all the event sourcing principles and that this kind of system holds a lot more information than a norm CRUD application, which at some times can be really useful. However, it also comes with a lot of boilerplate code which might lead to a harder to maintain system.
The afternoon program started for me with explanations by Nicolas Grekas about how a typical Symfony 4.2 application looks like. It was showing all the awesome new features introduced in Symfony 4. I especially like the autoconfigure and autowiring part because it allows to reduce a lot of the service configurations and therefore eliminate the need to touch multiple files if dependencies are changed quite often.
The last talk of the conference was about building a web application with VueJS and automatically test it using a real browser with Symfony Panther by Kevin Dunglas, famous for his API Platform library. Sadly the most interesting part of this talk for us - Symfony Panther - was quite short. Since we build Sulu 2.0 using React - and not VueJS - this part would have been really interesting for us, because we still have not decided on what kind of setup we want to use for E2E tests.
... and last but not least some side activities!
The conference also included a social event that allowed us to meet old firends and make new ones.
There were also quite large breaks between the talks, makeing it nice to meet new contacts as well.
Apart from that we used the Hackday to work on Symfony specific matters in Sulu. That included integrations of other bundles and libraries like FOSHttpCache and PHPStan or simply trying to make Sulu compatible to PHP 7.3, which was released last weekend as well. The Hackday is also another great opportunity to socialize and meet other people. It was great to see some of them have an interest in Sulu as well.
All in all a Symfony conference is always a great experience and I hope to see some of you in the next year's edition in Amsterdam as well :-)