SensioLabs speakers at the SymfonyLive Online French Edition

The SymfonyLive Online French Edition 2021 happened on April 9th in a new online format. Two SensioLabs developers, Laurent Voullemier and Guillaume Loulier, were speakers. They tell us about their talks and their experience.

SensioLabs team talks at the SymfonyLive Online

On April 9th, two SensioLabs developers shared their technical expertise at the SymfonyLive Online French Edition 2021. We had Guillaume Loulier speaking about “Cypress, the modern E2E must still learn from the past.” And Laurent Voullemier on ” Deep dive into the form component.” Let’s have a quick look at their presentations.

Guillaume Loulier: “Cypress, the modern E2E must still learn from the past.”

Guillaume talked about Cypress, a framework becoming increasingly popular. His talk started with a presentation of Cypress, an E2E-oriented framework available via Yam NPM and Docker. Cypress offers a familiar, simple, and intuitive syntax with shortcuts to speed up the writing process.
Then, he compared Cypress to its competitors such as Behat or Panther. The framework does not offer a bridge/bundle with Symfony for the moment and no support for Selenium compared to Panther.
Then, Guillaume presented the pitfalls to avoid. For example, despite its apparent simplicity, Cypress can not simplify all tests. Debugging errors is not always easy. He also discussed the pros and cons of Cypress: how to use it daily to prevent mistakes of the past. Finally, Guillaume gave us his advice on how to use Cypress, and his recommendations about this framework:

His advice:

  • Writing tests outside the application makes them more resilient and scalable.
  • Cross-browser testing should become the norm.
  • Like Symfony, Cypress could offer native extensions for current frameworks/libraries.

In which cases does he recommend this framework?

  • To produce resilient tests, which are fast and adapted to the latest front-end evolutions.
  • If you want to handle multiple browsers, network requests and the latest client-side developments.
  • If you are not afraid of JS, to maintain your tests and optimize your CI.

Laurent Voullemier: “Deep dive into the Form component”

Laurent talked about the Form component in his talk, especially what happens when you submit a request dealing with a form. His talk started with the creation of a form. Then he zoomed into the FormFactory class and its six methods that all instantiate a form. He also focused on the ResolvedFormType, which encapsulates the inheritance logic in the Form component.

Then, he addressed the initialization of the form data and its submission. At this stage, the phenomenon of recursion is omnipresent: the component is based on the composite pattern. Laurent went on to discuss two essential mechanisms for form submission: DataTransformer and DataMapper. These two associated concepts can transform a data model object into a displayable representation in the shape of an HTML form.

To conclude his talk, Laurent presented two other concepts of the component. These are the extensions to add complete functionality to the component (validation, CSRF security…) and the Guessers to guess the type of a form field from the metadata (Doctrine, validation, or other) of the object it represents.

Mathias Arlaud: ” An adapted serialization with API Platform “

Mathias is a recent SensioLabs Alumni. He presented at SymfonyLive Online a talk about API Platform. API Platform is a REST/GraphQL framework based on Symfony. API Platform works with the serialization/deserialization process, i.e. the process of transforming objects into a persistent format and vice versa.

Mathias explained to us that there is a heavy dependency between API Platform and Symfony’s Serializer components. Thanks to it, we benefit from a multitude of technical solutions to serialize an object. Many tools such as DataTransformers or DTP can meet specific needs. Some of them can be less complex while others are more powerful. However, how to choose a technical solution matching our needs? Some of the solutions have been presented to us during this talk. But also three levers in API Platform to boost serialization:

  • The ContextBuilder: when serialization depends on a state and/or a Request.
  • The Resource Metadata Factory: when serialization only depends on the resource independently from its values.
  • Serializer and/or DTO: acting here directly on data to serialize and not on its groups.

Finally, Mathias presented the new features of API Platform version 2.6 released at the end of 2020.

A successful first speaker experience at the SymfonyLive Online

For both Laurent and Guillaume, speaking at a SymfonyLive conference was a first-time experience! Besides, with the switch to SymfonyLive Online, the format of the talks has evolved this year. To prevent technical issues, all talks are pre-recorded beforehand and then streamed during the conference. Speakers answer questions in the chat room while the recording is playing. They then discuss for a few minutes live with the participants at the end of their speech. For more details about the SymfonyLive Online French Edition 2021, please read our blog post at this link.

Guillaume and Laurent have been selected among several developers on their choice of topics. They should interest the Symfony developer community. Laurent decided to focus on the Form component because we often see it as a black box. “I studied it to prepare the certification, and it inspired me to dive into it.” Guillaume chose to talk about Cypress, a framework he had already used for a project at SensioLabs.

Guillaume and Laurent’s talks went very well. The stress level decreased with the ability to pre-record and redo new shots. It is not the same experience as speaking in public on a stage. But this new format requires a lot of preparation time to perform several attempts and perfect your subtitles.

This double premiere was a success for both Guillaume and Laurent. They both appreciated the opportunity to speak at the SymfonyLive. They are ready to repeat the experience. This time may be at a physical event!

Tips for presenting a talk at a SymfonyLive Online conference:

Laurent: “I would say: close your eyes and jump. Stress is natural, even for the most experienced speakers. Our challenge is to successfully manage it, so it doesn’t show”.

Guillaume: “I think that the hardest part is to start and propose an idea for a talk. You have to be able to synthesize and sell your talk in the Call for papers with a good summary of your topic.”

A big thank you to Laurent and Guillaume for their stories and their helpful advice. And congratulations to them and to Mathias for their excellent talks 👏 We hope to see you soon at the next Symfony conference!

And remember that you can replay all the conferences you missed on with your voucher.