<?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 Edoardo Cavazza on Medium]]></title>
        <description><![CDATA[Stories by Edoardo Cavazza on Medium]]></description>
        <link>https://medium.com/@edoardo.cavazza?source=rss-8bcbb22ef6f1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1OqnBjlJhCicLTSFQQs8Pg@2x.jpeg</url>
            <title>Stories by Edoardo Cavazza on Medium</title>
            <link>https://medium.com/@edoardo.cavazza?source=rss-8bcbb22ef6f1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 20:29:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@edoardo.cavazza/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[The craft of component design]]></title>
            <link>https://medium.com/chialab-open-source/the-craft-of-component-design-50b158a618b6?source=rss-8bcbb22ef6f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/50b158a618b6</guid>
            <category><![CDATA[design-teams]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[web-components]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[agile]]></category>
            <dc:creator><![CDATA[Edoardo Cavazza]]></dc:creator>
            <pubDate>Tue, 07 Jul 2020 06:28:26 GMT</pubDate>
            <atom:updated>2020-07-07T13:44:30.150Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to design a component library that scales with projects, designers and developers?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PTG3IF6iOL1qIUeX.png" /></figure><p>The success of an application is not a question of technology, libraries or frameworks. In the user’s eyes, it is not the technical aspects that make the difference, but the quality of the experience and the interface. So, it is essential that everyone who is involved in developing a product can work to the best of their abilities and bring their own culture and sensitivity to the party. Creating an environment specifically structured to encourage designers and developers to work together is difficult, but worthwhile. This is because allowing these figures to work in brief and iterative cycles on a particular function or product feature optimises the workflow, as well as enhancing its quality. These results can be attained by creating a component-based system. In other words, taking a website or app and breaking it down into reusable elements by defining some or all of its aspects, such as style, semantics and functions.</p><p>Many of the problems that had emerged in our team over the years were solved by shifting to a modular approach and focusing on system consistency. These include the sensation of “danger” when adding a function to a site and the real sense of panic that would arise in the aftermath of a technology update. Releasing updates and improvements has now become much easier thanks to the reusability of the components. And we have become more accurate and efficient in adjusting scripts and styles following transversal technological project alignments. Debugging, optimisation and testing have all been improved too.</p><p>This transformation has not been painless and we have had to experiment widely with different tools, methods and personal relationships. We have made several mistakes along the way and sometimes we have had to first slow down to then achieve important successes remarkably quickly. This article contains a number of insights into how to choose the technologies that best suit your team, as well as explaining how we have built a structure that allows our artisan-style setup to maintain, update and develop websites, applications. Design Systems and Microfrontends with a solid, shared code base, made up of more than one hundred components.</p><h3>The workshop</h3><p><em>Recognising work environment conditions, interpreting the team’s needs and understanding those of the customer. Examples of methodology and moments for sharing.</em></p><h4>Communicating</h4><p>The first and biggest mistake you can make when developing components is to think that all you need is a framework to develop components. Like every method, it’s not enough to apply the rules. You need to combine them with the environment and, above all, the people in it, to obtain a satisfying result from all points of view. Design, development, communication and every area in the workshop play an essential role in making a project successful. This is why they all need to share their needs, solutions and information.</p><p>When communication works properly:</p><ul><li>developers who have a project to implement also know why certain decisions have been taken. They can therefore establish with greater clarity which components need to be created and which improved, as well as planning updates and introducing new tools.</li><li>Designers know how their project will be implemented and can provide specific instructions for certain aspects. They can count on a collection of designed and documented components to create prototypes or system updates.</li><li>Designers and developers know the needs of the customer and not just the results they need to achieve. They are therefore more receptive and more proactive. Both have the expertise to identify weak points in the communication of certain products or the customer’s own image.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CnZHeolL5mjws7Ei.png" /><figcaption>Right from the story-mapping stage, customers can share what they want (in green) with the designer (in magenta) and programmers (in blue), so they can foresee the processes that require an iterative approach, without separating the design phases from the development phases.</figcaption></figure><p>In some environments, where this level of sharing may be difficult between departments and/or smart workers it is essential that the tools adopted are able to overcome communication problems. Everyone who works on a particular project must be able to access the design choice back history quickly and without having to trawl through threads or implementation details.</p><h4>Sharing</h4><p>Moments for sharing are therefore essential not only to solve problems linked to processes, but also to monitor the efficacy of the communication. For teams that already use <a href="https://medium.com/chialab-open-source/becoming-agile-9eff434cd891">Agile methodology</a>, the retrospective plays an essential role in achieving this. It allows the team to collect and manage workflow problems promptly, plan training moments (tech talks, resource and example gathering) and assess the tools that are already in use and the innovations to be added.</p><p>More in general, the use of a framework like <a href="http://"https//www.scrumguides.org/scrum-guide.html">Scrum</a> is strongly recommended for the kind of processes that follow an iterative process with regular release flows to avoid congestion, technological degeneration and centralised skills — the worst enemies of a component system.</p><p>Above all, in the initial trial period, collecting feedback from colleagues is crucial. Moreover, the greater the team spirit, the more solid and effective the system will become. In a certain sense, it can also be said that the quality of the components reflects the stability of the professional relationships between the people who designed and implemented them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TBOZPmIN9ZMKvDMf.png" /><figcaption>During the retrospective, every team member expresses what has worked and what has not (in terms of both process and flow) and at least one action is identified for the next development cycle with the aim of improving the process.</figcaption></figure><h3>Hand, head and experience</h3><p><em>Assessing the talent of individuals, improving the feeling for the project and understanding how the ecosystem works for formulating times, identifying lines of action and assessing solutions.</em></p><h4>Hand</h4><blockquote><em>One of the myths that surround technique is that people who develop it to a high level must have unusual bodies to begin with. As concerns the hand, this is not quite true. […] The fingers can engage in proactive, probing touch without conscious intent, as when the fingers search for some particular spot on an object that stimulates the brain to start thinking.</em></blockquote><p><em>Richard Sennett, The Craftsman, 2008</em></p><p>Just as Sennett presents the craftsman’s hand as expressing talent and sensitivity in the way it recognises the quality and functionality of a material, a developer can set a component code in a way that not only performs the functions it was created for, but also enhances the project thanks to its quality and efficiency.</p><p>Even if it is impossible to possess the technical skills required to handle the entire system of components, the professionals who work on it must share the concepts and functions that govern it, as it is through this knowledge that they can express their talent. Every developer’s key “talent” is therefore linked to the complexity of the computational problem that has to be resolved, but in the capacity to identify a solution to improve the entire project (or in this case, the system of components) by combining the different workshop “areas”.</p><p>A developer who is aware of the design decisions that have been made, can also spot problems before implementing them, just as an expert designer can recognise and find simple solutions to complex technological problems. When designers and developers work together, the quality of the components is drastically improved thanks to a level of sensitivity that covers the entire project and this allow all the details to be implemented in a single cycle. In fact, moving part of the development process to the design phase allows more comprehensive and consistent specifications to be written. Moreover, sharing the competencies that are applied in this phase is also a moment of professional growth for both figures, as it builds both a common vocabulary and a common approach for future projects.</p><h4>Thought patterns</h4><p>Just as there can be different types of components in an interface or application, there can also be multiple implementations. The team must therefore define the structural differences of the possible applications in order to recognise the approach that is most consistent with the system. For example, having adopted the breakdown into atoms, molecules and organisms proposed in <a href="https://bradfrost.com/blog/post/atomic-web-design">Atomic Design</a> (Brad Frost, <em>Atomic Design</em>, 2016), our team identified for each category the aspects to be processed in terms of graphics, navigation, functionality and accessibility:</p><ul><li><strong>Atoms</strong>: are the simplest elements of all, so they are also the most reusable. They do not define specific actions or check whether they have been implemented. Instead, they simply suggest how to interact with the element. In the case of a button, all the states such as focus or pressed are defined, but no click action conduct is linked to it. We generally process this type using only primitive HTML elements (that are accessible by definition). This includes identifying the basic states required to define the component.</li><li><strong>Molecules</strong>: slightly more complex than atoms, these define elements where the type of user interaction is more mapped. Here, too, wherever possible, we use the complex structures in HTML to define micro-templates that implement the rules of accessibility with linear navigation. When we work on a form, we check that the combined use of label and input is correct, and that placeholders and alternative texts for the assistive tools are present. The graphic aspect, on the other hand, is limited to describing the layout of the elements.</li><li><strong>Organisms</strong>: at this level we are pretty sure how the user will interact with the component, so we can set up an alternative form of navigation instead of a linear one, and decide which actions it has to perform. The template will probably be definitive and semi-static, so a remote access programmatic interface must also be designed in order to customise certain aspects with a controlled set of options and properties and a system of events or callbacks so functions can be added.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DbWthass1ESpuSWA0LGvdA.png" /><figcaption><strong>Atoms</strong>: basic elements, semantically defined and with clear interaction. <strong>Molecules</strong>: combine atoms and govern their interrelations. <strong>Organisms</strong>: compound navigable elements that perform specific actions.</figcaption></figure><h4>The experience</h4><p>Thanks to this kind of breakdown, it is easier for designers and developers to understand the functionality and competencies of the component they are implementing. As both formal and structural aspects can be described, in the design phase it is important to define in which contexts the element can be used in, understand how it can evolve from a graphic perspective and where the visual aspect still needs to be defined within the product. All this should be done focusing solely on the element’s functionality. By working on the abstraction of these aspects, the levels of implementation required for each component can be defined and solid, but streamlined foundations can be created for a system that has to evolve rapidly and consistently.</p><p>To implement a calendar view of a series of events, our team worked on creating a basic component made up of one <strong>organism</strong> only that uses <strong>atoms</strong> like labels and buttons and <strong>molecules</strong> like the detail of the event on which the navigation experience needs to be constructed. This then allowed us to insert the component in different sites simply by applying the graphic design rules to the atom elements and streamlining the update and validation process which otherwise would have become too lengthy in situations where the formal aspect was intrinsically combined with the structural one.</p><h3>The tools</h3><p><em>Languages, tools, machines and accessories that help the developer, designer and customer. Useful and essential documentation.</em></p><p>The automatic accessibility and coding style validators that help designers and developers in their daily tasks are extremely useful also in other fields, like training and sharing. They can also be used by the team as a support when changing methodology, for example, in a shift from a top-down flow to an iterative one.</p><p>This is why it is so important that the choice of tools and technology is made within the team who will have to use them. This step requires documentation and freedom of experimentation and method. Sometimes it is worth creating your own tools instead of forcing the team to use one they don’t think is practical. Other times you will need to recognise when problems are caused by a lack of familiarity. And in other situations, again, you may need to lower the functionality or potentiality threshold of these tools to make them even more usable.</p><p>The more a tool is integrated in the process, the more effective it is. When we developed <a href="https://github.com/chialab/dna">DNA</a>, we needed a library to define web components that would not impose a pattern established by other developers, but would be based on our own thought patterns instead. It also had to be versatile, given the mixed nature of the team, and able to evolve in line with our rhythms.</p><h4>Unit tests, visuals and accessibility</h4><p>Using automatic validators, whenever possible, even if implemented at a basic or incomplete level, is a great help for any design/development team. In the special case of component development, the most important tests are those which check that the Application Programming Interface (API) is operating correctly, that the element’s accessibility rules are observed and whether there are any graphic regressions.</p><p>Validators are not only check tools, but sharing and training tools too. Integrating rules regarding the use of a programming language via a linter or setting a required standard of accessibility allow new specifications to be assimilated directly in the work context.</p><p>For example, our team approaches JavaScript language updates via the introduction of new rules for <a href="https://eslint.org/">ESLint</a> in order to acquire at a group level not only how the new syntax works, but also when and why to use it. These rules also help us to construct view templates, even if we have to remember to add the HTML attributes required to improve component accessibility. Semantic and functional checks on the CSS rules are delegated to <a href="https://stylelint.io/">Stylelint</a>, a tool that helps us to reduce mistakes and conflicts in the style sheets, which are otherwise inevitable when working with scores of files in a project. The use of a coding style for both the JavaScript and the CSS parts also improves codebase searches and saves time and energy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vHdjc3pScTOgHLY8d6d_gA.png" /></figure><h4>Practices and automations</h4><p>On one hand, if the results of pair programming are evident in terms of quality in the programming panorama, the practice of working in pairs with a designer is much less common, but just as effective. If you are used to working with different tools, the fact of focusing on a common artefact, whether that is a graphic proposal or the implementation of a component, is a good way of dealing with the formal and structural aspects in their entirety. In the same perspective, choosing a common tool is increasingly more effective than a connection tool that would add a further step and which may become a potential obstacle to communication and sharing.</p><p>To further encourage integration, setting a DevOps flow to automate operations improves the development experience, reduces the risk of mistakes and allows designers to adjust the code more confidently. Even if most of the processes take place in an isolated environment, to run certain checks, you will need to verify the conduct of the component directly in the website. This is why every component constitutes a module that can be unhooked from the entire system to be tested in a <a href="https://medium.com/chialab-open-source/review-apps-with-aws-cloudfront-for-html-js-projects-3bf0b7631bab">validation environment</a> without requiring an update of the entire library. Every time there is a change, the continuous delivery system publishes an updated version of the element on a remote register (in our case NPM) which the validator can access to download the specific version to test. The aim of this mechanism is to reduce manual operations, the risk of mistakes or incompatibility and the time required to perform validation, even when this involves performing an urgent release to solve a problem.</p><p>Pull Requests are another practice that in the long-term brings a number of benefits to the update and maintenance process of a component. Appointing a member of the team to gradually review the consistency of the system improves the interoperability of the elements and simplifies their documentation. Code reviews, function validations and automatic tests are useful for checking that all the acceptance criteria, even the implicit ones, are observed before introducing a change to the component system.</p><h4>Documentation</h4><p>Compiling technical documentation always benefits the team, but doing it for a system of components can also reduce the gap between the designer’s work and that of the developer. Thanks to tools like <a href="https://storybook.js.org/">Storybook</a>, that allow design choices to be integrated with a preview of the element, project access points can be simplified and the risk of misalignment between design and implementation can be avoided.</p><p>Workflow should also be taken into account when choosing the tool for documenting the project. As, if the solution chosen is not integrated with the process it risks deteriorating over time. At the same time, tools whose contents are impromptu and closely linked to context, like Slack and various chats should also be avoided. Some software is useful, however, like <a href="https://www.atlassian.com/software/confluence">Confluence</a> (as it can be integrated with Jira) and <a href="https://basecamp.com/">Basecamp</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AnTK2k4UGaOZ0Zsjx22cMQ.png" /><figcaption>Storybook is a tool that allows you to develop and document web components via the definition of “stories”, or better, predefined element states.</figcaption></figure><h3>Conclusions</h3><p>In the past, the forced separation of design and development imposed the construction of fragile bridges that were difficult to use and which no one wished to cross or fix. Building bridges requires significant investments in both resources and the time taken for these two figures to communicate. But when workshops are set up, the efficiency that sharing brings offers numerous benefits in terms of both time and quality. Today, the work of a developer is still seen only in terms of its engineering input, whereas the role of a designer is often defined as “creative”. Even if these aspects characterise the work of both figures, they are not enough to describe what they bring to a project when they work together. This is demonstrated in its entirety when a component-based development flow is adopted, where the skill of the professionals lies in implementing a solution that is consistent, functional and enjoyable for both users and those working on the project.</p><p>In line with the principles of Agile methodology, component-based development requires design, development and release cycles and brief, carefully targeted tests that seek to improve the product through a genuinely iterative and collaborative approach.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50b158a618b6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chialab-open-source/the-craft-of-component-design-50b158a618b6">The craft of component design</a> was originally published in <a href="https://medium.com/chialab-open-source">Chialab Open Source</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Il mestiere di progettare per componenti]]></title>
            <link>https://medium.com/chialab-open-source/il-mestiere-di-progettare-per-componenti-872965be69b1?source=rss-8bcbb22ef6f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/872965be69b1</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[design-teams]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web-components]]></category>
            <category><![CDATA[web-design]]></category>
            <dc:creator><![CDATA[Edoardo Cavazza]]></dc:creator>
            <pubDate>Tue, 14 Apr 2020 06:48:56 GMT</pubDate>
            <atom:updated>2020-07-07T13:52:06.334Z</atom:updated>
            <content:encoded><![CDATA[<h4>Come si progetta una libreria di componenti che si adatta a progetti, designer e sviluppatori?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PTG3IF6iOL1qIUeX.png" /></figure><p>Il successo di un’applicazione non è una questione di tecnologia, di librerie o di <em>framework</em>: a far la differenza agli occhi dell’utente non sono gli aspetti tecnici, ma la qualità dell’esperienza e dell’interfaccia: è quindi fondamentale che ogni persona che prende parte al processo di sviluppo di un prodotto possa lavorare al meglio e contribuire con la propria cultura e la propria sensibilità. La creazione di un ambiente mirato a strutturare la cooperazione di figure professionali diverse come designer e sviluppatori è un obiettivo tanto auspicabile quanto complesso da raggiungere: permettere a queste figure di lavorare in cicli brevi e iterativi su una singola funzionalità o un determinato aspetto del prodotto non solo ottimizza il flusso di lavoro, ma ne migliora anche la qualità. Questo risultato può essere ottenuto tramite la creazione di un sistema a componenti, ovvero scomponendo il sito Web o l’applicazione in elementi riutilizzabili, definendone alcuni o tutti gli aspetti come stile, semantica e funzionalità.</p><p>Passare a un approccio modulare e lavorare sulla coerenza del sistema ha risolto molte delle problematiche che negli anni si erano manifestate nel nostro team: la sensazione di “pericolo” nell’aggiungere una funzionalità a un sito o il vero e proprio senso di panico nel momento in cui si rendeva necessario un aggiornamento delle tecnologie usate: rilasciare aggiornamenti e miglioramenti è diventato più semplice grazie alla riusabilità dei componenti, così come rimettere mano al codice e allo stile in seguito a un allineamento tecnologico trasversale a molti progetti è diventato più preciso e performante, migliorando anche le nostre pratiche di <em>debug</em>, ottimizzazione e <em>testing</em>.</p><p>Questa trasformazione non è stata indolore: abbiamo sperimentato con strumenti, metodologie e rapporti personali; abbiamo sbagliato più volte strada, a volte abbiamo dovuto rallentare per poi raggiungere grandi traguardi in tempi inaspettati. In questo articolo raccogliamo spunti per migliorare il flusso di lavoro e consigli per scegliere le tecnologie più adatte ai team, raccontando come abbiamo costruito la struttura che ci permette, nella nostra realtà artigianale, di mantenere, aggiornare e sviluppare più di cento componenti, svariati servizi e decine di <em>Web Application</em> con una base di codice solida e condivisa.</p><h3>Il laboratorio</h3><p><em>Conoscere le condizioni dell’ambiente in cui si lavora, interpretare i bisogni dei colleghi e capire quelli dei clienti. Esempi della metodologia e dei momenti di condivisione.</em></p><h4>Comunicare</h4><p>Il primo e più grande errore che si possa fare nello sviluppare componenti è pensare che basti utilizzare un <em>framework</em> per sviluppare componenti: come in ogni metodologia, non basta applicare le regole: bisogna combinarle con l’ambiente e soprattutto con le persone per ottenere un risultato soddisfacente sotto tutti i punti di vista. Design, sviluppo, comunicazione, tutte le aree del laboratorio svolgono la propria funzione determinante per la riuscita del progetto e in quanto tale devono condividere esigenze, soluzioni e informazioni.</p><p>Quando la comunicazione funziona bene:</p><ul><li>lo sviluppatore che ha un progetto da implementare conosce anche le motivazioni per cui sono state prese certe decisioni. Può quindi stabilire con maggiore chiarezza quali componenti vanno creati e quali vanno migliorati, pianificare aggiornamenti e introduzione di nuovi strumenti;</li><li>il designer sa come verrà implementato il proprio progetto e può fornire indicazioni specifiche per alcuni aspetti. Può contare su una raccolta di componenti già progettati e documentati per realizzare prototipi o aggiornamenti al sistema;</li><li>designer e sviluppatore conoscono le necessità del cliente, non solo il risultato che devono raggiungere; sono quindi più ricettivi e propositivi. Entrambi possiedono la competenza per individuare punti deboli nella comunicazione di alcuni prodotti o dell’immagine stessa del cliente.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CnZHeolL5mjws7Ei.png" /><figcaption>Già durante lo <em>story mapping</em> il cliente può condividere i suoi desiderata (in verde) con designer (in magenta) e programmatori (in azzurro), che possono così prevedere le lavorazioni che richiedono un approccio iterativo, senza dividere le fasi di progetto da quelle di sviluppo.</figcaption></figure><p>In alcuni ambienti, dove questa condivisione potrebbe essere resa difficile da dipartimenti e/o lavoro da remoto, è assolutamente necessario che gli strumenti sopperiscano eventuali problemi di comunicazione: chi lavora a un progetto deve avere la possibilità di accedere in maniera rapida allo storico delle scelte progettuali senza perdersi in <em>thread</em> o dettagli di implementazione.</p><h4>Condividere</h4><p>I momenti di condivisione sono quindi fondamentali non solo per risolvere problematiche legate alle lavorazioni, ma anche per monitorare l’efficacia della comunicazione. Per i team che già utilizzano la metodologia Agile, la retrospettiva diventa un momento importantissimo in questo senso: il team può raccogliere e gestire tempestivamente problemi nel flusso di lavoro, pianificare momenti di formazione (<em>tech talk</em>, raccolte di risorse o di esempi) e valutare strumenti già in uso o novità da integrare.</p><p>Più in generale, l’utilizzo di un <em>framework</em> come <a href="https://www.scrumguides.org/scrum-guide.html">Scrum</a> è fortemente consigliato per la natura delle lavorazioni che seguono un processo iterativo con flussi di rilascio periodici, per evitare inceppamenti, degrado tecnologico delle piattaforme e competenze centralizzate — i peggiori nemici di un sistema di componenti.</p><p>Soprattutto nei primi tempi di rodaggio, raccogliere i <em>feedback</em> dei propri colleghi è cruciale: tanto più il team cresce in affiatamento, tanto più il sistema diventa solido ed efficace. In un certo senso, si può dire che la qualità dei componenti rifletta la stabilità dei rapporti professionali tra le persone che li hanno progettati e implementati.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TBOZPmIN9ZMKvDMf.png" /><figcaption>Durante la retrospettiva, ogni membro del team esprime cosa ha funzionato e cosa no (sia dal punto di vista della lavorazione che del flusso) e viene individuata almeno un’azione per il successivo ciclo di sviluppo con lo scopo di migliorare il processo.</figcaption></figure><h3>La mano, la testa e l’esperienza</h3><p><em>Valorizzare il talento del singolo, migliorare la sensibilità al progetto e capire come funziona l’ecosistema per formulare tempistiche, individuare le tipologie di intervento e valutare le soluzioni.</em></p><h4>La mano</h4><blockquote>Uno dei miti che circondano la tecnica è la credenza che le persone che la sviluppano a livelli superiori debbano essere dotati di un fisico speciale. Per ciò che riguarda la mano, questo non è del tutto vero. […] Le dita possono impegnarsi in una tattilità proattiva, di sondaggio, anche senza intenzionalità cosciente, come quando le dita esplorano un oggetto in cerca di un punto particolare che stimoli il cervello a pensare.</blockquote><p><em>Richard Sennett, L’uomo artigiano, 2008</em></p><p>Come Sennett ci presenta la mano dell’artigiano che esprime il proprio talento e la propria sensibilità nel riconoscere la funzionalità e la qualità del materiale che tratta, allo stesso modo uno sviluppatore può impostare il codice di un componente in modo che svolga le funzionalità per cui è stato creato ma soprattutto con l’attenzione e la qualità richiesta perché aggiunga valore al progetto.</p><p>Sebbene sia impossibile possedere la competenza tecnica per trattare l’intero sistema di componenti, chi vi lavora deve condividere i concetti e i funzionamenti che lo governano, perché è proprio in questa conoscenza che può esprimere il proprio talento. Il “talento” principale di uno sviluppatore non è quindi legato alla complessità del problema computazionale che deve risolvere, ma alla capacità di individuare una soluzione che migliori l’intero prodotto (o in questo caso, il sistema di componenti) combinando le diverse “aree” del laboratorio.</p><p>Uno sviluppatore che conosce le decisioni progettuali è anche in grado di rilevare problemi prima di implementarle, così come un progettista esperto riconosce e trova soluzioni semplici per problemi tecnologici complessi. Il lavoro in coppia di designer e sviluppatore migliora drasticamente la qualità dei componenti grazie a una sensibilità estesa al progetto che consente di trattare tutti i dettagli implementativi in un unico ciclo. Infatti, spostare parte della lavorazione dello sviluppatore nella fase di design consente di scrivere specifiche più complete e coerenti. Inoltre, la condivisione di competenze che si mette in atto in questo passaggio è anche un momento di crescita professionale per entrambe le figure, non solo nella costruzione di un vocabolario comune ma anche nell’approccio al progetto successivo.</p><h4>Schemi mentali</h4><p>Siccome i componenti di un’interfaccia o di un’applicazione possono essere di diverse tipologie, anche le implementazioni possono essere molteplici. Diventa necessario che il team definisca le differenze strutturali delle possibili applicazioni in modo da riconoscere l’approccio più indicato in termini di coerenza con il sistema. Per esempio, seguendo la suddivisione in atomi, molecole e organismi proposta in <a href="https://bradfrost.com/blog/post/atomic-web-design">Atomic Design</a> (Brad Frost, <em>Atomic Design</em>, 2016), il nostro team ha individuato per ogni categoria gli aspetti da curare in termini grafici, di navigazione, di funzionalità e di accessibilità:</p><ul><li><strong>Atomi</strong>: sono gli elementi più semplici di tutti, per questo sono anche quelli più riutilizzabili. Non definiscono un’azione specifica, né si curano che sia eseguita, semplicemente suggeriscono come interagire con l’elemento. Nel caso di un bottone, vengono definiti tutti gli stati come <em>focus</em> o <em>pressed</em> ma non viene in nessun modo agganciato un comportamento all’azione di click sullo stesso. Generalmente trattiamo questa tipologia usando solo gli elementi primitivi del HTML (accessibili per natura), individuandone gli stili di base necessari alla definizione del componente;</li><li><strong>Molecole</strong>: non molto più complesse degli atomi, definiscono elementi dove il tipo di interazione dell’utente è più delineato. Anche qui, dove possibile utilizziamo le strutture complesse presenti in HTML per definire <em>micro-template</em> che implementino correttamente le regole di accessibilità con una navigazione lineare: quando lavoriamo a un <em>form</em> verifichiamo l’utilizzo combinato corretto di <em>label</em> e <em>input</em> così come la presenza di <em>placeholder</em> e testi alternativi per gli strumenti assistivi, mentre l’aspetto grafico si limita a descrivere un layout per gli elementi;</li><li><strong>Organismi</strong>: a questo livello conosciamo con relativa sicurezza come l’utente interagirà con il componente, possiamo quindi impostare una navigazione alternativa a quella lineare e quali azioni può compiere. È probabile che il template sia definitivo e semi-statico, per questo occorre anche progettare un’interfaccia programmatica di accesso dall’esterno, per personalizzare alcuni aspetti con un set controllato di opzioni e proprietà e/o un sistema di eventi o di <em>callback</em> per integrare funzionalità.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DbWthass1ESpuSWA0LGvdA.png" /><figcaption><strong>Atomi</strong>: elementi base, semanticamente definiti e dall’interazione chiara. <strong>Molecole</strong>: combinano gli atomi e ne governano le interrelazioni. <strong>Organismi</strong>: elementi composti e navigabili che svolgono azioni specifiche.</figcaption></figure><h4>L’esperienza</h4><p>Grazie a una suddivisione di questo tipo, diventa più semplice per designer e sviluppatore capire funzionalità e competenze del componente che stanno implementando. Siccome si possono descrivere sia aspetti formali che strutturali, occorre lavorare in fase di progetto per individuare in quali contesti l’elemento può essere utilizzato, capire come può evolvere dal punto di vista grafico e dove invece l’aspetto visivo deve essere declinato all’interno del prodotto, concentrandosi unicamente sulla funzionalità dell’elemento. Lavorando sull’astrazione di questi aspetti è possibile definire i livelli di implementazione necessari per ogni componente e creare fondamenta solide e allo stesso tempo snelle per un sistema che necessariamente deve evolvere coerentemente e velocemente.</p><p>Per implementare la vista a calendario di una serie di eventi, il nostro team ha lavorato alla realizzazione di un componente di base costituito unicamente da un <strong>organismo</strong> che facesse uso di <strong>atomi</strong> come etichette e bottoni e <strong>molecole</strong> come il dettaglio dell’evento su cui costruire l’esperienza di navigazione. Questo ci ha consentito poi di inserire il componente in diversi siti semplicemente applicando le regole del progetto grafico agli elementi atomici, snellendo il processo di aggiornamento e di validazione che si sarebbe invece dilungato laddove l’aspetto formale fosse stato intrinsecamente combinato con quello strutturale.</p><h3>Gli strumenti</h3><p><em>Linguaggi, strumenti, macchine e accessori che aiutano lo sviluppatore, il designer e il cliente. Le documentazioni utili e quelle indispensabili.</em></p><p>I validatori automatici di accessibilità e di <em>coding style</em> che aiutano designer e sviluppatori nelle loro lavorazioni quotidiane si rivelano molto utili anche in altri campi, come quello della formazione e della condivisione. Inoltre, possono essere usati dal team come supporto per un cambio di metodologia, per esempio per il passaggio da un flusso <em>top-down</em> a uno iterativo.</p><p>Per questo la scelta degli strumenti e delle tecnologie è importante che avvenga in seno al team che li dovrà adoperare. Questo passaggio richiede documentazione, libertà di sperimentazione e metodo. A volte conviene crearsi i propri strumenti invece di forzare il team ad utilizzarne uno che non riconosce come funzionale, altre bisogna sapere riconoscere quando le problematiche sono dovute a una mancanza di familiarità, altre ancora quando occorre abbassare la soglia delle funzionalità e delle potenzialità per rendere questi strumenti ancora più adoperabili.</p><p>Quanto più uno strumento è integrato nel processo, tanto più è efficace: quando abbiamo sviluppato <a href="https://github.com/chialab/dna">DNA</a> avevamo bisogno di una libreria per definire componenti Web che non ci imponesse un pattern stabilito da altri sviluppatori ma che fosse basata sui nostri <em>schemi mentali</em>, versatile nell’utilizzo vista la natura mista del team e che evolvesse secondo i nostri ritmi.</p><h4>Unit test, visuali e di accessibilità</h4><p>Quando possibile, avvalersi di validatori automatici, anche implementati a un livello base e non completo, costituisce un grande aiuto per il team di design/sviluppo. Nel particolare caso dello sviluppo a componenti i test più importanti sono quelli che verificano il corretto funzionamento dell’interfaccia programmatica di accesso, il rispetto delle regole di accessibilità dell’elemento e la presenza di regressioni grafiche.</p><p>I validatori non sono solo strumenti di controllo, ma anche di condivisione e formazione: integrare regole relative all’utilizzo del linguaggio di programmazione tramite un <em>linter</em> o impostare uno standard di accessibilità richiesto permettono di assimilare nuove specifiche direttamente nel contesto di lavoro.</p><p>Per esempio, il nostro team approccia gli aggiornamenti del linguaggio JavaScript tramite l’introduzione di nuove regole per <a href="https://eslint.org/">ESLint</a> in modo da acquisire a livello di gruppo non solo <em>come</em> funziona la nuova sintassi, ma anche <em>quando</em> e <em>perché</em> usarla. Queste regole ci aiutano anche nella costruzione dei <em>template</em> per le viste, ricordandoci di aggiungere gli attributi HTML richiesti per migliorare l’accessibilità del componente. Tramite controlli sull’ordinamento semantico e funzionale delle regole CSS, <a href="https://stylelint.io/">Stylelint</a> ci aiuta invece a ridurre errori e conflitti nei fogli di stile altrimenti inevitabili quando si lavora a diverse decine di file in un progetto. L’utilizzo di un <em>coding style</em> sia per la parte JavaScript che per quella CSS migliora inoltre la ricerca nel <em>codebase</em>, facendoci risparmiare tempo ed energie.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vHdjc3pScTOgHLY8d6d_gA.png" /></figure><h4>Pratiche e automazioni</h4><p>Se da un lato i risultati del <em>pair programming</em> in termini di qualità sono evidenti nel panorama della programmazione, la pratica di lavorare in coppia con un designer è molto meno comune, ma altrettanto efficace. Abituati a lavorare con strumenti diversi, il fatto di dedicarsi a un artefatto comune, che sia una proposta grafica o l’implementazione di un componente, è un buon modo per trattare nella loro completezza gli aspetti formali e strutturali. Sempre in quest’ottica, la scelta di uno strumento comune è sempre più efficace di uno strumento di collegamento, che aggiungerebbe un ulteriore passaggio e che potrebbe diventare un potenziale ostacolo alla comunicazione e alla condivisione.</p><p>Sempre nell’ottica di favorire l’integrazione, impostare un flusso di <em>DevOps</em> per automatizzare le operazioni migliora l’esperienza di sviluppo, riduce il rischio di errori e consente anche ai progettisti di mettere mano al codice con maggior sicurezza. Anche se la maggior parte delle lavorazioni avviene in ambiente isolato, per eseguire alcuni controlli occorre verificare il comportamento del componente direttamente nel sito Web. Per questo motivo ogni componente costituisce un modulo sganciabile dall’intero sistema per essere testato in un ambiente di validazione senza richiedere un aggiornamento dell’intera libreria: ad ogni modifica il sistema di <em>continuous delivery</em> pubblica la versione aggiornata dell’elemento su un registro remoto (nel nostro caso NPM) a cui il validatore può accedere per scaricare la versione specifica da testare. Lo scopo di questo meccanismo è quello di ridurre le operazioni manuali, il rischio di errori o incompatibilità e le tempistiche richieste per eseguire la validazione, anche quando si tratta di effettuare un rilascio urgente per risolvere un problema.</p><p>Un’altra pratica che nel lungo periodo porta vantaggi nel processo di aggiornamento e manutenzione di un componente è quella di usare <em>Pull Request</em>: incaricare un membro del team di revisionare gradualmente la coerenza del sistema migliora l’interoperabilità degli elementi e ne semplifica la documentazione. Revisione del codice, validazione funzionale e test automatici servono a verificare che tutti i criteri di accettazione, anche quelli impliciti, siano stati rispettati prima di introdurre una modifica nel sistema di componenti.</p><h4>Documentazione</h4><p>Redigere una documentazione tecnica porta sempre dei benefici per il team, ma farlo per un sistema di componenti può servire anche a ridurre il <em>gap</em> fra il lavoro del designer e dello sviluppatore. Grazie a strumenti come <a href="https://storybook.js.org/">Storybook</a>, che consentono di integrare le scelte progettuali con un’anteprima dell’elemento, si semplificano i punti di accesso al progetto, prevenendo i rischi di disallineamenti tra design e implementazione.</p><p>Anche la scelta di uno strumento per la documentazione di progetto deve tenere presente il flusso di lavoro: se la soluzione scelta non si integra con il processo rischia di deteriorarsi nel tempo. Tuttavia, vanno evitati anche strumenti il cui contenuto è estemporaneo e strettamente legato al contesto come Slack e chat varie. Alcuni software utili sono <a href="https://www.atlassian.com/software/confluence">Confluence</a> (che si integra con Jira) e <a href="https://basecamp.com/">Basecamp</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AnTK2k4UGaOZ0Zsjx22cMQ.png" /><figcaption>Storybook è uno strumento che consente di sviluppare e documentare componenti Web tramite la definizione di “storie”, ovvero stati predefiniti dell’elemento.</figcaption></figure><h3>Conclusioni</h3><p>In passato la separazione forzata di design e sviluppo ha imposto la costruzione di ponti fragili, poco praticabili e che nessuno aveva piacere ad attraversare o curare. Quando si costruiscono ponti è necessario investire molte risorse e molto tempo nella comunicazione fra le due figure, quando invece si costruiscono laboratori l’efficienza della condivisione porta vantaggi sia in termini di tempo che di qualità. Molto spesso, ancora oggi, il lavoro di uno sviluppatore viene visto unicamente per la sua funzione ingegneristica, mentre il ruolo di un progettista viene altrettanto spesso definito come quello del “creativo”. Seppur questi aspetti siano caratteristiche del lavoro di entrambe le figure, non bastano a descrivere il reale apporto che insieme danno al progetto. Questo si manifesta nella sua totalità quando si segue un flusso di sviluppo a componenti, dove l’abilità dei professionisti risiede nell’implementare una soluzione coerente, funzionale e piacevole, sia per gli utenti che per chi lavora al progetto.</p><p>In linea con quelli che sono i principi della metodologia Agile, lo sviluppo a componenti richiede cicli di progettazione, sviluppo, rilascio e test molto brevi e mirati, con l’obiettivo di migliorare il prodotto tramite un approccio <em>realmente</em> iterativo e collaborativo.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=872965be69b1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chialab-open-source/il-mestiere-di-progettare-per-componenti-872965be69b1">Il mestiere di progettare per componenti</a> was originally published in <a href="https://medium.com/chialab-open-source">Chialab Open Source</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dyslexic-friendly Web typography]]></title>
            <link>https://medium.com/chialab-open-source/dyslexic-friendly-web-typography-377be1d2441a?source=rss-8bcbb22ef6f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/377be1d2441a</guid>
            <category><![CDATA[legibility]]></category>
            <category><![CDATA[dyslexia]]></category>
            <category><![CDATA[variable-fonts]]></category>
            <category><![CDATA[typography]]></category>
            <category><![CDATA[reading]]></category>
            <dc:creator><![CDATA[Edoardo Cavazza]]></dc:creator>
            <pubDate>Wed, 18 Mar 2020 15:42:17 GMT</pubDate>
            <atom:updated>2020-03-19T06:15:55.571Z</atom:updated>
            <content:encoded><![CDATA[<h4>An attempt to make Websites easier to read by users with Developmental Dyslexia through scientific results, good design practices and implementation details.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SOz7tGdctmCEyAuiNeiAFw.png" /><figcaption>An ePub reader Web App with a settings panel for legibility.</figcaption></figure><p><strong>Disclaimer</strong>: <em>despite the reliability and the validity of the papers reported here, this article is not intended to be anything else than a simple way to implement research results into Web techniques. Scientific tests had not been run (yet) for reading on screen.</em></p><p>When we enter the field of legibility and readability in a Website we have a very large set of rules and practices to keep in mind, even if we are not specifically targeting dyslexic or low-level readers. Such rules regard the typography of paragraphs and text boxes in general, as well as layout responsiveness and the respect of color contrasts. Since the Web is liquid and open by nature, the implementation of the graphic project is way more complex than a replication using Web technologies, because we need to consider external customisation like zoom and preferred color schemes.</p><p>So, how can we design and develop typography rules which adapts to the user’s needs?</p><h3>Font families and typefaces</h3><p>By googling “dyslexic font” we get across a lot of resources about typefaces that should mitigate reading errors, even though their real efficiency has been often questioned by scientific studies. Such typesets feature increased weights in the lower part of the glyph and a larger space between each letter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SHz8TwSELheocIg8M_io7g.png" /><figcaption>Comparison between serif and sans serif fonts (A,B,C) with typefaces designed to help dyslexic readers (D,E,F).</figcaption></figure><p>According to several studies [1][2], the odd shape that those letters have does not help users (shapes are important in general to help distinguish the characters) as well as the spacing. Instead, this could be achieved by using common fonts like Arial or Times New Roman with an increased letter distance. At the same time, reading speed and accuracy improve when characters are correctly recognised by the user, whereas letter recognition is linked more to the user’s habits rather than its shape [3].</p><p>Considering that letter and word spacing are customisable by developers using CSS and by users with custom browser configurations, any font indicated for paragraphs and long texts can be a good choice.</p><p>Furthermore, we suggest considering <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide">variable fonts</a> as a proper solution to create targeted reading experiences: by introducing new patterns in the Web typography such as full shape and spacing control, variable fonts can be parameterised in order to generate ad hoc reading presets preserving font’s constraints. This is extremely useful when we work with the spacing between letters and words.</p><h3>Size, line height and spacing</h3><p>Webpages can change size, format, zoom level and base <em>font-size</em>. Using the correct unit when stylising paragraphs is fundamental in order to correctly handle typography: always avoid static units like <em>px</em> for the size of the text and make a large use of relative ones like <em>em</em>. In this way, the text will perfectly scale to match user preferences without losing its relation with surrounding content.</p><p>Like a lot of editing tools, browsers automatically set <em>line-height</em> to approximately 1.2 of the font size, but often this is not the correct value in a paragraph. Calculating the optimal line height with tools like <a href="https://tipometria.chialab.io/">tipometria.chialab.io</a> will produce benefits for all kinds of readers, but especially for those users which have difficulties with visual crowding. Always use values relative to the font size in order to provide the best spacing between text lines even in zoomed contexts.</p><p>As many recent researches suggest [4][5], Dyslexia could not be linked to phonological issues only, but also to visual processing impairments. Properties like <em>letter-spacing</em> and <em>word-spacing</em> are generally set by the browser based on the font family and can be increased in order to improve reading performance of dyslexic users. For example, creating a preset with the following values will emulate the spacing rules used in the EasyReading™ font in order to provide the same facilitatory experience to any other family (anyway, fine tuning based on metrics is still required):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pVYKGOsrk88gvZ-r" /><figcaption>Code example for letter-spacing and word-spacing CSS rules.</figcaption></figure><p>If you already provide a classic button to increase font size, you can use those rules to bind letter and word spacing in order to control visual crowding.</p><p>This configuration is limited by its linear increment, and the same applies to line height, which leads to non-optimal render. This is why working with variable fonts is a real plus in this case, since the font designer can parameterise how the spacing grows in relation with the font size.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Fedoardocavazza%2Fembed%2Fpreview%2FabOKvqR%3Fheight%3D600%26slug-hash%3DabOKvqR%26default-tabs%3Dcss%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Fedoardocavazza%2Fpen%2FabOKvqR&amp;image=https%3A%2F%2Fscreenshot.codepen.io%2F873978.abOKvqR.small.09f3ed30-7ea0-4ec6-9bc8-7f0c4b430aee.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/e6d565c646dd177003581fd9091b773c/href">https://medium.com/media/e6d565c646dd177003581fd9091b773c/href</a></iframe><h3>Layouts and color contrasts</h3><p>The connection between visual processing impairment and Dyslexia lead us to rethink our approaches towards a dyslexic-friendly typography and to move our efforts from shapes to spaces. Justification, layouts and color contrasts, which already play a main role for a good legibility, are even more important: avoiding to justify text will prevent the insertion of uncontrolled space between words, limiting the number of strokes per line to 60–70 and balancing color contrast between text and background (using <a href="https://www.w3.org/TR/WCAG/#contrast-minimum">WCAG’s contrast criteria</a>) are simple, yet evergreen good design practices that can make the difference for some users.</p><h3>Research and development</h3><p>We believe that a better understanding of the user’s reading capabilities, especially regarding impaired ones, can improve our work as designers and developers. We will continue to promote scientific research in the field as well as sharing our achievements and technological experiments on <a href="https://www.chialab.it/">chialab.it</a> and <a href="https://www.chialab.io/">chialab.io</a> websites. So, if you like, follow us and share your thoughts!</p><h4>Researches, links, notes</h4><ol><li>Galliussi, Perondi, Chia, Gerbino, Bernardis (2020). <a href="https://link.springer.com/epdf/10.1007/s11881-020-00194-x">Testing text readability of dyslexia-friendly fonts</a>. <em>Annals of Dyslexia</em>.</li><li>Hakvoort., van den Boer, Leenaars, Bos, Tijms (2017). <a href="https://www.sciencedirect.com/science/article/abs/pii/S0022096517304629">Improvements in reading accuracy as a result of increased interletter spacing are not specific to children with dyslexia</a>. <em>Journal of Experimental Child Psychology</em>.</li><li>Perondi, Gerbino, Chia, Arista, Pignoni, Gaudenzi (2017). <a href="https://www.chialab.it/lang/eng/topics/leggibilita-tipografica-e-dislessia">Tipografia parametrica e Developmental Dyslexia</a>.<em> MD Journal</em>.</li><li>Gori, Facoetti (2015). <a href="http://jov.arvojournals.org/article.aspx?articleid=2213244">How the visual aspects can be crucial in reading acquisition: The intriguing case of crowding and developmental dyslexia</a>. <em>Journal of Vision</em>.</li><li>Joo, White, Strodtman, Yeatman (2018). <a href="https://www.sciencedirect.com/science/article/pii/S0010945218300947">Optimizing text for an individual’s visual system: The contribution of visual crowding to reading difficulties</a>. <em>Cortex</em>.</li></ol><h4>Prior art</h4><p>We also covered the connection between accessibility and legibility on the Web in these articles:</p><ul><li><a href="https://medium.com/chialab-open-source/dont-call-it-accessibility-1506c1166f57">Don’t call it accessibility</a></li><li><a href="https://medium.com/chialab-open-source/is-your-web-site-really-accessible-7f045475640f">Is your website really accessible</a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=377be1d2441a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chialab-open-source/dyslexic-friendly-web-typography-377be1d2441a">Dyslexic-friendly Web typography</a> was originally published in <a href="https://medium.com/chialab-open-source">Chialab Open Source</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Improve the Frontend Dev Experience without a Bundler]]></title>
            <link>https://medium.com/chialab-open-source/a-study-about-how-to-improve-frontend-dev-experience-without-a-bundler-1b4c3a461a35?source=rss-8bcbb22ef6f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b4c3a461a35</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[service-worker]]></category>
            <category><![CDATA[babel]]></category>
            <category><![CDATA[es6]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Edoardo Cavazza]]></dc:creator>
            <pubDate>Wed, 20 Dec 2017 14:23:50 GMT</pubDate>
            <atom:updated>2018-08-20T08:08:20.272Z</atom:updated>
            <content:encoded><![CDATA[<h4>A look at how you can use ES6 modules and Service Workers to launch a web app without Webpack or Rollup.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ukwa-fGm5z2vu-r8Vld4yg.jpeg" /><figcaption>Typical example of a developer waiting for bundle to be ready.</figcaption></figure><h3>Introduction</h3><blockquote><a href="https://medium.com/@edoardo.cavazza/a-study-about-how-to-improve-frontend-dev-experience-without-a-bundler-eeb97245bbd7"><em>🇮🇹 Also available in Italian</em></a></blockquote><p>The ECMAScript 2015 (ES6) specification brought JavaScript and web development into a new era, made of clean syntaxes, better scaffolding of source files and a set of developer tools available in other programming contexts — like <em>static code analysis</em>, <em>dependencies systems</em>, <em>autocompletion</em> and more.</p><p>All of this came at a price: launching a web app in the browser can now require <em>hundreds</em> of <em>node modules</em>, a watcher to detect file changes and exhausting source rebuilds. A few seconds lost can easily become hours in a week, a waste of disk space, extreme RAM and CPU consumption and, for slow performing computers, fans swirling like aeronautical engines.</p><h4>Case study</h4><blockquote>As a developer, I would like to create a classic To-Do List app, using a component library with JSX support and run it in the browser, without having to start a bundler, a transpiler and a watcher.</blockquote><h3>😱😱😱</h3><p>Let’s say that we all love <a href="https://preactjs.com/"><em>Preact</em></a><em> </em>(as it should be) — getting the boilerplate (and its dependencies) alone, means downloading ~1.500 <em>node modules</em>, ~26.000 files, and requires an overall disk space of about 200MB. Most of those dependencies are used to run a <em>web server</em> baked by <a href="https://webpack.js.org/"><em>Webpack</em></a><em>.</em></p><p>But we don’t want any of this, so we have to rely only on the features of a modern browser.</p><h4>How to load an ES6/7/X application in the browser without a bundler</h4><p>Since Chrome 62, Edge 16, Safari 11 and Firefox 54, it is possible to import an ES6 module into the browser:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9e5977425eaf163d0084956fb6ae4c2b/href">https://medium.com/media/9e5977425eaf163d0084956fb6ae4c2b/href</a></iframe><p>When the HTML parser meets this tag, it fetches the source file specified and recursively resolves all import and export statements.</p><p>Although this new feature is a wonderful one, it is not sufficient to launch a modern and complex web application. Browsers are able to resolve only relative dependencies and they have no information about <em>NPM</em> dependencies. Furthermore, JSX usage will throw multiple <em>Syntax</em> <em>Errors</em>, because it is not a standard of the JavaScript language.</p><h4>Service Workers to the rescue</h4><p>When everything seems lost, <em>Service Workers </em>come to our aid. Those special <em>Workers</em>, once registered, can intercept network requests and handle their response.</p><p>So, we may use <em>SW</em> to:</p><ul><li>intercept JavaScript requests;</li><li>fetch files;</li><li>look for non-relativeimport statements and remap them to the node_modules folder;</li><li>detect JSX syntax and <em>transpile</em> all JSX expressions to JavaScript;</li><li>return amended files to the main thread.</li></ul><p>At this point the browser should be able to handle the JavaScript files and resolve their dependencies.</p><blockquote>More about Service Workers on MDN: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers">Using Service Workers</a></blockquote><h3>Developing Unchained</h3><p><strong>Unchained</strong> is a <a href="https://github.com/edoardocavazza/unchained">proof of concept hosted on GitHub</a> that puts this idea into practice. Like bundlers and <em>transpilers</em> we already use, it was designed to split the process into steps and it is pluggable.</p><p>It provides some useful helpers to register <em>Service Workers,</em> a <em>polyfill</em> to support <em>dynamic</em> import and its core (similar to the <a href="https://rollupjs.org/">Rollup</a> API) can resolve JavaScript file imports through the following steps:</p><ul><li><strong>Transformation</strong>: to change the source code and the <em>transpilation</em> of non-standard syntaxes;</li><li><strong>Resolution</strong>: find and resolveimport statements;</li><li><strong>Finalization</strong>: returns the generated code.</li></ul><p>All updates to the final bundle are done with <a href="https://github.com/babel/babel/tree/master/packages/babel-standalone"><em>Babel Standalone</em></a>, a <em>Babel </em>distribution that runs within the browser and enables plugins to handle the <em>Abstract Syntax Tree</em> (AST) of the file directly, tracking changes and generating the final <em>sourcemap</em>.</p><p>The following Unchained plugins are already available (and quite basic at the moment):</p><ul><li><strong>common</strong>: replaces CommonJS expressions, such as require andmodule.exports, with ES6 statements;</li><li><strong>babel</strong>: communicates with Babel Standalone and its plugins in order to <em>transpile</em> non-standard syntaxes like JSX, Flow or Typescript(!);</li><li><strong>text</strong>: converts text files into ES6 modules;</li><li><strong>json</strong>: converts JSON files into ES6 modules;</li><li><strong>env</strong>: performs the injection of environment variables (passed using a JavaScript Object, since browsers have no direct access to actual<em> env variables</em>);</li><li><strong>resolve</strong>: is a partial implementation of the <em>node</em> resolution algorithm.</li></ul><p>Moreover, Unchained uses the <a href="https://developer.mozilla.org/it/docs/Web/API/Cache">cache interface </a>of the browser to skip already resolved files. Using the <em>ETag </em>header, it can also detect changes, so page reloads and code injections are damn fast.</p><h4>Make the developer happy</h4><p>Going back to our case, we may think of a solution and, to implement it, we are using the simple example shown on the home page of <a href="https://preactjs.com/">preactjs.com</a>.</p><p><strong>Project setup</strong></p><p>At start, we need only two dependencies:</p><pre>npm init -y<br>npm install <strong>preact</strong> <strong>unchained-js<br></strong><em># 2 modules, 65 items, &lt; 2MB</em></pre><p>and the following files:</p><ul><li><a href="https://github.com/edoardocavazza/unchained-preact-demo/blob/master/index.html">index.html</a>: where the <em>Service Worker</em> is registered and application files are imported</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5260413f041a4514693083e244fdf5de/href">https://medium.com/media/5260413f041a4514693083e244fdf5de/href</a></iframe><ul><li><a href="https://github.com/edoardocavazza/unchained-preact-demo/blob/master/sw.js">sw.js</a>: the Service Worker to be registered, it uses Unchained library to <em>transpile</em> the source code</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e13b9b39c37b46613a327271771aa557/href">https://medium.com/media/e13b9b39c37b46613a327271771aa557/href</a></iframe><ul><li><a href="https://github.com/edoardocavazza/unchained-preact-demo/blob/master/index.js">index.js</a>: the main JavaScript file</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e8b93ae6c9ffa0ed7b0b6306daa21eb4/href">https://medium.com/media/e8b93ae6c9ffa0ed7b0b6306daa21eb4/href</a></iframe><ul><li><a href="https://github.com/edoardocavazza/unchained-preact-demo/blob/master/todolist.component.js">todolist.component.js</a>: the TodoList component class definition.</li></ul><p>Now, just run a local server (here installed globally):</p><pre>npm install -g http-server<br>http-server .</pre><p>and… done!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*XT2_NfR6w9hUNnueeAArfQ.gif" /></figure><p>In the console, Unchained logs all the files imported at launch: later, it is going to use the cache for reloads that follow.</p><p>On each file change, e.g. if we edit the button’s label in todolist.component.js and save, only the that file is going to be reloaded by the browser.</p><blockquote>A Git project of this example is available <a href="https://github.com/edoardocavazza/unchained-preact-demo">here</a>.</blockquote><h3>Conclusions</h3><p>Despite browser support being limited to Chrome and Firefox (as for this one it is not available by default, but you need to turn on the flag dom.moduleScripts.enabled), I think that this approach may simplify the project structure and its configuration:</p><ul><li>it considerably reduces the amount of dependencies to install;</li><li><em>transpiling</em> does not block the main UI thread, because everything happens in the <em>Service Worker</em>’s context;</li><li>after the first launch, source code updates are really fast;</li><li><em>code splitting </em>with<em> dynamic </em>import() just works;</li><li><em>sourcemaps</em> support.</li></ul><p>But there are cons too:</p><ul><li>the first launch is not performant (due to the lack of direct file system access and the need to create an AST for every single file);</li><li>the <a href="https://webpack.js.org/guides/tree-shaking/"><em>treeshaking</em></a><em> </em>is missing, a feature available in Rollup and Webpack 4.</li></ul><h4>Real test</h4><p>Things are always easy in a To-Do List app, but what about real world examples? I replaced Rollup with Unchained in a complex project I am working on, that features many dependencies like jQuery, Moment, CKEditor and a component library, with the following results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*z3yuXnoZ-DPrS2jxRrpObw.png" /><figcaption>Comparison made with a MacBook Pro (Retina, 15-inch, Mid 2015) and Chrome 63.0.3239.84</figcaption></figure><h4>Future</h4><p>Although Unchained covers all the aspects of this simple study, I would like to deepen some topics and improve the results:</p><ul><li>speed up the first execution by using only AST transformations (disabled because at the moment there is a problem generating <em>sourcemaps</em>);</li><li>verify if it is possible to integrate <a href="https://medium.com/@ericsimons/introducing-turbo-5x-faster-than-yarn-npm-and-runs-natively-in-browser-cc2c39715403">Turbo</a> once available, in order to improve the non-relative paths resolution process;</li><li>extend the compatibility to browsers that don’t support <em>Service Workers</em> or <em>ES6 modules;</em></li><li>extend the support to the <em>node</em> environment to obtain application <em>bundles</em> that are 100% compatible with the in-browser preview;</li><li><em>blob</em> (for images and fonts loading) and <em>postCSS</em> plugins.</li></ul><blockquote><strong><em>Special thanks<br></em></strong>A huge thanks to <a href="https://twitter.com/xho">xho</a> and <a href="https://twitter.com/SteRosanelli">SteRosanelli</a>, for their patience in reviewing this article.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b4c3a461a35" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chialab-open-source/a-study-about-how-to-improve-frontend-dev-experience-without-a-bundler-1b4c3a461a35">How to Improve the Frontend Dev Experience without a Bundler</a> was originally published in <a href="https://medium.com/chialab-open-source">Chialab Open Source</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Uno studio per migliorare la giornata dello sviluppatore Frontend]]></title>
            <link>https://medium.com/chialab-open-source/https-medium-com-edoardo-cavazza-uno-studio-per-migliorare-la-giornata-dello-sviluppatore-frontend-eeb97245bbd7?source=rss-8bcbb22ef6f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/eeb97245bbd7</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[service-worker]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[babel]]></category>
            <category><![CDATA[es6]]></category>
            <dc:creator><![CDATA[Edoardo Cavazza]]></dc:creator>
            <pubDate>Wed, 20 Dec 2017 14:22:38 GMT</pubDate>
            <atom:updated>2019-02-13T11:51:48.960Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ukwa-fGm5z2vu-r8Vld4yg.jpeg" /><figcaption>Un tipico esemplare di sviluppatore che installa le dipendenze NPM.</figcaption></figure><h3>Introduzione</h3><p>La specifica ECMAScript 2015 (ES6) per JavaScript ha migliorato, e di molto, lo sviluppo di applicazioni web, consentendo una migliore organizzazione del codice e dei file sorgenti (<em>scaffolding</em>) e l’adozione di strumenti disponibili in altri ambienti di sviluppo (<em>static code analysis</em>, <em>sistemi di dipendenze</em>, <em>autocompletion</em>…).</p><p>Tutto questo ha un prezzo: per lanciare un’applicazione web nel browser, dobbiamo installare centinaia di moduli <em>node</em> e ricompilare a ogni modifica il codice JavaScript necessario per l’esecuzione. Secondi che diventano ore durante la settimana, file system esplosi, uso di RAM e CPU ai massimi livelli e, nei computer “meno potenti”, ventole che turbinano come motori aeronautici.</p><h4>Il desiderio</h4><blockquote>Come sviluppatore vorrei creare una classica To-Do List app, basata su un sistema a componenti e usando JSX, e vedere il risultato nel browser, senza dover usare un bundler, un transpiler e un watcher.</blockquote><h3>😱😱😱</h3><p>Supponendo che lo sviluppatore in questione voglia utilizzare <a href="https://preactjs.com/"><em>Preact</em></a>,<em> </em>solo scaricandone il boilerplate e le relative dipendenze, si ritroverebbe con circa 1.500 moduli <em>node</em>, 26.000 file e 200MB di disco occupato. La maggior parte di queste dipendenze servono per far funzionare un <em>web server</em> di sviluppo basato su <a href="https://webpack.js.org/"><em>Webpack</em></a><em>.</em></p><p>Ma il nostro sviluppatore non vuole usare niente di tutto questo, per cui non gli resta che affidarsi unicamente alle feature del browser.</p><h3>Come lanciare un’applicazione ES6/7/X senza un bundler</h3><p>A partire da Chrome 62, Edge 16, Safari 11 e Firefox 54 è possibile importare un modulo ES6 nel browser tramite:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9e5977425eaf163d0084956fb6ae4c2b/href">https://medium.com/media/9e5977425eaf163d0084956fb6ae4c2b/href</a></iframe><p>Quando il browser incontra questa istruzione inzia a risolvere ricorsivamente i vari import /export presenti nel file sorgente specificato.</p><p>Per quanto di suo questa nuova feature possa essere fantastica, da sola non basta a risolvere le esigenze del nostro programmatore. Infatti, il browser è in grado di risolvere solo dipendenze relative, e non ha nessuna informazione riguardo all’esistenza di eventuali dipendenze presenti nella cartella node_modules. Inoltre, l’utilizzo di JSX causerebbe un SyntaxError, non rientrando nelle specifiche del linguaggio.</p><h4>Service Workers</h4><p>È qui che ci vengono in soccorso i <em>Service Workers</em>. Questi speciali <em>Worker</em>, una volta registrati, possono intercettare le chiamate di rete e modificarne il <em>response</em>.</p><p>In questo modo possiamo intercettare l’<em>import</em> di un file JavaScript, <em>parsarne</em> il contenuto e intervenire dove è necessario.</p><p>A questo punto i passaggi potrebbero essere:</p><ul><li>intercettare le chiamate ai file JavaScript</li><li>scaricare il contenuto dei file JavaScript</li><li>individuare gli import non relativi e <em>mapparli</em> nella cartella node_modules</li><li>individuare la sintassi JSX e convertirla in istruzioni accettate dal browser</li><li>restituire il file modificato al <em>thread</em> principale.</li></ul><p>Infine, il browser dovrebbe essere in grado di interpretare correttamente il file e di risolvere le dipendenze.</p><blockquote>Approfondimento sui Service Workers su MDN: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers">Using Service Workers</a></blockquote><h3>Lo sviluppo di Unchained</h3><p><strong>Unchained</strong> è un <a href="https://github.com/edoardocavazza/unchained">proof of concept ospitato su GitHub</a> che mette in pratica l’idea sopra riportata. Così come i vari <em>bundler</em> e <em>transpiler</em> che usiamo, è pensato come libreria che divide il processo in fasi distinte ed è <em>pluggabile</em>.</p><p>Fornisce inoltre un set di <em>helper</em> per l’utilizzo dei <em>Service Workers</em> e un <em>polyfill</em> per il <em>dynamic</em> import() ed è composto da un <em>core</em> (con un’interfaccia simile a quella di <a href="https://rollupjs.org/">Rollup</a>) che si occupa di risolvere l’<em>import</em> di un file attraverso i seguenti passaggi:</p><ul><li><strong>Trasformazione</strong>: per operazioni di modifica del codice e <em>transpiling</em> di sintassi non standard</li><li><strong>Risoluzione</strong>: esegue una ricerca degli <em>statement</em> di import nel file, ne estrapola il <em>path</em> e, se necessario, lo modifica</li><li><strong>Finalizzazione</strong>: restituisce il codice generato.</li></ul><p>Tutte le modifiche al sorgente vengono effettuate tramite <a href="https://github.com/babel/babel/tree/master/packages/babel-standalone"><em>Babel Standalone</em></a>, una versione di <em>Babel</em> che funziona nel browser e che consente ai plugin di lavorare sul <em>Abstract Syntax Tree</em> (AST) del codice e generare una <em>sourcemap</em> per il file finale.</p><p>I plugin esistenti (molto semplici per ora) sono:</p><ul><li><strong>common</strong>: trasforma gli statement di require e module.exports tipici del sistema CommonJS in statement ES6</li><li><strong>babel</strong>: permette di accedere alla libreria Babel Standalone in modo da usare plugin per sintassi non standard (ad esempio, JSX, Flow o Typescript!)</li><li><strong>text</strong>: converte un file di testo in un modulo ES6 che esporta una stringa di testo</li><li><strong>json</strong>: converte un file JSON in un modulo ES6 che esporta un oggetto JavaScript</li><li><strong>env</strong>: esegue l’<em>inject</em> di variabili d’ambiente (in questo caso, necessariamente passati in configurazione, in quanto il browser non ha reale accesso all’ambiente)</li><li><strong>resolve</strong>: implementazione parziale che converte gli import di moduli node nel loro path relativo.</li></ul><p>Inoltre Unchained usa il sistema di cache fornito dai <em>Service Workers</em> basandosi sulla header <em>ETag:</em> in questo modo al <em>reload</em> della pagina il sistema evita i passaggi di trasformazione e risoluzione per i file che non sono cambiati, rendendo quasi immediato l’<em>inject</em> delle modifiche.</p><h4>Rendiamo felice lo sviluppatore</h4><p>Alla fine, tornando al problema del nostro sviluppatore, possiamo ipotizzare una soluzione. Per farlo useremo il semplice esempio della home di <a href="https://preactjs.com/">preactjs.com</a>.</p><p><strong>Setup del progetto</strong></p><p>Avremo bisogno di due dipendenze:</p><pre>npm init -y<br>npm install <strong>preact</strong> <strong>unchained-js<br></strong><em># 2 moduli, 65 items, &lt; 2MB</em></pre><p>e dei seguenti file:</p><ul><li><a href="https://github.com/edoardocavazza/unchained-preact-demo/blob/master/index.html">index.html</a>: esegue la registrazione del <em>Service Worker</em> e importa i file dell’applicazione</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5260413f041a4514693083e244fdf5de/href">https://medium.com/media/5260413f041a4514693083e244fdf5de/href</a></iframe><ul><li><a href="https://github.com/edoardocavazza/unchained-preact-demo/blob/master/sw.js">sw.js</a>: il <em>Service Worker</em> da importare, usa il core di Unchained per il <em>transpiling</em> dei sorgenti.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e13b9b39c37b46613a327271771aa557/href">https://medium.com/media/e13b9b39c37b46613a327271771aa557/href</a></iframe><ul><li><a href="https://github.com/edoardocavazza/unchained-preact-demo/blob/master/index.js">index.js</a>: file JavaScript principale</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e8b93ae6c9ffa0ed7b0b6306daa21eb4/href">https://medium.com/media/e8b93ae6c9ffa0ed7b0b6306daa21eb4/href</a></iframe><ul><li><a href="https://github.com/edoardocavazza/unchained-preact-demo/blob/master/todolist.component.js">todolist.component.js</a>: la definizione del componente TodoList.</li></ul><p>Ora, basta avviare un server per l’applicazione:</p><pre>npm install -g http-server<br>http-server .</pre><p>e… fatto!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*XT2_NfR6w9hUNnueeAArfQ.gif" /></figure><p>In console, potete vedere che Unchained elenca i file che cerca di risolvere alla prima apertura, e ai successivi <em>refresh</em> li risolverà usando la <em>cache</em>.</p><p>Se si modifica un file, per esempio l’etichetta del bottone in todolist.component.js, solo il file cambiato verrà ricaricato.</p><blockquote>È possibile scaricare <a href="https://github.com/edoardocavazza/unchained-preact-demo">qui i file di progetto</a> già pronti</blockquote><h3>Conclusioni</h3><p>Anche se il supporto dei browser è limitato (Chrome, Firefox con la flag dom.moduleScripts.enabled attiva), trovo che questo approccio semplifichi molto il processo di configurazione del progetto. In particolare:</p><ul><li>riduce notevolmente la quantità delle dipendenze da installare</li><li>il<em> transpiling</em> dei file JavaScript non blocca il <em>thread</em> UI principale, perché tutto avviene nel contesto del <em>Service Worker</em></li><li>dopo il primo avvio, l’aggiornamento dei file sorgenti è molto veloce</li><li><em>dynamic </em>import() e <em>code splitting</em> automatici</li><li>mantiene il supporto alle <em>sourcemap</em>.</li></ul><p>Ma ci sono anche delle conseguenze:</p><ul><li>i tempi per il primo avvio non sono performanti (per la mancanza di accesso diretto al <em>file system </em>e perché viene generato un AST per ogni file)</li><li>non c’è <a href="https://webpack.js.org/guides/tree-shaking/"><em>treeshaking</em></a>, una feature molto potente presente in Rollup e Webpack (ma più utile in fase in di distribuzione che in quella di sviluppo).</li></ul><h4>Caso reale</h4><p>Le cose sono sempre facili quando si tratta di una To-Do List App, mentre lo sono molto meno nei casi reali. Ho provato a introdurre Unchained in un progetto complesso, con molte dipendenze tra cui jQuery, Moment, CKEditor e una libreria di componenti, con i seguenti risultati:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*z3yuXnoZ-DPrS2jxRrpObw.png" /><figcaption>Risultati per MacBook Pro (Retina, 15-inch, Mid 2015) e Chrome 63.0.3239.84</figcaption></figure><h4>Futuro</h4><p>Nonostante Unchained implementi la proposta di questo studio, mi piacerebbe approfondirne alcune parti:</p><ul><li>velocizzare il primo avvio usando unicamente trasformazioni dell’AST (al momento disabilitate per problemi nella creazione delle <em>sourcemap</em>)</li><li>verificare un eventuale integrazione con <a href="https://medium.com/@ericsimons/introducing-turbo-5x-faster-than-yarn-npm-and-runs-natively-in-browser-cc2c39715403">Turbo</a> quando sarà disponibile, in modo da migliorare la risoluzione dei <em>path</em> non relativi</li><li>estendere la compatibilità ai browser che non supportano <em>Service Workers</em> o <em>ES6 modules</em></li><li>la possibilità di eseguire le trasformazioni di Unchained anche in ambiente <em>node</em>, in modo da creare <em>bundle</em> delle applicazioni 100% compatibili con la <em>preview in-browser</em></li><li><em>blob</em> (per il caricamento di immagini e font) e <em>postCSS</em> plugins.</li></ul><h4><strong>Ringraziamenti</strong></h4><p>Un grazie speciale a <a href="https://twitter.com/xho">xho</a>, che ha <em>transpilato</em> il mio linguaggio macchina in uno comprensibile agli umani.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eeb97245bbd7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chialab-open-source/https-medium-com-edoardo-cavazza-uno-studio-per-migliorare-la-giornata-dello-sviluppatore-frontend-eeb97245bbd7">Uno studio per migliorare la giornata dello sviluppatore Frontend</a> was originally published in <a href="https://medium.com/chialab-open-source">Chialab Open Source</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>