<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Les-Tilleuls.coop on Medium]]></title>
        <description><![CDATA[Stories by Les-Tilleuls.coop on Medium]]></description>
        <link>https://medium.com/@coopTilleuls?source=rss-ae3c3fd0683f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JJZsd1YuySI17OsRQoKzrQ.png</url>
            <title>Stories by Les-Tilleuls.coop on Medium</title>
            <link>https://medium.com/@coopTilleuls?source=rss-ae3c3fd0683f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 21:41:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@coopTilleuls/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Covid-19: supporting our employees and community]]></title>
            <link>https://medium.com/@coopTilleuls/covid-19-supporting-our-employees-and-community-19a95a9a3079?source=rss-ae3c3fd0683f------2</link>
            <guid isPermaLink="false">https://medium.com/p/19a95a9a3079</guid>
            <category><![CDATA[health]]></category>
            <category><![CDATA[remote-working]]></category>
            <category><![CDATA[epidemia]]></category>
            <category><![CDATA[virality]]></category>
            <dc:creator><![CDATA[Les-Tilleuls.coop]]></dc:creator>
            <pubDate>Mon, 16 Mar 2020 17:00:31 GMT</pubDate>
            <atom:updated>2020-03-16T17:01:26.659Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@tomaspueyo/coronavirus-act-today-or-people-will-die-f4d3d9cd99ca?source=---------2------------------">Social distancing is one of the most effective measures to stop the spread of the pandemic</a>. To protect our community, our workers and our customers, we have decided to close our offices and that we’ll all work from home until further notice. <a href="https://stayinghome.club/companies.html"><strong>Our entire team remains available by email and video</strong></a>. Discover the adjustments that we have implemented:</p><h3>Web Development</h3><p>Nothing changes at this level, our team specialized in development and consulting around PHP (<a href="https://api-platform.com/">API Platform</a>, Symfony, Sylius …), JavaScript (React, Vue.js) and Cloud (Docker, Kubernetes, AWS)<a href="https://les-tilleuls.coop/en"> remains available and supports you in the maintaining of your applications</a>.</p><h3>Training sessions</h3><p><strong>Our training courses planned for the next few weeks are maintained and will be given by video conference</strong>. Do you need support or improvement in PHP, JavaScript or DevOps tools? <a href="https://masterclass.les-tilleuls.coop/en">Check our website</a>, a new training session about <strong>Sylius</strong> is now available!</p><h3>Events</h3><p>We had to postpone our planned events in Paris, Lille and Lyon. We are currently in the process of thinking about broadcasting our next meetup live on <a href="https://www.youtube.com/channel/UCGP6SKfBAQDlEO2QZXPb_Ew">YouTube</a>. If you do not want to miss our updates on this subject, go to the <a href="https://api-platform.com/community/events/">Community page of API Platform</a> and the meetup pages that we own: <a href="https://www.meetup.com/fr-FR/AperoCode-by-Les-Tilleuls-coop/">ApéroCode</a> and <a href="https://www.meetup.com/fr-FR/api-platform/">API Platform meetup</a>.</p><p>A question, a project you want to share? <a href="https://les-tilleuls.coop/en/contact">Contact us</a> and stay safe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A4GGrF6I9hVqMva6BJvj-A.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19a95a9a3079" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Celebrate Hacktoberfest with API Platform!]]></title>
            <link>https://medium.com/@coopTilleuls/celebrate-hacktoberfest-with-api-platform-9ce924c706d4?source=rss-ae3c3fd0683f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ce924c706d4</guid>
            <category><![CDATA[api-platform]]></category>
            <category><![CDATA[hacktoberfest]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Les-Tilleuls.coop]]></dc:creator>
            <pubDate>Wed, 02 Oct 2019 07:38:33 GMT</pubDate>
            <atom:updated>2019-10-02T07:38:33.590Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://api-platform.com/">API Platform</a> is a popular web framework providing server and client components for building and consuming REST (JSON-LD, Hydra, JSON:API…) and GraphQL APIs. On the occasion of Hacktoberfest, we would like to thank all our contributors by giving them a free API Platform Contributor t-shirt. <strong>To win a t-shirt, make 3 pull requests on API Platform’s GitHub repositories by October 31st, and </strong><a href="https://cooptilleuls.typeform.com/to/CG0pLd"><strong>then fill in this form</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*A9prRgizDb3DFPeG" /></figure><p>Notes:</p><ul><li><strong>Pull requests have to be approved by the API Platform Core Team</strong>. As long as they’ve been opened between October 1 and October 31, they count toward a free t-shirt.</li><li><strong>All contributions are welcome</strong> including small improvements to our documentation.</li><li>Looking for easy picks to earn a t-shirt? <strong>Some issues are already tagged</strong> on <a href="https://github.com/api-platform/core/issues?q=is%3Aissue+is%3Aopen+label%3AHacktoberfest">API Platform core (PHP)</a>, <a href="https://github.com/api-platform/client-generator/issues?q=is%3Aissue+is%3Aopen+label%3AHacktoberfest">Client Generator</a>, <a href="https://github.com/api-platform/docs/issues?q=is%3Aissue+is%3Aopen+label%3AHacktoberfest">Docs</a> or in the <a href="https://github.com/api-platform/api-platform/issues?q=is%3Aissue+is%3Aopen+label%3AHacktoberfest">Distribution</a>!</li></ul><p>Hacktoberfest is a month-long celebration organized by DigitalOcean (in partnership with Dev) to promote Open Source collaboration and contributions. Check out <a href="https://hacktoberfest.digitalocean.com/">Hacktoberfest’s website</a>.</p><p><em>Originally published at </em><a href="https://les-tilleuls.coop/fr/blog/article/celebrate-hacktoberfest-with-api-platform"><em>https://les-tilleuls.coop</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ce924c706d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Typical Day at Les-Tilleuls.coop: Collective Contribution to Free Software]]></title>
            <link>https://medium.com/@coopTilleuls/a-typical-day-at-les-tilleuls-coop-collective-contribution-to-free-software-5226316f02d4?source=rss-ae3c3fd0683f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5226316f02d4</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[api-platform]]></category>
            <category><![CDATA[free-software]]></category>
            <category><![CDATA[community]]></category>
            <category><![CDATA[contribution]]></category>
            <dc:creator><![CDATA[Les-Tilleuls.coop]]></dc:creator>
            <pubDate>Thu, 05 Sep 2019 14:33:33 GMT</pubDate>
            <atom:updated>2019-09-05T14:33:33.394Z</atom:updated>
            <content:encoded><![CDATA[<p>For some time now, we have been setting up a new routine in our company: <strong>every two months, the whole team comes together for a whole day dedicated to contributing to the Free Software tools that we use or </strong><a href="https://api-platform.com/"><strong>develop</strong></a>.</p><p>This new initiative complements the time already allocated to some of our co-workers to maintain some of the projects which allow our organization to thrive. The issue of the sustainability and maintenance of <a href="https://www.gnu.org/philosophy/free-sw.en.html">Free Software</a> — which is the foundation of the information society — is a complex one, and a subject of public interest to which few effective solutions have yet been found.</p><p>By dedicating time for our developers to work on these projects, our cooperative is trying to improve the situation, and in return contribute to <a href="https://techcrunch.com/2018/06/23/open-source-sustainability/">the tools</a> created and maintained free of charge by developers around the world. <strong>It is also a good opportunity for our team to improve their skills</strong> and discover new technologies.</p><p>A couple of days ago, <strong>about 20 of our co-workers gathered to address security issues, fix bugs, review patches proposed by the community and add new features to various Free Software projects that we like</strong>.</p><h3>Les-Tilleuls.coop on Twitter</h3><p>🇬🇧 Yesterday was pretty productive for our team who dedicated time to #OSS with PR or issue openings on @ApiPlatform, @symfony or #ReactAdmin. Stay tuned for the results!</p><p>The day started with the formation of the working groups:</p><ul><li>The API Platform working group has been busy releasing <a href="https://twitter.com/dunglas/status/1163721364194365440">API Platform 2.4.6</a> and working on <strong>the upcoming release of API Platform 2.5 beta</strong>;</li><li>The team working on React Admin focused on finalizing a brand new version of <strong>the integration between API Platform and this component</strong> (realized in collaboration with <a href="https://marmelab.com/fr/">Marmelab</a>) which will greatly improve its ease of use and customization;</li><li>The team working on Symfony focused on <strong>fixing bugs</strong>.</li></ul><h3>An overview of our work:</h3><ul><li>The API Platform team has finalized the addition of <a href="https://github.com/api-platform/core/pull/2983">a major new feature that will arrive in API Platform 2.5</a>: support for generating the input/output JSON Schema for different hypermedia formats (e.g. Hydra) for the operations on a resource. This allows the dynamically generated Swagger / OpenAPI documentation to reflect the specificities of each format;</li><li>Using this new infrastructure, <a href="https://github.com/api-platform/core/pull/2996">Jacques Lefebvre added a command to export the JSON Schema for a resource</a>;</li><li>Quentin Barloy <a href="https://github.com/api-platform/core/pull/2990">fixed a bug</a> affecting API Platform when a data provider returns a generator, and also improved <a href="https://github.com/api-platform/docs/pull/858">the documentation</a> about this feature. He also added <a href="https://github.com/api-platform/core/pull/2995">unit tests</a> covering the brand new JSON Schema generator;</li><li>Kevin Van Der Stracten made <a href="https://github.com/api-platform/core/pull/2994">his first bug fix on API Platform</a>, with the help of Antoine Bluchet;</li><li>Gregory Copin <a href="https://github.com/api-platform/client-generator/pull/145">has adapted the NextJS application</a> generator provided with API Platform to use the new version of the popular JavaScript framework;</li><li>Mathieu Dewet, in collaboration with Robin Chalas, <a href="https://github.com/symfony/symfony/pull/33246">fixed the implementation of the LdapUserProvider::refreshUser method</a>, and fixed some other problems in Symfony;</li><li>Vincent Chalamon has drastically improved <a href="https://github.com/api-platform/core/pull/2992">the security and ease of use of the access control mechanism provided with API Platform</a>;</li><li>Grégoire Hébert has added a <a href="https://github.com/api-platform/core/pull/2998">new feature to API Platform</a> allowing to control the available versions of OpenAPI documentation;</li><li>Jean-François Thuillier and Morgan Auchedé <a href="https://github.com/coopTilleuls/admin/pull/14">finalized</a> the new version of API Platform Admin and started <a href="https://github.com/coopTilleuls/docs/pull/1">writing documentation</a>.</li></ul><p>The results of the day:</p><ul><li><strong>13 PRs were merged</strong></li><li><strong>2 issues have been opened</strong> and other topics are under consideration.</li></ul><p>In our company, we encourage and support our colleagues –even the less experienced or the shy ones– to contribute to the software they use.</p><p>The Free Software community is based on knowledge sharing, collaboration and exchange. <strong>Each contribution, regardless of its size, is beneficial and has a lasting effect on the ecosystem</strong>. Hesitance and self-doubt may arise, linked to the fear of not feeling legitimate to contribute but we must keep in mind that we are fortunate to have access to a large community of contributors acting for the continuous improvement and reliability of the software we use. Supporting them in this improvement is the best way to thank them for all the time they have already put into this process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gAjDYexjlEIs-HCtphKprw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5226316f02d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Comment s’organise la démocratie au sein d’une scop ?]]></title>
            <link>https://medium.com/@coopTilleuls/comment-sorganise-la-d%C3%A9mocratie-au-sein-d-une-scop-5fc89b816c2b?source=rss-ae3c3fd0683f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fc89b816c2b</guid>
            <category><![CDATA[management]]></category>
            <category><![CDATA[democratie]]></category>
            <category><![CDATA[elections]]></category>
            <dc:creator><![CDATA[Les-Tilleuls.coop]]></dc:creator>
            <pubDate>Tue, 23 Jul 2019 14:27:01 GMT</pubDate>
            <atom:updated>2019-07-23T14:27:01.377Z</atom:updated>
            <content:encoded><![CDATA[<h3>Comment s’organise la démocratie au sein d’une scop ?</h3><p><strong>Démocratie</strong> : n.f., régime politique dans lequel le peuple a le pouvoir… du moins en théorie.</p><p>De nos jours, le système démocratique est très critiqué, de part l’utilisation qu’en ont faite les sociétés actuelles, pourtant il est un des piliers des sociétés coopératives et participatives où cette définition ne peut être galvaudée.<br>Des décisions collectives prises par l’ensemble des coopérateurs, chez <a href="https://les-tilleuls.coop/">Les-Tilleuls.coop</a> il s’agit de 100% des salariés, quelle idée ? Cette vérité fait l’objet de beaucoup de fantasmes et d’a priori lorsqu’on me parle de la Scop : “Vous votez pour tout… même la couleur du papier toilette ?”, “Les gens arrivent à se mettre d’accord ?”, “Ça donne forcément lieu à des discussions interminables”, “Vous avez des outils ou le bourrage d’urne est autorisé ?”. Il est maintenant temps de lever le voile sur une part importante/vitale de l’entrepreneuriat en Scop : <strong>le vote</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDIK-gmhuR5_aUpGGKuCAQ.png" /></figure><p>Prenons les questions dans l’ordre.</p><p><strong>Quels sujets font l’objet de vote ?</strong> Non, nous ne votons pas la couleur du papier toilette mais pourquoi pas après tout ? Dans quelques mois, nous acquerrons tout un étage à Euratech et nous aurons cette fois le choix des aménagements et des commodités. Blanc, noir, rose, sciure, … nous ferons ce qui nous plaît mais je doute que ce sujet fasse partie de l’ordre du jour d’une prochaine assemblée générale. Mais dans ce cas, que votons-nous ? Tout ! Du moins toutes les décisions importantes qui concernent le collectif. Il peut s’agir de stratégie, d’investissements, de clients potentiels, de positionnement sur le marché, de décisions managériales, d’embauche, de licenciement, d’augmentation, toutes les choses dont on entend peu parler et sur lesquelles on peut rarement influer dans une société classique.</p><p><strong>Qui vote ?</strong> Dans les textes, seuls les coopérateurs ont le droit de voter, mais dans les faits, chez les Tilleuls, tout employé ayant terminé sa période d’essai peut prendre part aux décisions en dehors de l’assemblée générale ordinaire qui se doit de rester formelle. Pourquoi me direz-vous ? C’est simple : nous estimons qu’il est relativement injuste qu’une personne attende presque un an pour prendre part aux décisions qui la concernent tous les jours. Chaque personne a le droit à une voix, quelle que soit son ancienneté ou sa part investie dans le capital de la société, le gérant a un droit de véto (de souvenir il n’a jamais été appliqué chez nous) mais les collaborateurs ont le droit de révoquer le gérant. Ces pouvoirs et contre-pouvoirs font de l’appareil décisionnel des Scop un système équitable et terriblement efficace. Équitable, efficace mais parfois difficile puisque pour avoir des décisions justes pour l’ensemble des salariés, il faut parfois apprendre à mettre l’affectif de côté. Les choix qui incombent au pouvoir décisionnel dans les sociétés classiques sont ici partagés par beaucoup plus de monde et il convient à chacun d’endosser le rôle de patron, quelle que soit sa personnalité, pour faire avancer le collectif dans la bonne direction… Ce n’est pas toujours évident.</p><p><strong>Comment s’organisent les débats avant un vote ?</strong> Il s’agit d’un sujet sur lequel nous échangeons beaucoup ces derniers temps. En quelques années, notre effectif a été multiplié par 15 et les petites discussions de coin de table doivent être aujourd’hui plus organisées. Imaginez une réunion à 40 personnes, 40 personnalités différentes, des grandes gueules, des timides, de grands orateurs, des personnes plus effacées. Chacun devrait avoir le droit de s’exprimer, de débattre sans que la parole ne soit monopolisée et que les discussions restent en bonne intelligence. Aujourd’hui, nous nous inspirons de ce qui se fait dans les syndicats auto-gestionnaires (tour de table, temps de parole, animateur de débat, double liste …) ou dans des Scop plus grandes que la nôtre, nous apportons nos propres idées et petit à petit, nous aboutissons à des solutions qui nous correspondent.</p><p><strong>Avez-vous des outils pour gérer les votes ?</strong> Voilà une question qui alimente beaucoup de débats à la Scop. Longtemps nous avons fonctionné par vote à main levée, mais aujourd’hui, avec les effectifs croissants et les antennes qui se multiplient, cette solution n’est plus viable. Nous testons actuellement <a href="https://www.loomio.org/">Loomio</a>, une plateforme numérique de prise de décision collective qui s’avère plutôt convaincante. Elle dispose de nombreux types de formulaire qui répondent à nos besoins : le “classement par préférence” est idéal pour discuter une proposition salariale, la “proposition” pour un vote basique par exemple. Les votes en AG se font toujours à main levé mais quand nous aurons calibré correctement notre usage de Loomio, peut-être que tout passera par là. À ce jour, nous réfléchissons au sujet brûlant du vote anonyme. Loin de moi l’idée de lancer le débat sur l’utilité ou non de votes à bulletin secret (tentez de l’évoquer avec des Tilleuls lorsque vous en croisez et vous verrez à quel point cette discussion déclenche les passions), mais si nous en venons un jour à cette règle, elle est aussi paramétrable dans Loomio. D’autres expérimentations nous attendent et pourquoi ne pas chercher du côté de cette vidéo très inspirante :</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FZoGH7d51bvc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZoGH7d51bvc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FZoGH7d51bvc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/95bdc47b0efab1edb977c41cee69d674/href">https://medium.com/media/95bdc47b0efab1edb977c41cee69d674/href</a></iframe><p>Le vote est au coeur du système des Scop et plus la société est grande, plus il convient de l’organiser. Notre statut permet de faire évoluer facilement nos pratiques, de tester des solutions, d’itérer et de finalement s’arrêter sur des processus qui nous conviennent à tous. Puisque nous avons assez peu de pouvoir pour rendre la démocratie plus équitable à l’échelon national, nous cherchons à obtenir ce résultat à une échelle plus locale : notre société. Si ce genre d’expérience vous intéresse, n’hésitez pas à <a href="https://les-tilleuls.coop/fr/jobs">rejoindre Les-Tilleuls.coop </a>ou une <a href="http://www.les-scop.coop/sites/fr/">autre scop</a>, je vous garantis que vous en sortirez grandi.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fc89b816c2b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Retour sur le Hackathon EU-Fossa Symfony / API Platform]]></title>
            <link>https://medium.com/@coopTilleuls/retour-sur-le-hackathon-eu-fossa-symfony-api-platform-8612d5b56403?source=rss-ae3c3fd0683f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8612d5b56403</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[symfony]]></category>
            <category><![CDATA[fosshackathon]]></category>
            <category><![CDATA[api-platform]]></category>
            <category><![CDATA[eufossa]]></category>
            <dc:creator><![CDATA[Les-Tilleuls.coop]]></dc:creator>
            <pubDate>Wed, 10 Apr 2019 08:15:34 GMT</pubDate>
            <atom:updated>2019-04-10T08:15:34.181Z</atom:updated>
            <content:encoded><![CDATA[<p>Ce week-end, <strong>nous étions invités par la Commission Européenne à participer à un hackathon de 48 heures</strong> axé sur la sécurité, aux côtés de contributeurs et <em>core-members</em> de <a href="https://symfony.com/">Symfony</a> et <a href="https://api-platform.com/">API Platform</a>. Les frameworks <a href="https://twitter.com/symfony">Symfony</a> et <a href="https://les-tilleuls.coop/fr/blog/article/api-platform-2-4-beta-mongodb-elasticsearch-mercure-symfony-messenger-et-bien-plus">API Platform</a> se sont imposés depuis quelques années dans l’écosystème PHP. La Commission Européenne l’a bien compris et souhaite désormais les intégrer dans ses projets. C’est dans cette optique que la Direction Générale Informatique de la Commission Européenne (DG DIGIT) a ouvert un programme de <em>bug bounty</em> ainsi qu’un hackathon, le tout supporté par le <a href="https://joinup.ec.europa.eu/collection/eu-fossa-2">EU-FOSSA 2</a>.</p><p>Ce hackathon était sur invitation et<strong> a regroupé</strong> <strong>une cinquantaine de développeurs·ses</strong> dont les missions principales étaient de discuter de la diversité au sein de l’écosystème, corriger les problèmes de sécurité, réduire le nombre de tickets de support ouverts ainsi que le nombre de contributions en attente.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*W9HTrmJBruGs-NAg" /></figure><p>Lors de ces deux jours, 5 points de sécurité ont été patchés. 20 <em>pull requests</em> ont été mergées sur le projet <a href="https://github.com/api-platform/api-platform">API Platform</a>, 10 nouvelles PR ont été ouvertes, 87 <em>issues</em> ont été fermées et 4 nouvelles ont été ouvertes. Du côté de Symfony, près de 100 PR ont été mergées, 25 ouvertes, 84 <em>issues</em> ont été fermées et 11 ont été ouvertes. Un énorme travail a été effectué lors de ce week-end ! Si nous devions comparer ça à des journées de travail “classiques”, <strong>nous avons abattu en 2 jours l’équivalent de 2 mois de travail</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XQwEkpIoRUtH8ymw" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UtHXk4YHt1ySk_pf" /></figure><p>Une chose a été relevée par les organisateurs lors de ces deux jours : ils avaient rarement vu une équipe aussi investie dans leur travail et dans un projet. J’ai le souvenir d’un moment de flottement alors que nous venions de passer 2 jours à travailler de manière intense : nous attendions une personne pour démarrer une présentation, et personne ne souhaitait attendre 15 minutes à ne rien faire. Chacun a souhaité retourner sur ce qu’il était en train de faire. Si ça n’est pas le reflet d’une équipe de gens passionnés et investis dans l’Open Source, je ne sais pas ce que c’est.</p><h3>Découvrez nos contributions issues du hackathon</h3><ul><li>Depuis maintenant 2 ans, API Platform propose l’implémentation de <em>subresources</em>, permettant d’imbriquer des relations depuis une ApiResource. Bien qu’intéressante et très utilisée aujourd’hui, cette fonctionnalité est souvent complexe à prendre en main et limitée. Avec l’aide de <a href="https://github.com/vincentchalamon">Vincent Chalamon</a>, <a href="https://twitter.com/s0yuka">Antoine Bluchet</a> et <a href="https://github.com/torreytsui">Torrey Tsui</a>, nous avons effectué des recherches sur l’amélioration des <a href="https://github.com/api-platform/core/issues/2706"><em>subresources</em></a>, la simplification de son implémentation et la gestion étendue des collections.</li><li>Grâce à <a href="https://github.com/jewome62">Jérôme Desjardins</a>, il est désormais possible d’hydrater des objets existants (<a href="https://github.com/symfony/symfony/pull/30607">object_to_populate</a>) récursivement avec le <a href="https://symfony.com/doc/current/components/serializer.html">composant Serializer de Symfony</a>, de normaliser un objet de type <a href="https://github.com/symfony/symfony/pull/30915"><em>DateTimeZone</em></a> et également d’<a href="https://github.com/symfony/symfony/pull/30956">instancier un objet dynamique à partir d’un tableau de valeur</a>.</li><li><a href="https://github.com/alanpoulain">Alan Poulain</a> a pu travailler sur plusieurs sujets comme GraphQL, MongoDB et le système d’évènements d’API Platform. Du côté de GraphQL, certains aspects de la certification n’étaient pas respectés dans leur entièreté. Les <a href="http://github.com/api-platform/core/pull/2705"><em>input</em> via Messenger</a> n’étaient pas testés avec MongoDB et <a href="https://github.com/api-platform/core/pull/2707">la documentation a été améliorée</a>. Au niveau des événements, API Platform s’appuie sur ceux de Symfony, ce qui peut être problématique puisqu’il se veut être un framework agnostique. Afin de faciliter le portage vers d’autres frameworks tels que Laravel, <a href="https://github.com/api-platform/core/pull/2506">Alan a travaillé sur le déport vers des événements internes</a> à API Platform. Ce déport se veut progressif, pour déprécier dans un premier temps la dépendance avec Symfony avant de complètement couper les ponts pour la version 3 d’API Platform.</li><li><a href="https://twitter.com/Deuchnord">Jérôme Tanghe</a>, de son côté, s’est penché sur le générateur de client afin de lui <a href="https://github.com/api-platform/client-generator/pull/114">apporter de l’amour</a>. Un peu de nettoyage sur la documentation et le support de <a href="https://github.com/dunglas/mercure">Mercure</a> au sein de <a href="https://vuejs.org/">VueJS</a> lors de la génération ont été ses principales préoccupations lors de ce week-end.</li><li><a href="https://github.com/jfthuillier">Jean-François Thuillier</a> a complété la documentation de l’admin afin d’expliquer comment <a href="https://github.com/api-platform/docs/pull/765">surcharger certaines fonctions</a>. Il a également pu travailler sur un POC afin d’utiliser les “Guessers” de React Admin avec API Platform.</li><li><a href="https://github.com/antograssiot">Anthony Grassiot</a> a pu travailler sur la sécurité en <a href="https://github.com/api-platform/core/pull/2710">verrouillant l’accès à une ressource avant qu’elle soit manipulée</a>. Il a également amélioré la <a href="https://github.com/api-platform/core/pull/1974">détermination pour une propriété d’être accessible en lecture et en écriture</a>, il a aussi ajouté des tests et avancé sur un sujet complexe qu’est le choix d’une <a href="https://github.com/api-platform/core/pull/2708">stratégie de génération des <em>urls</em></a>.</li><li><a href="https://twitter.com/toflar">Yanick Witschi</a> a <a href="https://github.com/api-platform/core/pull/2703">supprimé de grosses dépendances à l’ODM</a> de Doctrine pour les tests, ajouté le support d’un <a href="https://github.com/api-platform/core/pull/2698">paramètre de pagination pour les <em>subresources</em></a>, et s’est penché sur la création d’un <a href="https://github.com/api-platform/core/pull/1645"><em>endpoint</em> pour faire des opérations groupées</a>.</li><li><a href="https://twitter.com/Nekdev">Maxime Veber</a> a pu corriger <a href="https://github.com/api-platform/core/pull/2713">les messages d’erreur</a> lors de la récupération de l’identifiant d’une ressource qui était trop vague, et travaillé sur la <a href="https://github.com/api-platform/core/pull/2713">résolution de ressource par héritage</a>.</li><li><a href="http://twitter.com/pborreli">Pascal Borreli</a> a amélioré les <a href="https://github.com/api-platform/api-platform/pull/1094">charts helms pour le déploiement Kubernetes</a>, corrigé un point de sécurité sur Symfony et a ajouté <a href="http://github.com/symfony/symfony/pull/30984">une option sur les adapter de cache</a> pour mettre en mémoire les mêmes appels lors d’une même requête.</li><li><a href="https://twitter.com/cDaed">Hamza Amrouche</a> a amélioré la gestion des identifiants et pour ma part, <a href="https://github.com/api-platform/core/pull/2697">j’ai corrigé le fait qu’API Platform tente de purger le cache</a> même lorsqu’une ressource ne possède pas d’opération GET (ce qui provoquait une erreur).</li><li>J’ai également pu travailler sur la documentation avec Vincent Chalamon afin de pouvoir <a href="https://github.com/api-platform/website/pull/103">changer la version de l’API</a> depuis l’interface ou le format de configuration.</li><li>En plus de fermer le plus d’issues possibles, <a href="https://github.com/soyuka">Antoine Bluchet</a> a accompagné différents contributeurs durant ces deux jours. Il était le contrôleur aérien d’API Platform lors de ce week-end.</li></ul><p>Retrouvez l’intégralité des contributions tous dépôts confondus à l’adresse : <a href="https://eufossa.github.io/symfony-hackathon-2019/">https://eufossa.github.io/symfony-hackathon-2019/</a>.</p><h3>Une expérience incomparable</h3><p><strong>Ce hackathon fut une véritable aventure humaine</strong>. La majorité de l’équipe présente venait des quatres coins de l’Europe, même des développeurs venus de Russie, du Maroc ou de Cuba étaient là. Nous avons pu rencontrer, pour de vrai, des personnes avec qui nous échangions principalement sur Github ou Twitter. Côté organisation, c’était parfait. Tout était pris en charge par la Commission Européenne via la société BeMyApp : le transport, l’hébergement, la restauration et le lieu (exceptionnel) du hackathon. <strong>Au nom de tous les Tilleuls présents lors de ce week-end, je tiens à remercier toutes les personnes ayant participé à l’organisation de cet événement, </strong>notamment <a href="http://linkedin.com/in/jfhovinne">Jean-François Hovinne</a>, à l’initiative de cet événement. Merci également à BeMyApp qui était à nos petits soins lors de ces deux jours.</p><blockquote><em>The first hackathon of EU-FOSSA 2 project’s series of </em><a href="https://twitter.com/hashtag/FOSSHackathons?src=hash&amp;ref_src=twsrc%5Etfw"><em>#FOSSHackathons</em></a><em> is soon over! Thank you </em><a href="https://twitter.com/symfony?ref_src=twsrc%5Etfw"><em>@symfony</em></a><em> </em><a href="https://twitter.com/EU_DIGIT?ref_src=twsrc%5Etfw"><em>@EU_DIGIT</em></a><em> </em><a href="https://twitter.com/ApiPlatform?ref_src=twsrc%5Etfw"><em>@ApiPlatform</em></a><em> </em><a href="https://twitter.com/coopTilleuls?ref_src=twsrc%5Etfw"><em>@coopTilleuls</em></a><em>. Amazing energy and achievements! We’ll post a Medium post covering the event next week, stay tuned </em><a href="https://t.co/R0sZsItp0B"><em>pic.twitter.com/R0sZsItp0B</em></a></blockquote><blockquote><em>— BeMyApp Belgium (@bemyappBE) </em><a href="https://twitter.com/bemyappBE/status/1114901233930731525?ref_src=twsrc%5Etfw"><em>7 avril 2019</em></a></blockquote><p>Nous sommes revenus épuisés mais <strong>heureux d’avoir apporté, encore plus que d’habitude, notre pierre à l’édifice des projets Open Source aussi prodigieux que Symfony et API Platform</strong>. Les logiciels libres sont souvent mal compris puisque régulièrement associés à la notion de gratuité, or beaucoup de gens s’y investissent pleinement. Si des personnes sont prêtes à consacrer de leur temps libre à l’amélioration de tels outils, les entreprises devraient sans doute y investir beaucoup plus. Toutes sortes de contributions sont possibles : <strong>libérer du temps à vos employés</strong>, <strong>mettre à disposition vos locaux</strong>, <strong>sponsoriser des événements ou des développements</strong> (comme le support d’ElasticSearch dans API Platform)… Amis employeurs, laissez libre cours à votre créativité. Vos développeurs et les outils que vous utilisez au quotidien ont besoin de votre soutien.</p><p>Notre équipe serait ravie d’organiser un hackathon similaire à Lille, <a href="https://les-tilleuls.coop/fr/blog/article/retour-sur-la-semaine-sylius-lille">comme nous avions fait en octobre dernier</a>. N’hésitez pas à nous contacter !</p><p><strong>Grégoire Hébert</strong></p><p><em>Originally published at </em><a href="https://les-tilleuls.coop/fr/blog/article/hackathon-eu-fossa-2019"><em>les-tilleuls.coop</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8612d5b56403" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rendez vos applications React et Next.js plus rapides que la lumière grâce à React ESI]]></title>
            <link>https://medium.com/@coopTilleuls/rendez-vos-applications-react-et-next-js-plus-rapides-que-la-lumi%C3%A8re-gr%C3%A2ce-%C3%A0-react-esi-92f793164e5f?source=rss-ae3c3fd0683f------2</link>
            <guid isPermaLink="false">https://medium.com/p/92f793164e5f</guid>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[varnish]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[react-esi]]></category>
            <dc:creator><![CDATA[Les-Tilleuls.coop]]></dc:creator>
            <pubDate>Mon, 25 Mar 2019 10:51:32 GMT</pubDate>
            <atom:updated>2019-03-25T10:51:32.736Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://github.com/dunglas/react-esi">Retrouvez la version originale de cet article ici</a>.</p><p>React ESI est une bibliothèque de cache extrêmement puissante pour les applications <a href="https://reactjs.org/">React</a> et <a href="https://nextjs.org/">Next.js</a>, capable de créer des applications dynamiques aussi rapides que des sites statiques.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UVxOubUbxCAa-xnfd1cEgg.png" /></figure><p>React ESI offre un moyen simple d’améliorer les performances de votre application en stockant<strong> des fragments </strong>de pages rendues côté serveur dans<strong> des serveurs de cache périphériques (edge cache servers) </strong>tels que ceux proposés par Fastly ou Akamai (le logiciel Varnish est également supporté). Cela signifie qu’après le premier rendu, des fragments de vos pages seront servis en quelques millisecondes par des serveurs proches de vos utilisateurs finaux ! React ESI est un moyen très efficace d’améliorer les performances et le référencement de vos sites web, ainsi que pour réduire considérablement vos coûts d’hébergement et la consommation d’énergie de ces applications.</p><p>Vu qu’il repose sur <a href="https://www.w3.org/TR/esi-lang">la spécification W3C ESI</a> (Edge Side Includes), React ESI prend en charge de manière native la plupart des fournisseurs de cache cloud comme <a href="https://blog.cloudflare.com/edge-side-includes-with-cloudflare-workers/">Cloudflare Workers</a>, <a href="https://www.akamai.com/fr/fr/support/esi.jsp">Akamai</a> et <a href="https://docs.fastly.com/guides/performance-tuning/using-edge-side-includes">Fastly</a>. Bien entendu, React ESI supporte également le serveur de cache open source <a href="https://varnish-cache.org/intro/index.html#intro">Varnish</a>, que vous pouvez utiliser gratuitement dans votre propre infrastructure (voici un <a href="https://github.com/zeit/next.js/blob/canary/examples/with-react-esi/docker/varnish/default.vcl">exemple de configuration</a>).</p><p>React ESI permet de spécifier un TTL (Time To Live) différent par composant React, puis de générer le code HTML lui correspondant de manière asynchrone à l’aide d’une URL sécurisée (signée). Le serveur de cache récupère ce fragment de HTML depuis l’application Node puis le stocke. Il assemble finalement ensuite la page finale et l’envoie au navigateur. React ESI permet également aux composants d’être rendus par le navigateur côté client, sans nécessiter de configuration spécifique.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/0*hkdRPV-6qm2PRtiI" /></figure><p>Exemple : découvrez comment utiliser React ESI avec <a href="https://github.com/zeit/next.js/blob/canary/examples/with-react-esi/">Next.js et Varnish</a></p><h3>Installation</h3><p>Utilisez votre gestionnaire de paquets JS préféré pour installer la bibliothèque.</p><p>Avec Yarn :</p><pre>$ yarn add react-esi</pre><p>Ou avec NPM :</p><pre>$ npm install react-esi</pre><h3>Usage</h3><p>React ESI fournit un <a href="https://reactjs.org/docs/higher-order-components.html">Higher Order Component</a> qui :</p><ul><li>Remplace le composant encapsulé par une balise ESI côté serveur (ne vous inquiétez pas, React ESI fournit également l’outillage nécessaire pour générer le fragment correspondant) ;</li><li>Refait le rendu du composant encapsulé côté client et l’alimente avec les props calculées côté serveur (si nécessaire).</li></ul><p>React ESI appelle automatiquement une méthode <em>static async</em> nommée <em>getInitialProps()</em> pour renseigner les props initiales du composant. Côté serveur, cette méthode peut accéder à la requête et à la réponse HTTP pour, par exemple, définir l’en-tête <em>Cache-Control</em> ou des <a href="https://api-platform.com/docs/core/performance/#enabling-the-built-in-http-cache-invalidation-system">cache tags</a>.</p><p>Ces props renvoyées par <em>getInitialProps()</em> seront également injectées dans le code HTML généré par le serveur (dans une balise <em>&lt;script&gt;</em>). Côté client, le composant réutilisera les props provenant du serveur (la méthode ne sera pas appelée une seconde fois). Si la méthode n’a pas été appelée côté serveur, elle sera appelée côté client lors du premier montage du composant.</p><h3>Le Higher Order Component</h3><pre>// pages/index.js<br>import React from &#39;react&#39;;<br>import withESI from &#39;react-esi&#39;;<br>import MyFragment from &#39;components/MyFragment&#39;;<br><br>const MyFragmentESI = withESI(MyFragment, &#39;MyFragment&#39;);<br>// Le second paramètre est un ID unique identifiant ce fragment.<br>// Si vous utilisez différentes instances du même composant, utilisez un ID différent par instance.<br><br>const Index = () =&gt; (<br>  &lt;div&gt;<br>    &lt;h1&gt;React ESI demo app&lt;/h1&gt;<br>    &lt;MyFragmentESI greeting=&quot;Hello!&quot; /&gt;<br>  &lt;/div&gt;<br>);</pre><pre>// components/MyFragment.js<br>import React from &#39;react&#39;;<br><br>export default class MyFragment extends React.Component {<br>  render() {<br>    return (<br>      &lt;section&gt;<br>        &lt;h1&gt;A fragment that can have its own TTL&lt;/h1&gt;<br><br>        &lt;div&gt;{this.props.greeting /* accédez aux props comme d’habitude */}&lt;/div&gt;<br>        &lt;div&gt;{this.props.dataFromAnAPI}&lt;/div&gt;<br>      &lt;/section&gt;<br>    );<br>  }<br><br>  static async getInitialProps({ props, req, res }) {<br>    return new Promise(resolve =&gt; {<br>      if (res) {<br>        // Réglage d’un TTL pour le fragment<br>        res.set(&#39;Cache-Control&#39;, &#39;s-maxage=60, max-age=30&#39;);<br>      }<br><br>      // Simulation d’un délai (appel à un service distant tel qu’une API web)<br>      setTimeout(<br>        () =&gt;<br>          resolve({<br>            ...props, // Ce sont les props venant de index.js, qui ont été transmises via l’URL interne<br>            dataFromAnAPI: &#39;Hello there&#39;<br>          }),<br>        2000<br>      );<br>    });<br>  }<br>}</pre><p>Les props initiales <strong>doivent être sérialisables</strong> avec <em>JSON.stringify()</em>. Attention à <em>Map</em>, <em>Set</em> et <em>Symbol</em> !</p><p>Nb :<strong> </strong>pour plus de commodité, <em>getInitialProps()</em> a la même signature que la fonction du même nom fournie par Next.js. Cependant, c’est une implémentation totalement indépendante et autonome (vous n’avez pas besoin de Next.js pour l’utiliser).</p><h3>Servir les fragments</h3><p>React ESI fournit un contrôleur prêt à l’emploi compatible avec <a href="https://expressjs.com/">Express</a> :</p><pre>// server.js<br>import express from &#39;express&#39;;<br>import { path, serveFragment } from &#39;react-esi/lib/server&#39;;<br><br>const server = express();<br>server.use((req, res, next) =&gt; {<br>  // Envoie l’en-tête Surrogate-Control pour annoncer aux proxys le support des ESI (optionnel avec Varnish, suivant votre config)<br>  res.set(&#39;Surrogate-Control&#39;, &#39;content=&quot;ESI/1.0&quot;&#39;);<br>  next();<br>});<br><br>server.get(path, (req, res) =&gt;<br>  // &quot;path&quot; a comme valeur par défaut /_fragment, vous pouvez la changer en réglant la variable d&#39;environnement REACT_ESI_PATH<br>  serveFragment(<br>    req,<br>    res,<br>    // &quot;fragmentID&quot; est le second paramètre passé au HOC &quot;WithESI&quot;, le composant racine utilisé pour ce fragment doit être retourné<br>    fragmentID =&gt; require(`./components/${fragmentID}`).default) <br>);<br><br>// ...<br>// Les autres routes  Express sont ici<br><br>server.listen(80);</pre><p>Alternativement, voici un exemple complet utilisant un serveur <a href="https://github.com/zeit/next.js/tree/master/examples/custom-server-express">Next.js</a> :</p><pre>// server.js<br>import express from &#39;express&#39;;<br>import next from &#39;next&#39;;<br>import { path, serveFragment } from &#39;react-esi/lib/server&#39;;<br><br>const port = parseInt(process.env.PORT, 10) || 3000<br>const dev = process.env.NODE_ENV !== &#39;production&#39;<br>const app = next({ dev })<br>const handle = app.getRequestHandler()<br><br>app.prepare().then(() =&gt; {<br>  const server = express();<br>  server.use((req, res, next) =&gt; {<br>    // Envoie l’en-tête Surrogate-Control pour annoncer aux proxys le support des ESI (optionnel avec Varnish)<br>    res.set(&#39;Surrogate-Control&#39;, &#39;content=&quot;ESI/1.0&quot;&#39;);<br>    next();<br>  });<br><br>  server.get(path, (req, res) =&gt;<br>    serveFragment(req, res, fragmentID =&gt; require(`./components/${fragmentID}`).default)<br>  );<br>  server.get(&#39;*&#39;, handle); // Routes Next.js<br><br>  server.listen(port, err =&gt; {<br>    if (err) throw err;<br>    console.log(`&gt; Ready on http://localhost:${port}`);<br>  });<br>});</pre><h3>Fonctionnalités</h3><ul><li>Support de Varnish, Cloudflare Workers, Akamai, Fastly et tous les autres systèmes de cache prenant en charge ESI</li><li>Écrit en Typescript</li><li>API similaire à Next.js</li></ul><h3>Variables d’environnement</h3><p>React ESI peut être configuré à l’aide de variables d’environnement :</p><ul><li><em>REACT_ESI_SECRET</em> : une clé secrète utilisée pour signer l’URL du fragment (il est vivement<strong> recommandé de la définir pour éviter les problèmes lors du redémarrage du serveur ou de l’utilisation de multiples serveurs)</strong></li><li><em>REACT_ESI_PATH</em><strong> </strong>: le chemin interne utilisé pour générer le fragment, qui ne doit pas être exposé publiquement (par défaut : <em>/_fragment</em>)</li></ul><h3>Passage d’attributs à l’élément &lt;esi:include&gt;</h3><p>Pour transmettre des attributs à l’élément <em>&lt;esi:include&gt;</em> généré par React ESI, passez une prop au HOC ayant la structure suivante :</p><pre>{ esi: { attrs: { alt: &quot;Texte alternatif&quot;, onerror: &quot;continue&quot; } } }</pre><h3>Dépannage</h3><ul><li>Le cache n’est jamais utilisé</li></ul><p>Par défaut, la plupart des proxys (y compris Varnish) ne servent jamais de réponse à partir du cache si la demande contient un cookie. Si vous testez avec <em>localhost</em> ou un domaine local similaire, effacez tous les cookies préexistants pour cette origine. Si les cookies sont attendus (par exemple : Google Analytics ou des cookies publicitaires), vous devez configurer correctement votre proxy de cache pour les ignorer. Voici <a href="https://www.varnish-software.com/wiki/content/tutorials/varnish/sample_vclTemplate.html#cookie-manipulation">quelques exemples pour Varnish</a>.</p><h3>Aller plus loin</h3><p>React ESI fonctionne très bien avec les stratégies de cache avancées, notamment :</p><ul><li>l’invalidation du cache (purge) avec les tags de cache (<a href="https://github.com/varnish/varnish-modules/blob/master/docs/vmod_xkey.rst">Varnish</a> / <a href="https://blog.cloudflare.com/introducing-a-powerful-way-to-purge-cache-on-cloudflare-purge-by-cache-tag/">Cloudflare</a>)</li><li>le préchauffage du cache lorsque les données changent dans la couche de persistance (<a href="https://blog.theodo.fr/2015/11/auto-warm-up-varnish4-cache/">Varnish</a>)</li></ul><p>Essayez-les !</p><h3>Vue.JS/Nuxt</h3><p>Nous aimons tout autant Vue et Nuxt que React et Next. Nous portons donc actuellement React ESI vers cette plate-forme. <a href="https://les-tilleuls.coop/fr/contact">Contactez-nous</a> si vous voulez aider !</p><h3>Passez le mot !</h3><p>Vous aimez React ESI ? Rejoignez les 200 personnes lui ayant déjà mis une <a href="https://github.com/dunglas/react-esi">étoile sur Github</a> et n’hésitez pas à contribuer ! Notre coopérative sera également ravie de vous accompagner dans la mise en place de React ESI dans votre projet :)</p><p><em>Originally published at </em><a href="https://les-tilleuls.coop/fr/blog/article/react-esi"><em>les-tilleuls.coop</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92f793164e5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Platform 2.4 beta : MongoDB, Elasticsearch, Mercure, Symfony Messenger et bien plus !]]></title>
            <link>https://medium.com/@coopTilleuls/api-platform-2-4-beta-mongodb-elasticsearch-mercure-symfony-messenger-et-bien-plus-381c1a479053?source=rss-ae3c3fd0683f------2</link>
            <guid isPermaLink="false">https://medium.com/p/381c1a479053</guid>
            <category><![CDATA[symfony]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[open-api]]></category>
            <category><![CDATA[api-platform]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Les-Tilleuls.coop]]></dc:creator>
            <pubDate>Thu, 21 Feb 2019 13:25:31 GMT</pubDate>
            <atom:updated>2019-02-21T13:25:31.784Z</atom:updated>
            <content:encoded><![CDATA[<h3>API Platform 2.4 beta : MongoDB, Elasticsearch, Mercure, Symfony Messenger et bien plus !</h3><p><a href="https://dunglas.fr/2019/01/api-platform-2-4/">Retrouvez la version originale de cet article ici</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sl1Z5vm4QDDy6pHJ68lqug.png" /></figure><p>Notre coopérative est fière de vous annoncer la sortie de la beta d’API Platform 2.4, enrichie d’un large éventail de nouvelles fonctionnalités !<strong> </strong>Pour rappel, API Platform est un framework “full-stack” permettant de développer en un tour de main des projets basés sur des API. API Platform fournit :</p><p><strong>API Platform supporte les formats </strong><a href="https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm"><strong>REST</strong></a><strong> modernes</strong> (<a href="https://json-ld.org/">JSON-LD</a> / <a href="http://www.hydra-cg.com/">Hydra</a>, <a href="https://jsonapi.org/">JSONAPI</a>, <a href="https://www.openapis.org/">OpenAPI</a>, <a href="http://stateless.co/hal_specification.html">HAL</a>…) ainsi que <a href="https://graphql.org/">GraphQL</a>. Pour créer votre projet, il vous suffit de décrire les structures publiques des données à exposer via l’API. API Platform se chargera d’exposer l’API Web et d’amorcer les clients pour qu’ils l’utilisent.</p><p>Les fonctionnalités apportées par la version 2.4 sont de haute volée. En voici la liste :</p><ul><li><strong>Support de lecture et d’écriture pour </strong><a href="https://www.mongodb.com/"><strong>MongoDB</strong></a>, le système de gestion de base de données de référence pour les documents, incluant de nombreux filtres utiles.</li><li>Support de lecture pour <a href="https://www.elastic.co/">Elasticsearch</a>, le moteur d’analyse et de recherche open source, incluant des filtres pour la recherche avancée.</li><li>“Push” automatique des ressources mises à jour du serveur aux clients en utilisant le protocole <a href="https://github.com/dunglas/mercure">Mercure</a><strong>.</strong></li><li>Intégration du composant <a href="https://symfony.com/doc/current/components/messenger.html">Symfony Messenger</a> afin d’implémenter aisément <a href="https://martinfowler.com/bliki/CQRS.html">le modèle CQRS</a> et gérer les messages de manière asynchrone (en utilisant des brokers comme RabbitMQ, Apache Kafka, Amazon SQS ou Google PubSub).</li><li>Possibilité d’utilisation de la <a href="https://developers.google.com/web/fundamentals/performance/http2/#server_push">fonctionnalité «Server Push» de HTTP / 2</a> pour envoyer de manière préemptive les relations d’une ressource demandée au client.</li><li>Disponibilité automatique des filtres de liste dans l’admin basée sur React lorsqu’un filtre correspondant est disponible côté API.</li><li>Compatibilité totale avec la version 3 de OpenAPI (anciennement connu sous le nom de Swagger) et intégration du générateur de documentation <a href="https://github.com/Rebilly/ReDoc">ReDoc</a>.</li><li>Prise en charge améliorée des <a href="https://api-platform.com/docs/core/dto/">DTO</a><strong>.</strong></li><li>Configuration par ressource des en-têtes de cache HTTP</li><li>Possibilité d’utiliser facilement <a href="https://tools.ietf.org/id/draft-wilde-sunset-header-03.html">l’en-tête HTTP Sunset</a> pour annoncer la date de suppression des endpoints dépréciés.</li></ul><p><a href="https://github.com/api-platform/core/releases/tag/v2.4.0-beta.1">Le changelog complet est disponible sur GitHub.</a> Découvrons maintenant ces nouvelles fonctionnalités !</p><h3>Support de MongoDB</h3><p>MongoDB est l’une des bases de données NoSQL les plus populaires. <strong>La prise en charge native de MongoDB était la fonctionnalité la plus demandée et la plus attendue d’API Platform</strong> ! <a href="https://github.com/samvdb">Sam Van der Borght</a> a commencé à se pencher sur ce sujet en mars 2016. En juillet 2017, <a href="https://github.com/api-platform/core/pull/1293">la <em>Pull Request</em> a été transférée sur la V2 du framework</a> par <a href="https://twitter.com/zay0n">Pablo Godinez</a>, avec l’aide de <a href="https://twitter.com/cDaed">Hamza Amrouche</a> (membre de la core team d’API Platform), <a href="https://github.com/adelplace">Alexandre Delplace</a> et bien d’autres. Depuis août 2018, <a href="https://twitter.com/_alanpoulain">Alan Poulain</a> (membre de la core-team et auteur du sous-système GraphQL) a déployé des efforts considérables pour finir <a href="https://github.com/api-platform/core/pull/2144">ce patch</a>.</p><p>Avec 114 commits et 234 fichiers modifiés en presque 3 ans, c’est l’une des plus grandes contributions du projet.</p><p>L’intégration de MongoDB repose sur <a href="https://www.doctrine-project.org/projects/mongodb-odm/latest.html">Doctrine MongoDB ODM 2.0</a> (actuellement en version bêta). Pour activer cette fonctionnalité, il suffit d’installer et de configurer <a href="https://symfony.com/doc/master/bundles/DoctrineMongoDBBundle/index.html">DoctrineMongoDBBundle</a>. API Platform va le détecter automatiquement. Créez ensuite une classe mappée avec MongoDB et marquez-la en tant que ressource API :</p><pre>namespace App\Document;<br><br>use ApiPlatform\Core\Annotation\ApiResource;<br>use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;<br><br>/**<br> * @ApiResource<br> * @ODM\Document<br> */<br>class Book<br>{<br>    /**<br>     * @ODM\Id(strategy=&quot;INCREMENT&quot;, type=&quot;integer&quot;)<br>     */<br>    public $id;<br><br>    /**<br>     * @ODM\Field(type=&quot;string&quot;)<br>     */<br>    public $title;<br>}</pre><p>La prise en charge de MongoDB exploite la flexibilité d’API Platform : elle a été implémentée en tant que <a href="https://api-platform.com/docs/core/data-providers/">fournisseur de données</a> et <a href="https://api-platform.com/docs/core/data-persisters/">persisteur de données</a>. Les relations, la pagination ainsi que les filtres booléens, les dates, les nombres, les ordres, et les filtres de recherche sont également pris en charge !</p><p>Un grand merci à tous les contributeurs de cette fonctionnalité, ainsi qu’à <a href="https://twitter.com/alcaeus">Andreas Braun</a>, responsable de la maintenance de Doctrine MongoDB ODM, pour ses relectures approfondies !</p><p><a href="https://api-platform.com/docs/core/mongodb/">Lisez et améliorez la documentation relative à MongoDB.</a></p><h3>Support de Elasticsearch</h3><p>Elasticsearch est un outil Open Source permettant d’effectuer des recherches et des analyses avancées sur un très grand nombre de données. La société <a href="https://www.orange-business.com/en">Orange</a> a sponsorisé le développement du support d’Elasticsearch pour API Platform, ainsi que d’intéressants filtres de recherche. <a href="https://github.com/api-platform/core/pull/1999">Cette implémentation</a> a été réalisée par <a href="https://twitter.com/meyer_baptiste">Baptiste Meyer</a> (core-team API Platform). Grâce à Orange, cette fonctionnalité est désormais disponible dans la version 2.4 d’API Platform !</p><p>Pour activer et configurer le support d’Elasticsearch, reportez-vous à la documentation officielle. Ensuite, une simple classe de ressources correspondant à un index Elasticsearch suffit pour bénéficier de toute la puissance d’API Platform :</p><pre>namespace App\Model;<br><br>use ApiPlatform\Core\Annotation\ApiProperty;<br>use ApiPlatform\Core\Annotation\ApiFilter;<br>use ApiPlatform\Core\Annotation\ApiResource;<br>use ApiPlatform\Core\Bridge\Elasticsearch\DataProvider\Filter\MatchFilter;<br><br>/**<br> * @ApiResource<br> */<br>class Tweet<br>{<br>    /**<br>     * @ApiProperty(identifier=true)<br>     *<br>     * @var string<br>     */<br>    public $id;<br><br>    /**<br>     * @var User<br>     */<br>    public $author;<br><br>    /**<br>     * @var \DateTimeInterface<br>     */<br>    public $date;<br><br>    /**<br>     * @ApiFilter(MatchFilter::class)<br>     *<br>     * @var string<br>     */<br>    public $message;<br>}</pre><p>Ensuite, vous pouvez utiliser une URL telle que <em>/ tweets? Message = foo</em> pour effectuer une recherche à l’aide de Elasticsearch.</p><p>Gardez en tête que c’est votre responsabilité d’alimenter votre index Elastic. Pour ce faire, vous pouvez utiliser <a href="https://www.elastic.co/fr/products/logstash">Logstash</a>, <a href="https://api-platform.com/docs/core/data-persisters/">un persisteur de données</a> personnalisé, ou tout autre mécanisme adapté à votre projet (tel qu’un ETL). Baptiste a également profité de cette occasion pour améliorer le code gérant la pagination. Il s’agit désormais d’une classe générique utilisée par tous les fournisseurs de données natifs (Doctrine ORM, MongoDB et Elasticsearch), que vous pouvez réutiliser par vous-même.</p><p><a href="https://api-platform.com/docs/core/elasticsearch/">Lisez et améliorez la documentation relative à Elasticsearch.</a></p><h3>Mise à jour en temps réel du client avec Mercure</h3><p><a href="https://les-tilleuls.coop/fr/blog/article/mercure-un-protocole-pour-pousser-des-mises-a-jour-vers-des-navigateurs-et-app-mobiles-en-temps-reel">Mercure est un tout nouveau protocole</a> basé sur HTTP / 2 et les <a href="https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events">Server-Sent Events</a> (SSE). C’est une alternative moderne à WebSocket (WebSocket n’étant pas compatible avec HTTP / 2). Mercure est particulièrement utile pour publier en temps réel les mises à jour des ressources servies via des API Web. Il est supporté nativement par les navigateurs modernes (aucune bibliothèque requise ni SDK) et est très utile pour mettre à jour des applications Web et mobiles réactives.</p><p>Dans la version 2.4, <strong>nous avons ajouté la prise en charge de Mercure au composant serveur d’API Platform</strong> et <a href="https://api-platform.com/docs/client-generator/">aux générateurs d’applications React et React Native</a>. La configuration de Docker Compose fournie avec API Platform a également été mise à jour pour fournir un hub Mercure. La configuration pour l’envoi automatique des mises à jour aux clients actuellement connectés est très simple :</p><pre>namespace App\Entity;<br><br>use ApiPlatform\Core\Annotation\ApiResource;<br><br>/**<br> * @ApiResource(mercure=true)<br> */<br>class Book<br>{<br>    // ...<br>}</pre><p>Grâce aux fonctionnalités de découverte automatique de Mercure, les clients générés s’abonnent automatiquement aux mises à jour :</p><p><a href="https://api-platform.com/docs/core/mercure/">Découvrez le protocole Mercure.</a></p><h3>CQRS et traitement des messages asynchrones avec Symfony Messenger</h3><p><a href="https://symfony.com/doc/current/components/messenger.html">Messenger</a> est un nouveau composant Symfony créé par <a href="https://twitter.com/samuelroze">Samuel Roze</a> (core team Symfony et API Platform). Il permet de distribuer des messages à l’aide de queues de messages (RabbitMQ, Kafka, Amazon SQS, Google PubSub…) et de les traiter de manière asynchrone. Il fournit un bus de messages permettant de mettre en œuvre <a href="https://martinfowler.com/bliki/CQRS.html">le modèle de conception CQRS</a>. Dans API Platform 2.4, nous avons ajouté un moyen pratique de tirer parti des fonctionnalités de Messenger. Cette nouvelle fonctionnalité est particulièrement utile pour créer des endpoints orientés service (de type <a href="https://en.wikipedia.org/wiki/Remote_procedure_call">RPC</a>) :</p><pre>namespace App\Entity;<br><br>use ApiPlatform\Core\Annotation\ApiResource;<br>use Symfony\Component\Validator\Constraints as Assert;<br><br>/**<br> * @ApiResource(<br> *     messenger=true,<br> *     collectionOperations={<br> *         &quot;post&quot;={&quot;status&quot;=202}<br> *     },<br> *     itemOperations={},<br> *     outputClass=false<br> * )<br> */<br>class ResetPasswordRequest<br>{<br>    /**<br>     * @var string<br>     *<br>     * @Assert\NotBlank<br>     */<br>    public $username;<br>}</pre><p>Grâce au nouvel attribut <em>Messenger</em>, cet objet sera automatiquement envoyé au bus. Il peut ensuite être traité (de manière synchrone ou asynchrone) par un gestionnaire de messages :</p><pre>namespace App\Handler;<br><br>use App\Entity\ResetPasswordRequest;<br>use Symfony\Component\Messenger\Handler\MessageHandlerInterface;<br><br>class ResetPasswordRequestHandler implements MessageHandlerInterface<br>{<br>    public function __invoke(ResetPasswordRequest $forgotPassword)<br>    {<br>        // do something with the resource<br>    }<br>}</pre><p>Et c’est tout ! Voilà ce qu’il vous faut pour utiliser le composant Messenger avec API Platform.</p><p><a href="https://api-platform.com/docs/core/messenger/">Lisez et améliorez la documentation du sous système de Messenger.</a></p><h3>Serveur Push</h3><p><em>HTTP/2 permet à un serveur d’envoyer de manière préventive (ou «push») des réponses (ainsi que les demandes «promises» correspondantes) à un client en association avec une requête précédente envoyée par le client. Cela peut être utile lorsque le serveur sait que le client doit disposer de ces réponses pour traiter pleinement la réponse à la requête initiale (RFC 7540).</em></p><p>Cette fonctionnalité est particulièrement utile pour les performances des API REST : <a href="https://blog.apisyouwonthate.com/lets-stop-building-apis-around-a-network-hack-9a68f7e83dd2">elle permet au serveur d’envoyer (push) instantanément les relations de la ressource actuelle dont le client aura besoin</a>, avant même que le client sache qu’il devra émettre une requête HTTP supplémentaire.</p><p>API Platform 2.4 facilite grandement l’établissement de relations utilisant HTTP/2 :</p><pre>namespace App\Entity;<br><br>use ApiPlatform\Core\Annotation\ApiProperty;<br>use ApiPlatform\Core\Annotation\ApiResource;<br><br>/**<br> * @ApiResource<br> */<br>class Book<br>{<br>    /**<br>     * @ApiProperty(push=true)<br>     *<br>     * @var Author<br>     */<br>    public $author;<br>}</pre><p>Grâce à l’attribut <em>push</em>, si le client demande <em>/ books / 1</em>, le serveur web enverra directement à la fois la ressource du livre demandée et l’auteur associé (par exemple, <em>/ authors / 12</em>) au client. Pour de meilleures performances, cette fonctionnalité doit être utilisée avec<a href="https://github.com/api-platform/docs/blob/master/core/performance.md#enabling-the-built-in-http-cache-invalidation-system"> le système d’invalidation de cache HTTP intégré (basé sur Varnish)</a>.</p><p><a href="https://api-platform.com/docs/core/push-relations/">Lisez et améliorez la documentation du sous-système HTTP / 2 Server Push.</a></p><h3>Détection de filtres dans API Platform Admin</h3><p><a href="https://github.com/jfthuillier">Jean-François Thuillier</a> et <a href="https://github.com/arnaudoisel">Arnaud Oisel</a> ont patché API Platform Admin et la bibliothèque JavaScript API Doc Parser sous-jacente pour détecter et utiliser automatiquement les filtres exposés par les spécifications de l’API (Hydra ou OpenAPI). Regardez par vous-même :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*06cg988TdE0OanrJ" /></figure><p>Le seul code dont vous avez besoin pour obtenir une telle interface est le suivant :</p><pre>import React from &#39;react&#39;;<br>import { HydraAdmin } from &#39;@api-platform/admin&#39;;<br><br>export default () =&gt; &lt;HydraAdmin entrypoint=&quot;https://api.example.com&quot;/&gt;;</pre><p>L’interface utilisateur est construite côté client de manière dynamique en analysant les spécifications de l’API.</p><p>Jean-François a également ajouté quelques <a href="https://github.com/api-platform/admin/pull/130">helpers</a> pour aider à la personnalisation de l’admin, et Laury Sorriaux a corrigé une limitation de longue date : il est désormais possible d’utiliser l’admin même avec une API non desservie à la racine du domaine (telle que <em>/ api</em>).</p><p><a href="https://api-platform.com/docs/admin/">Découvrez et améliorez la documentation d’API Platform Admin.</a></p><h3>OpenAPI v3 et ReDoc</h3><p>API Platform 2.4 prend désormais en charge <a href="https://swagger.io/blog/news/announcing-openapi-3-0/">la nouvelle version du format de spécification OpenAPI (anciennement Swagger) (v3)</a>. Notre framework utilise également les nouvelles fonctionnalités introduites par cette version, telles que les <a href="https://swagger.io/docs/specification/links/">liens</a>.</p><p>Pour récupérer la spécification d’une version donnée d’OpenAPI de l’API, utilisez l’URL suivante :<strong> </strong><em>/docs.json?spec_version=3.</em></p><p>Vous pouvez également extraire la spécification au format JSON ou au format YAML :</p><ul><li><em>bin / console api: openapi: export — spec-version = 3 # JSON</em></li><li><em>bin / console api: openapi: export — spec-version = 3 — yaml # YAML</em></li></ul><p>Parallèlement à Swagger UI, nous avons implémenté la prise en charge de ReDoc, un générateur de docs d’API, écrit en React :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zu9eRPa4KhiF0dd8" /></figure><p><a href="https://twitter.com/antograssiot">Anthony Grassiot</a> (membre de la core-team API Platform) a apporté une aide considérable au support d’OpenAPI v3. L’intégration de ReDoc a été réalisée par <a href="https://twitter.com/gheb_dev">Grégoire Hébert</a>. Un grand merci à eux !</p><p><a href="https://api-platform.com/docs/core/swagger/">Découvrez et améliorez la documentation relative à OpenAPI.</a></p><h3>Prise en charge améliorée du DTO</h3><p>La gestion des objets de transfert de données était connue pour être difficile avec API Platform. <a href="https://medium.com/@coopTilleuls/sylius-week-in-lille-summary-58df33452e0">En octobre dernier, une partie de l’équipe d’API Platform et de Sylius ont collaboré pour améliorer l’API de ce framework e-commerce basé sur Symfony</a>, avec l’aide d’API Platform (on vous en dira bientôt plus à ce sujet !). Au cours de cet atelier, <a href="https://soyuka.me/">Antoine Bluchet</a> et Kévin Dunglas ont travaillé sur une nouvelle façon de gérer les DTO avec API Platform :</p><pre>namespace App\Entity;<br><br>use ApiPlatform\Core\Annotation\ApiResource;<br>use App\Dto\BookInput;<br>use App\Dto\BookOutput;<br><br>/**<br> * @ApiResource(<br> *   inputClass=BookInput::class,<br> *   outputClass=BookOutput::class<br> * )<br> */<br>final class Book<br>{<br>  // ...<br>}</pre><p>Les nouveaux attributs <em>input_class</em> et <em>output_class</em> permettent d’utiliser des classes spécifiques respectivement pour la représentation en écriture et en lecture de la ressource.</p><p>Comme illustré dans l’exemple utilisant Symfony Messenger, il est également possible de définir ces nouveaux attributs sur <em>false</em> pour indiquer que l’opération ne prendra aucune entrée ni aucune sortie. Ces nouveaux attributs sont automatiquement pris en compte par tous les sous-systèmes d’API Platform, incluant GraphQL, Hydra et OpenAPI.</p><p><a href="https://api-platform.com/docs/core/dto/">Découvrez et améliorez la documentation relative au DTO.</a></p><h3>Cache HTTP headers</h3><p>Un moyen simple de configurer le <a href="https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching">cache HTTP</a> par ressource a été ajouté par <a href="https://silverback.is/">Daniel West</a> :</p><pre>use ApiPlatform\Core\Annotation\ApiResource;<br><br>/**<br> * @ApiResource(cacheHeaders={&quot;max_age&quot;=60, &quot;shared_max_age&quot;=120})<br> */<br>class Book<br>{<br>    // ...<br>}</pre><p>Avec cette configuration, API Platform générera automatiquement l’en-tête HTTP Cache-Control suivant : <em>Cache-Control: max-age = 60, public, s-maxage = 120</em>. Un grand merci à Daniel !</p><p><a href="https://api-platform.com/docs/core/performance/">Lisez et améliorez la documentation des en-têtes de cache HTTP.</a></p><h3>Sunset HTTP header</h3><p><em>Le header de réponse HTTP Sunset indique qu’une URI peut très certainement ne plus répondre à un moment spécifique dans le futur (</em><a href="https://tools.ietf.org/html/draft-wilde-sunset-header-10"><em>draft-wilde-sunset-header Internet Draft</em></a><em>)</em>.</p><p>Cet en-tête fonctionne bien avec <a href="https://api-platform.com/docs/core/deprecations/">le mécanisme de dépréciation</a> disponible depuis API Platform 2.3. Grâce au travail de <a href="https://github.com/blanky0230">Thomas Blank</a>, il est maintenant facile de définir cet en-tête à l’aide de API Platform :</p><pre>namespace App\Entity;<br><br>/**<br> * @ApiResource(itemOperations={<br> *     &quot;get&quot;={<br> *         &quot;deprecation_reason&quot;=&quot;Retrieve a Book instead&quot;,<br> *         &quot;sunset&quot;=&quot;01/01/2020&quot;<br> *     }<br> * })<br> */<br>class Parchment<br>{<br>    // ...<br>}</pre><p><a href="https://api-platform.com/docs/core/deprecations/">Découvrez et améliorez la documentation.</a></p><h3>Générateur de client amélioré</h3><p>API Platform 2.4 est livré avec une version améliorée des générateurs de clients React et Vue.js :</p><ul><li>Les relations sont maintenant toujours traitées correctement</li><li>Les champs HTML de type nombre ainsi que les listes (arrays) sont convertis avec le type JSON approprié lors de leur envoi à l’API</li><li>Les API non serveur à la racine du domaine (comme / api) sont maintenant supportées (grâce à <a href="https://github.com/Fabious">Fabien Kovacic</a>)</li></ul><h3>Aidez-nous à promouvoir API Platform !</h3><p><a href="https://github.com/api-platform/api-platform/releases">API Platform 2.4 est disponible sur GitHub</a>. Aidez-nous à améliorer continuellement ce projet en y contribuant. Vous pouvez également lui donner une étoile sur Github ou suivre Webby sur <a href="https://twitter.com/ApiPlatform">Twitter</a> !</p><p><em>Originally published at </em><a href="https://les-tilleuls.coop/fr/blog/article/api-platform-2-4-beta-mongodb-elasticsearch-mercure-symfony-messenger-et-bien-plus"><em>les-tilleuls.coop</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=381c1a479053" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API days 2018 summary]]></title>
            <link>https://medium.com/@coopTilleuls/api-days-2018-summary-d2822685d74c?source=rss-ae3c3fd0683f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2822685d74c</guid>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[community]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Les-Tilleuls.coop]]></dc:creator>
            <pubDate>Thu, 20 Dec 2018 13:07:33 GMT</pubDate>
            <atom:updated>2018-12-21T12:07:54.913Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Part of our team was at</strong> <a href="https://www.apidays.co/paris"><strong>APIdays conference</strong></a><strong> last week</strong>. <a href="https://twitter.com/cecilehamerel">Cécile Hamerel</a>, <a href="https://twitter.com/gheb_dev">Grégoire Hébert</a>, <a href="https://twitter.com/Olenancker">Olivier Lenancker</a>, <a href="https://twitter.com/pborreli">Pascal Borreli</a>, Thomas Thorez and Arnaud Oisel were present to take care of the stand, meeting and engaging conversations with visitors curious about <a href="https://api-platform.com/">API Platform</a>, <a href="https://masterclass.les-tilleuls.coop/">Master Classes</a> and <a href="https://les-tilleuls.coop/fr">Les-Tilleuls.coop</a> or to attend the numerous talks of the venue. <a href="https://twitter.com/dunglas">Kévin Dunglas</a> presented <a href="http://mercure.rocks/">the Mercure protocol</a>. We even had the chance to meet <a href="https://twitter.com/Pandora_angora">Caroline Chuong</a> who will join our company in January.</p><p>The venue was at the beautiful Beffroi de Montrouge, south of Paris.</p><p>The spectrum of subjects was quite broad. It went from ethics in software, API design, specification, security, authentication and management to digital identities, Open API, GraphQL, microservices, event-driven APIs and much more.</p><p>There were 4 to 5 tracks a day and 3 workshop rooms so it was impossible to see everything. The main themes we were able to attend were about :</p><ul><li>Consumer First</li><li>REST, Open API and GraphQL</li><li>Microservices</li><li>Event-Driven APIs</li><li>Ethics in software</li></ul><h3>Consumer First</h3><p>This subject was first evoked by Paolo Malinverno (Gartner) during his opening talk <strong>“The state of the API industry”</strong>. He talked about mega trends that APIs allow such as enabling new user interactions, open banking or artificial intelligence APIs, privacy and culture being the background of all previous things. But foremost he stated that API providers are properly speaking “servers” and they have to “serve” clients. So the clients have to tell the API providers what they need and not the opposite. <strong>So</strong> <strong>we have to start a product from the client’s needs and not from the API</strong>.</p><p>It was developed in the talk given by Ankit Sobti (Postman Inc) named <strong>“Effective Consumer-Driven Contracts”</strong>. He made the remark that end-to-end tests are not possible as microservices tend to be too complex (dependency hell). So how can we possibly know when the contract between a consumer and a provider is broken? He suggested that the consumer should be setting the contract. The provider then tests that the right contract is given to all the consumers. So they are basically interfaces tests. This kind of tests was also evoked in one of the talk of Phil Sturgeon (more details in the next section). <strong>Logic tests should be undertaken by unit tests in each microservice.</strong> Tools that can help with that are <a href="https://pact.io/">Pact Foundation</a> and Postman.</p><h3>REST, Open API and GraphQL</h3><p>Is GraphQL a replacement for REST or is it complementary? Should we write API documentation or specification? What is the difference?</p><p>During his speech <strong>“WeWork Open API Specification Workflow”</strong>, Phil Sturgeon (WeWork) talked about the workflow his company uses to specify their APIs and good practices we can borrow.</p><p>We should not mistake API Documentation for API Specification. <strong>According to him API documentation is static whereas API Specification evolves with the code after modifications.</strong> API specifications are written with Open API and JSON Schema for example and you can confirm that your code conforms to the specification by contract testing (see previous section). Once the specification is written, it just so happens, almost for free, to render as documentation. For this purpose, he suggested to use the very good tool <a href="https://github.com/Rebilly/ReDoc">ReDoc</a>.</p><p>He stressed that <strong>we should adopt a Design-First approach</strong>, which means focusing on writing the API specification before starting anything else. At WeWork they provide the API specification directly in JIRA so that the developer can start coding directly.</p><p>He suggested other tools to use:</p><ul><li><a href="https://swagger.io/tools/swagger-inspector/">Swagger Inspector</a> to test and document legacy APIs</li><li><a href="https://www.apimatic.io/transformer">APIMatic transformer</a> (integrated in <a href="https://learning.getpostman.com/docs/postman_pro/integrations/apimatic/">Postman</a>) to export your API description to any format, including Open API</li><li><a href="https://stoplight.io/">Stoplight.io</a> or <a href="https://www.apicur.io/">Apicur.io</a> : GUIs for Open API</li><li><a href="http://speccy.io/">Speccy.io</a> for linting</li></ul><p>For tests, to check that the API corresponds to the Open API, they use JSON Schema. What JSON Schema and Open API are good at :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*CE9C3u3BS3WlJryyYvsSlw.png" /></figure><p>So they use JSON Schema for data model validation and Open API for service model validation.</p><p>JSON Schema can be returned by the API in a “Link” header, linking to the JSON Schema and allowing the client to validate.</p><h3>We saw two talks about <strong>GraphQL</strong></h3><p><strong>“GraphQL at GitHub: Building a Platform for Everyone”</strong> by Nick Van Wiggeren (GitHub), was a retrospective on the journey of GitHub from REST API to GraphQL.</p><p>Their first API appeared in 2008, the latest version of their REST API (v3, JSON only) appeared in 2011. They had their first proof of concept with GraphQL in March 2016 and released the final version of their GraphQL API in May 2017. So it was a quite fast transformation.</p><p><strong>One of the reason they chose to open a GraphQL API was because they found that their API responses were overflowed by hypermedia links, with only few information at the end of the response body.</strong></p><p>And over time if someone needed a new resource, it had to be added to the API, making the response even more overflowed by hypermedia.</p><p>APIs always have tradeoffs and GraphQL just offers different ones. It does not replace REST.</p><p>They found that <strong>GraphQL was good to involve clients to build on top of their API</strong>. Nick gave multiple examples of applications that have been built on top of the GraphQL API such as <a href="http://www.githawk.com/">GitHawk</a>.</p><p>The public GraphQL API is only a part of their transformation, the GraphQL API powers their REST v3 API, <a href="https://github.com/">github.com</a> and some other internal tools.</p><p>They have around 500M GraphQL requests per day.</p><p>About the challenges, they found that updating an existing API to GraphQL is difficult. It’s like adding types to an untyped code. Building the right API for multiple different consumers is hard. The GraphQL schema they had to create is quite complicated.</p><p>He gave much advice to create a GraphQL API. One of them is to establish best practices early. They also used a bot, <a href="https://github.com/cap-collectif/graphql-doctor">GraphQL Doctor</a>, to check that Pull Requests updating the GraphQL schema didn’t make any breaking changes. We should focus on the developer experience, so that they want to use our GraphQL API. They documented breaking changes, making changelogs after new releases of their GraphQL API. They have a GraphQL explorer so that consumers can explore their schema easily. Performance is tricky with GraphQL and we should pay great attention to it. Interoperability is important, for example by having the node id in the REST API responses.</p><p>I personally was expecting more insight on the difficulties they encountered. If he had more time I am sure he would have talked about it.</p><p>In his talk, <strong>“Secure and manage APIs with GraphQL”</strong>, Ozair Sheikh (IBM) states that GraphQL switches the complexity from consumers to the provider. It provides an alternative query-based approach, optimized for data-intensive operations.</p><p>A GraphQL API is likely to be more expensive than a REST one since a GraphQL transaction may invoke multiple backends. It’s important to implement throttling and rate limits. Having a good GraphQL management policy, to check the security of each query and check that it will not take too much resources. We should detect and reject requests with complex nesting, pre-calculate loads to determine if query will overwhelm backends. GitHub GraphQL API uses a point system to individually calculate cost for different query parameters.</p><p>He talked about the monetization of a GraphQL API. Since it might be easier to use for a consumer and more resource intensive, the consumer could be enforced to pay more to be able to use this API.</p><p>I wasn’t able to attend the talk “Improving the developer workflow with GitHub’s public GraphQL API” by Brian Douglas (GitHub) but it seemed interesting, if anyone attended, I would be glad to have some feedbacks.</p><h3>Microservices (&amp; service meshs)</h3><p>In his speech <strong>“Taking A Break From Dodgy Dependencies”</strong>, Phil Sturgeon talks about network calls between services. We often hope for the request to happen well. But it might not be the case. A thread on a service node could take a little bit longer than usual and take extra resources. As a result other threads on the same node might fail because of this. The entire node might go down because of this. To counter this, we should at least use timeouts so that requests don’t last too long. He explains how to choose the right timeout based on existing logs. And we should not necessarily use the highest request duration. Then we should use retries to perform multiple times requests if they failed. He also explains the concept of circuit breaker : if we notice that a service is not working, we stop calling it unnecessarily for a while, before retrying later when it’s fixed. This avoids blocking thread, taking too many resources, etc… It is possible to abstract this practice in a service mesh. They basically abstract all interactions with the distributed system network from the service programmer.</p><p>He also talked about circuit breaker for the frontend. For example, we could have a “map” button, which calls a “map” service to display a “map” view. But if this service does not respond, we could hide this button to the user, leaving only the “list” view, and display it again later once the service is fixed. I don’t know if this is a really good UX choice but apparently some company use this.</p><p>About mesh, I could not attend the presentation of Laurent Doguin called “What a Mesh!” but it seemed pretty interesting.</p><p>In his talk, Cesare Pautasso (USI Lugano) asked the question <strong>“How do you backup and consistently recover your microservice architecture?”</strong>. He explained the BAC theorem which is that when Backing up a microservice architecture, you cannot have both Consistency and Autonomy. You either stop all your services at the same time and have Consistency but no Autonomy. Or you choose Autonomy over Consistency but risk losing data. Lack of Autonomy is less bad than lack of consistency, because you can still retry requests if they fail but you cannot recover lost data.</p><h3>Event-Driven APIs</h3><p>Another hot topic was event-driven APIs. I could not attend the talk <strong>“Event-Driven APIs”</strong> from Eric Horesnyi but would be glad to have a recap if someone reading this attended.</p><p>A speech of Kévin Dunglas <strong>“Deliver API Updates in Real Time with Mercure.rocks”</strong> in which he explains Mercure, a protocol allowing to push data updates to web browsers and other HTTP clients. It has similarities with WebSocket, except that WebSocket is not compatible with HTTP/2, does not have built-in authentication, reconnection or state reconciliation mechanism. <strong>Mercure has all this built-in.</strong> If you are french-speaking <strong>you can watch </strong><a href="https://youtu.be/oc2GUMJtd3M?t=5797"><strong>this talk</strong></a><strong> to learn more</strong>, otherwise you will need to wait for the API days video to be released.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*K-wBeVDAdne3d-6Ha-COKg.png" /></figure><p>Fran Mendes talked about<strong> “Async API”</strong> which is an RFC specification, like Open API but for async/message-driven APIs. It’s not dependant on a specific technology, however some part of the specification depends on the protocol used. Will it support Mercure protocol ?</p><h3>Ethics in software</h3><p>The most interesting talks to me were about ethics in software. They were the first and last talks of the conference.</p><p>Tariq Krim (Dissident.ai) opened the conference with<strong> “Principle for the Slow Web, an ethical approach for building software”</strong>. To stress the importance of software nowadays, he reminded us how the US decided to invest a lot of money on the development of Internet during the late twentieth century while Europe was investing on clean diesel. Which should explain partly why Europe is late nowadays in every field, not only on Internet. Software is everywhere nowadays. So software engineers are writing the future (it reminded me a speech of Joel Spolsky, also saying that “developers are writing the script for the future”). So we need to decide which society we want to live in. What do we want? Do we want to be governed by technology? He mentioned <strong>three important rules according to him : Transparency, No Manipulation and Privacy.</strong></p><p>Stéphane Bortzmeyer (AFNIC) talked to us about <strong>“Internet and human rights”</strong>. We often think that we work on practical stuff and politics does not concern us. Stéphane stated that what affects the internet will affect everyone, because we use internet everyday for everything, quoting the famous Uncle Ben : <em>“With great power comes great responsibility”</em>. Software is behind every activity. So politics of software is important. There is no “purely technical” decisions. He gave the example of the IETF (Internet Engineering Task Force, the standard organisation of Internet protocols) which was for a long time only “technical”, and that created the HRPC group (Human Rights and Protocol Considerations). Their work lead to the RFC 8280, a must-read according to Stéphane.</p><p>In practice what does it mean for us ? What should we do ? He gave few examples. Like personal data collection. Eventually every database will leak or has the potential to. So it’s important to minimize the data we collect (only the birth year, not the full birth date for example). He reminded personal data does not have to contain a name necessarily. As soon as there is an ID (like an IP address) that can lead to a single person, it’s personal data. So logging is personal data. Don’t keep logs too long. Do you need the full IP address or can you keep only a prefix ? He promoted his book “Cyberstrutures” talking about all that with more details.</p><p>My favorite talk was from Jean-Marc Jancovici<strong> “Our global IT system, energy saver or climate destroyer?”</strong>. He started with the fact that most people do not know what energy is. For most of people, energy is an electricity or gas bill. But it is not, it is what drives <strong>every</strong> physical change. And everything that we use nowadays comes from a physical change. The chairs we are sitting on, the computer we use, clothes we wear, … everything. <strong>The production of our way of living, of everything that we use in our everyday life, is expressed by the GDP</strong>. And this production is driven by machines which are fed with energy. That energy mainly comes from coal, oil and gas. Therefore we expect a correlation between the GDP and oil production and that is what is actually observed. So given the amount of CO2 emitted by coal and oil, <strong>currently it is not possible to have a GDP growth and a CO2 emissions limitation.</strong></p><p>Jean-Marc Jancovici is more than skeptical about computers. They are based on rare earths which we cannot recycle given the very small amount present in each device. And given that everything nowadays is driven by computers, it seems to be more a problem than a solution. If we shut down all computing power in a second for example, we could not extract oil or coal anymore, cars would not work anymore, etc… We would be carbon neutral.</p><p>The talk was finished. Jean-Marc Jancovici began his speech twenty minutes late. The talk was an hour and a half long instead of fifty minutes. Still very few people left and all remained sit at the end not knowing what to say.</p><p>A few questions were asked, like <em>“What should we do now ? Should we quit IT and grow potatoes ?”</em>. He replied : <em>“</em><strong><em>You should explain to people the problem because most people are not aware of it or think they know but mix up concepts which leads to false conclusions. Also change diet</em></strong><em>”</em>. Another question was “<em>I have money, where should I invest it ?</em>”. The answer was : “<strong><em>In education, in what brings people closer to the food they can grow, without intermediate machines.</em></strong>”</p><p>If you want to know more The Shift Project (a think-tank Jean-Marc is a member of) has released a report last month : <a href="https://theshiftproject.org/wp-content/uploads/2018/11/Rapport-final-v8-WEB.pdf"><strong>Lean ICT (Information and communications technologies): for a digital sobriety</strong></a>.</p><h3>Conclusion</h3><p>The conference was broad enough so that you could find a topic you didn’t know about. It could have been a little bit more technical on some topics but I guess that the twenty five minutes format was too short for that. We wished we had more time to change tracks as well. Overall it was a good conference. Thanks to the organizers. The talks on ethics were interesting to remind IT people that progress is interesting but it is important to keep others and our environment in mind while we work. This is an important part of our values at Les-Tilleuls.coop.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2822685d74c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SymfonyCon Lisbon summary]]></title>
            <link>https://medium.com/@coopTilleuls/symfonycon-lisbon-summary-a4657f5f1d8f?source=rss-ae3c3fd0683f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4657f5f1d8f</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[symfonycon]]></category>
            <category><![CDATA[symfony]]></category>
            <dc:creator><![CDATA[Les-Tilleuls.coop]]></dc:creator>
            <pubDate>Wed, 12 Dec 2018 12:00:00 GMT</pubDate>
            <atom:updated>2018-12-19T09:52:04.155Z</atom:updated>
            <content:encoded><![CDATA[<p>Find the original version of this article <a href="https://gregoirehebert.github.io/php/symfony/events/2018/12/12/SymfonyCon-Lisbon-2018.html">here</a>.</p><p>As every year, is beginning the SymfonyCon! Let’s review the highlights of this huge conference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*w_Us0HOQhyqf3oKNFeLTww.png" /></figure><h3><strong>We started this huge conference with Fabien Potencier’s keynote.</strong></h3><p>So first question asked, what are your dev server environment? The state is that every one of these are difficult to maintain and you want a fast and convenient way to develop and deploy. When you are using your PHP built-in server there is only one connection at a time, no HTTP2, no SSL, etc. Well a new Symfony binary is now available. It’s coming along with the SymfonyCloud platform offer and has no dependency (even PHP). It comes with a lot of new shortcuts to test in a local environment. It now uses php-fpm when available otherwise fastcgi , http2, http/2 Push HTTP Preload and works with any PHP project. It manages multiple versions of PHP, because usually you have multiple versions on your computer. It is fully integrated with Symfony Cloud. The expectation is, if you can manage to make your project work in your local environment, you should be able to make it running in your hosted environment without any other ops configuration.</p><p>Here are some console commands:</p><ul><li>symfony local:php:listallows you to find which versions of PHP you can use. If you want to change, just set a .php-version file in your project root directory containing the version you want to use. You can create a php.ini file on your project root directory if you want to specify some configuration only for your current project.</li><li>symfony server:log to tail your logs. They are parsed and converted into json. This way you can have something way cleaner on your console. If your project is using TLS (and if not it should) you should have it in your development environment.</li><li>symfony ca:install creates for you a certificate for localhost / 127.0.0.1 / …, registers it in Firefox for you. You’ll be able to find them in ~/.symfony/certs. So from now on you’ve got HTTPS in no time.</li><li>symfony proxy:start is meant to help you if you are running with specific domain names, subdomains names. It works with the next command.</li><li>symfony proxy:domain:attach example.com --dir=/some/dir by default it’s supporting .wip tld. You can run with symfony run different commands in the server. Add -d and you have it in background.</li><li>symfony env:create some-bug opens a branch in local.</li><li>symfony open:remote copies your production env in a new url.</li><li>symfony log allows you to check your logs and Symfony debug allows you to switch in dev mode.</li><li>symfony tunnel:open allows you to work locally with your debug environment database freshly created.</li></ul><h3>Tobias Nyholm is replacing Michelle Sanver to talk about graphs</h3><p>Unfortunately we could not attend to Michelle’s talk about workflow in e-commerce websites. Anyhow, Tobias has showed us once again the almighty power of graphs and that you can always think of a workflow for your actions. We can assist at an already seen but always nice to hear talk of how the workflow component works and how you can leverage its power in the best ways. Definitely a component you should take a look at if you did not already.</p><h3>Next speaker I’ve seen is Samuel Rozé with the Messenger Component</h3><p>Samuel already did some talks about Messenger in the past. The first one was 6 months ago. What happened in 6 months? Well, the real troubles start when your Open Source project is released and used in real projects, and mostly when it is used on any other project than yours. In 6 months new needs emerged and a lot of new possibilities were added in the meantime. Ok, now, what is the Messenger component about? If you want to add some structure separation in your code. Let’s say cqs pattern or hexagonal pattern, you definitely need a way to let your different domains to be able to speak to each other. But you don’t want to have any strong bounds between them. Messenger is the kind of component you would use. Whether you use a monolithic application or a micro-services based application does not matter. It has been designed to be used with different services and even with some message queues (rabbitmq, kaf, etc). I strongly recommend you to give it a try !</p><h3>The first speaker in the afternoon is Nicole Cordes and will present static php analyses tools.</h3><p>If you want to improve drastically your code base, its quality, its maintainability and avoid some basics mistakes, there are some tools for you. Nicole is giving us a full tour. The first one is PHPSTAN. This tool is able to analyse your code and detect according to different levels of configuration the flaws in your code, starting from bad methods or variable usages and declarations to bad architectural designs. Second one is PHPMD. This one allows you to analyse your code structure and extract some measurements. Third one is Code Climate, to grab for you the number of lines of codes and it’s complexity. Although I would recommend using PHP Metrics, which is in my opinion more complete. One cool thing of code climate is that it has some integration with most of CI systems. Next one is SonarCloud. If it happens that you already know Sonar Cube this one is the saas version. It allows you to find flaws in your code complexity. I would add myself some names to this, as for example php-cs-fixer, and symfony security checker.</p><h3>Jordy Borgiano is bringing to us his experience about servers availability.</h3><p>Developers and technical teams usually don’t feel any side effect concerning latency or availability. Indeed you often work on a private environment which is not reached by thousand of persons, because sometimes (usually?) they use servers in the same geographical region. Their customers in the other hand can be disappointed when it comes to crossing an ocean. The solution can be to scale up you architecture but you should do it with some minimal intelligence, for instance you can start using a CDN which can serve your data from different regions.</p><h4>First iteration</h4><p>The use of Terraform with AWS + Redis sessions. The architecture is simply one primary region which is used for write, and read were handled by replicas. But it was quite slow.</p><h4>Second Iteration</h4><p>Came with the idea of proxying the write requests from the local replica to primary region session forwarded in HTTP headers. Client IP forwarding using proxy headers in HTTPS and VPC peering for security. Of course with signed request/response. Finally a failover to replica processing if proxying fails. Problem is the proxies had to create a new connection every time. Which were slowing down the process, but creating connection pooling is a workaround. Downsides are that network sometime fails random requests, as well with AWS ELB which somehow times out on random requests. Session size is limited in headers, and if the primary is down, it only leaves you read-only capabilities. With this solution you could achieve 99,5% availability with a TTFB of 120ms. To achieve a 100% (is it possible?) you could think of having a multi master postgres/mysql network.</p><p>Nice to see some real use cases of multi-region architecture.</p><h3>Next topic is API Platform with Antoine Bluchet</h3><p>This time it’s not Kévin Dunglas who is talking about api-platform but Antoine. You might already know api-platform, maybe you even used it on a project. But here Antoine is demonstrating that you can leverage a lot of Symfony component into api-platform. For instance the Workflow component or the Messenger component. With the help of Symfony 4 and recipes, you have almost nothing to do. Everything is pre-configured, you only need to tweak the configuration to fit your needs. After seeing a demonstration of a pizza delivery system with these two components, the thing to have in mind is: do not get stuck only with a solution when you can combine them.</p><h3>It’s now time to talk about Webpack Encore</h3><p>Ryan Weaver is the creator of Encore. This tool combines the best of two worlds, meaning you can now use your favorite Javascript framework with Symfony. The component lets you define a webpack configuration in no time. Ryan gave us the best practices, such as making your CSS a dependency of your app, making each component independent and creating one entry that is included in your layout per component. Definitely a great tool!</p><h3>Last talk I’ve seen is one from Kévin Dunglas about Mercure</h3><p>Mercure is a protocol allowing to push data updates to web browsers and other HTTP clients leveraging the strength of HTTP2, (which websocket can’t and won’t do), bringing to you a secure and fast multiplexed pub/sub system. Kévin did a demonstration through a application available at <a href="https://gregoirehebert.github.io/php/symfony/events/2018/12/12/symfonycon.les-tilleuls.coop">symfonycon.les-tilleuls.coop</a> which is a joined-in clone where you can comment and rate talks during a conference and interact by pushing smiley buttons. These buttons would trigger an animation that you can see on every screen subscribed to the mercure hub. A tool to keep an eye on!</p><p>See you on next conference!</p><p><em>Originally published at </em><a href="https://gregoirehebert.github.io/php/symfony/events/2018/12/12/SymfonyCon-Lisbon-2018.html"><em>gregoirehebert.github.io</em></a><em> on December 12, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4657f5f1d8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DotJS 2018 : on y était !]]></title>
            <link>https://medium.com/@coopTilleuls/dotjs-2018-on-y-%C3%A9tait-90c409bc42c?source=rss-ae3c3fd0683f------2</link>
            <guid isPermaLink="false">https://medium.com/p/90c409bc42c</guid>
            <category><![CDATA[js]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[dotjs]]></category>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Les-Tilleuls.coop]]></dc:creator>
            <pubDate>Thu, 15 Nov 2018 14:39:08 GMT</pubDate>
            <atom:updated>2018-11-15T14:39:08.652Z</atom:updated>
            <content:encoded><![CDATA[<h3>DotJS 2018 : on y était !</h3><p>Nous avons eu l’opportunité d’assister la semaine dernière à la <a href="https://dotjs.io/">DotJS</a>, <strong>la plus grande conférence JavaScript d’Europe et nous n’en sommes pas sortis déçus !</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*Tofz39w5rhRtZfZXteZjvw.png" /></figure><p>Une chose importante à souligner :<strong> l’événement affichait cette année</strong> <strong>un bilan carbone neutre</strong>. Cela signifie que l’équipe organisatrice a fait son maximum pour réduire les émissions de dioxyde de carbone (causées par les transports, le matériel, etc.) tout en compensant les émissions restantes. <a href="https://nbviewer.jupyter.org/github/dotconferences/dotjs2018-carbon-footprint/blob/master/dotJS%202018%20Carbon%20footprint.ipynb">Consultez leur calculateur pour plus de détails</a>.</p><p><strong>Plus d’un millier de personnes avait fait le déplacement</strong> <strong>au Dock Pullman</strong> pour écouter des grands pontes de ce langage de programmation. Passons en revue les conférences phares de cette journée.</p><h3>Sacha Greif — State of JS</h3><p><a href="https://twitter.com/sachagreif">Sacha Greif</a> a ouvert le bal en nous montrant l’état de JavaScript en 2018 avec l’aide de <a href="https://stateofjs.com/">State of JS</a>, une étude où plus de 20 000 développeurs ont donné leurs opinions sur des frameworks ou bibliothèques <em>front-end</em>. Les résultats montrés en avant-première sont sans appel :</p><ul><li><strong>Les bibliothèques </strong><a href="https://reactjs.org/"><strong>React</strong></a><strong> et </strong><a href="https://fr.vuejs.org/index.html"><strong>Vue</strong></a><strong> plaisent de plus en plus aux développeurs</strong> qui expriment fortement leur satisfaction à leurs égards.</li><li><a href="https://angular.io/"><strong>Angular</strong></a><strong> est beaucoup moins en vogue</strong> : une grande majorité des personnes sondées veulent changer de framework après l’avoir utilisé dans un projet client.</li></ul><p>Vivement décembre que l’on puisse consulter l’intégralité de l’étude !</p><h3>Tobias Ahlin — Minecraft</h3><p><a href="https://twitter.com/tobiasahlin">Tobias Ahlin</a> (développeur chez Mojang) a annoncé que <a href="https://minecraft.net/fr-fr/">Minecraft</a> avait récemment décidé de faire fonctionner son interface en JavaScript, suite aux difficultés rencontrées à développer sur une multitude de plateformes différentes. Contrairement à ce que beaucoup pensent, <strong>il est possible de construire des interfaces avec JavaScript dans les jeux vidéos </strong>: la preuve, l’interface de Battlefield 1 est faite en React ! Il utilise également <a href="https://framer.com/v/?utm_expid=.Zv0qVEVCTO2oVsWJt1rDfA.1&amp;utm_referrer=https%3A%2F%2Fwww.google.fr%2F">FramerX</a>, un outil de design interactif très prometteur.</p><p>Il a également ajouté que <strong>tout le monde pourra contribuer à Minecraft grâce à Javascript</strong>, que ce soit pour faire des nouvelles UI ou des <em>mods</em>. Consultez la préversion de la doc pour en savoir plus sur son projet : <a href="https://minecraft.gamepedia.com/Bedrock_Beta_Script_Documentation">https://minecraft.gamepedia.com/Bedrock_Beta_Script_Documentation</a>.</p><h3>Lauren Tan — Typing in JS</h3><p><a href="https://twitter.com/sugarpirate_">Lauren Tan</a>, de chez Netflix, nous a recommandé l’utilisation de <a href="https://www.typescriptlang.org/">Typescript</a> à travers sa présentation. Après nous avoir rappelé quelques défauts de JS (tomber sur l’erreur <em>undefined</em>, <em>NaN is a number</em>…), elle nous a donné quelques conseils :</p><ul><li>Moins de cardinalités = réduisons le champ des <em>inputs</em> et <em>outputs</em> possibles.</li><li>Être précis avec les types (exemple : un type <em>null</em> plutôt que <em>undefined</em>).</li><li>Être pragmatique.</li></ul><p>Conférence complexe mais très intéressante !</p><h3>John Papa — Choosing your framework</h3><p>On ne présente plus <a href="https://johnpapa.net/">John Papa</a>, spécialiste JavaScript et devOps mondialement reconnu. Sa conférence était axée sur le feeling que l’on peut ressentir face à la diversité des frameworks JS existants. Selon lui, <strong>il n’y a pas un framework meilleur qu’un autre</strong> : c’est à nous de déterminer avec lequel on se sent le plus à l’aise.</p><p>Exemple de mise en pratique : il a créé le même projet avec les 3 grands frameworks suivants : <a href="https://github.com/johnpapa/heroes-react">React</a>, <a href="https://github.com/johnpapa/heroes-vue">Vue.js</a> et <a href="https://github.com/johnpapa/heroes-angular">Angular</a>. Le résultat est identique pour tous, mais son ressenti était différent avec chacun d’entre eux. Excellente conférence donnée par un excellent orateur !</p><h3>2 Lightings talks sortis du lot</h3><ul><li><strong>Gimme your content, Punk!</strong> <a href="https://twitter.com/jeremenichelli?lang=fr">Jeremias Menichelli</a> nous a montré comment charger des <em>fonts</em> sans bloquer l’affichage lorsque le réseau est lent (grâce à FontFaceObserver)</li><li><strong>Leveling your debugging skills </strong>: <a href="https://twitter.com/adamweeks">Adam Weeks</a> a fait une démo sur comment bien débugger avec l’inspecteur Chrome</li></ul><h3>Felix Rieseberg — Javascript for desktop</h3><p><a href="https://twitter.com/felixrieseberg">Felix Rieseberg</a> est revenu sur comment optimiser les applications qui peuvent consommer inutilement de la mémoire et nous a montré quelques cas d’usage sur comment y procéder (cesser tout processus lié à la vue de la fenêtre lorsque celle-ci est cachée par exemple).</p><h3>Myles Borins — Promises</h3><p><a href="https://twitter.com/mylesborins">Myles Borins</a> de chez Google a expliqué tout le processus de validation pour qu’une nouvelle fonctionnalité arrive dans Javascript. La fonctionnalité à l’étude en ce moment (et en cours de <em>draft</em>) est le fait de pouvoir se servir des <em>await</em> hors du scope d’une fonction <em>async</em>.</p><p>Un énorme merci et bravo aux organisateurs·trices de cet événement ! Mention spéciale à l’excellent <em>host</em> <a href="https://twitter.com/porteneuve">Christophe Porteneuve</a>. On regrettera peut être le manque de <em>live coding</em> ou d’exemples vraiment concrets et applicables dans notre travail de tous les jours mais <strong>on ne peut pas nier qu’on sort de la dotJS grandi et surmotivé</strong>. Rendez-vous l’an prochain !</p><p><em>Originally published at </em><a href="https://les-tilleuls.coop/fr/blog/article/dotjs-2018-on-y-etait"><em>les-tilleuls.coop</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90c409bc42c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>